Skip to content

Commit

Permalink
Merge branch 'sr/gpg-interface-stop-at-the-end'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gitster committed Jul 25, 2019
2 parents a5194d8 + 64c45dc commit 984da7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gpg-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ static void parse_gpg_output(struct signature_check *sigc)
for (line = buf; *line; line = strchrnul(line+1, '\n')) {
while (*line == '\n')
line++;
if (!*line)
break;

/* Skip lines that don't start with GNUPG status */
if (!skip_prefix(line, "[GNUPG:] ", &line))
continue;
Expand Down

0 comments on commit 984da7f

Please sign in to comment.