diff options
context:
space:
mode:
Diffstat (limited to 'source/ui-blame.c')
-rw-r--r--source/ui-blame.c6
1 file changed, 6 insertions, 0 deletions
diff --git a/source/ui-blame.c b/source/ui-blame.c
index 1b9df88..99f6de0 100644
--- a/source/ui-blame.c
+++ b/source/ui-blame.c
@@ -127,6 +127,12 @@ static void print_object(const struct object_id *oid, const char *path,
oid_to_hex(oid));
return;
}
+ if (ctx.cfg.max_blob_size && size / 1024 > (unsigned long)ctx.cfg.max_blob_size) {
+ cgit_print_error_page(413, "Too large",
+ "blob size (%luKB) exceeds display size limit (%dKB)",
+ size / 1024, ctx.cfg.max_blob_size);
+ return;
+ }
buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf) {