Browse Source

Merge branch 'sr/gpg-interface-stop-at-the-end'

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
maint
Junio C Hamano 6 years ago
parent
commit
984da7f8d2
  1. 3
      gpg-interface.c

3
gpg-interface.c

@ -116,6 +116,9 @@ static void parse_gpg_output(struct signature_check *sigc) @@ -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;

Loading…
Cancel
Save