From: Eric Wong Date: Wed, 11 Jan 2017 04:12:28 +0000 (+0000) Subject: diff: note the dangers of gigantic anchors hash X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe0f622aefb4f4316d9f6814f4badcda5528eedf;p=thirdparty%2Fpublic-inbox.git diff: note the dangers of gigantic anchors hash --- diff --git a/lib/PublicInbox/RepobrowseGitDiffCommon.pm b/lib/PublicInbox/RepobrowseGitDiffCommon.pm index ac38aa0a2..ae0e68211 100644 --- a/lib/PublicInbox/RepobrowseGitDiffCommon.pm +++ b/lib/PublicInbox/RepobrowseGitDiffCommon.pm @@ -240,6 +240,8 @@ sub git_diff_sed_stat ($$) { $l =~ /\A(\S+)\t+(\S+)\t+(.*)/ or next; my ($add, $del, $fn) = ($1, $2, $3); if ($fn ne '') { # normal modification + # TODO: discard diffs if they are too big + # gigantic changes with many files may still OOM us my $anchor = to_attr(git_unquote($fn)); $req->{anchors}->{$anchor} = $fn; $l = utf8_html($fn);