about summary refs log tree commit homepage
path: root/lib/PublicInbox/SolverGit.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-01-04 04:19:33 +0000
committerEric Wong <e@80x24.org>2020-01-04 04:19:42 +0000
commitaa1e96cd44f6d5cd77a96648ac1f2dbcca9dc367 (patch)
treec40a5be2c2f47106d66cb08ceaf5158eb5d7ed8a /lib/PublicInbox/SolverGit.pm
parent0563ed29d37ae46733e3001f390bb9a1c5b04d6b (diff)
downloadpublic-inbox-aa1e96cd44f6d5cd77a96648ac1f2dbcca9dc367.tar.gz
While filenames are escaped, the actual diff contents may
contain an unescaped "\r" carriage return byte not in front
of the "\n" line feed.  So just allow "\r" to appear in the
middle of a line.
Diffstat (limited to 'lib/PublicInbox/SolverGit.pm')
-rw-r--r--lib/PublicInbox/SolverGit.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm
index eab8459b..5ac27988 100644
--- a/lib/PublicInbox/SolverGit.pm
+++ b/lib/PublicInbox/SolverGit.pm
@@ -155,7 +155,7 @@ sub extract_diff ($$) {
                 # the meat of the diff, including "^\\No newline ..."
                 # We also allow for totally blank lines w/o leading spaces,
                 # because git-apply(1) handles that case, too
-                (?:^(?:[\@\+\x20\-\\][^\r\n]*|)$LF)+
+                (?:^(?:[\@\+\x20\-\\][^\n]*|)$LF)+
         )!smx or return;
 
         my $di = {