Skip to content

Commit c5d81d7

Browse files
committed
Merge branch 'sr/gpg-interface-stop-at-the-end' into maint
A codepath that reads from GPG for signed object verification read past the end of allocated buffer, which has been fixed. * sr/gpg-interface-stop-at-the-end: gpg-interface: do not scan past the end of buffer
2 parents 17952bd + 64c45dc commit c5d81d7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gpg-interface.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ static void parse_gpg_output(struct signature_check *sigc)
116116
for (line = buf; *line; line = strchrnul(line+1, '\n')) {
117117
while (*line == '\n')
118118
line++;
119+
if (!*line)
120+
break;
121+
119122
/* Skip lines that don't start with GNUPG status */
120123
if (!skip_prefix(line, "[GNUPG:] ", &line))
121124
continue;

0 commit comments

Comments
 (0)