]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
diff: note the dangers of gigantic anchors hash
authorEric Wong <e@80x24.org>
Wed, 11 Jan 2017 04:12:28 +0000 (04:12 +0000)
committerEric Wong <e@80x24.org>
Wed, 11 Jan 2017 04:13:20 +0000 (04:13 +0000)
lib/PublicInbox/RepobrowseGitDiffCommon.pm

index ac38aa0a250956d6cf7237fdac35804f16b39a44..ae0e68211fceda8540dfea8220694daa6dc42215 100644 (file)
@@ -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);