diff options
Diffstat (limited to 'ui-blame.c')
-rw-r--r-- | ui-blame.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui-blame.c b/ui-blame.c index f28eea0..08832cd 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -151,6 +151,10 @@ static void print_object(const struct object_id *oid, const char *path, cgit_tree_link("tree", NULL, NULL, ctx.qry.head, rev, path); html(")\n"); + if (buffer_is_binary(buf, size)) { + html("<div class='error'>blob is binary.</div>"); + goto cleanup; + } if (ctx.cfg.max_blob_size && size / 1024 > ctx.cfg.max_blob_size) { htmlf("<div class='error'>blob size (%ldKB)" " exceeds display size limit (%dKB).</div>", |