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
This commit is contained in:
Junio C Hamano 2019-07-29 12:38:17 -07:00
Родитель 17952bd1bf 64c45dc72e
Коммит c5d81d7f59
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -116,6 +116,9 @@ static void parse_gpg_output(struct signature_check *sigc)
for (line = buf; *line; line = strchrnul(line+1, '\n')) { for (line = buf; *line; line = strchrnul(line+1, '\n')) {
while (*line == '\n') while (*line == '\n')
line++; line++;
if (!*line)
break;
/* Skip lines that don't start with GNUPG status */ /* Skip lines that don't start with GNUPG status */
if (!skip_prefix(line, "[GNUPG:] ", &line)) if (!skip_prefix(line, "[GNUPG:] ", &line))
continue; continue;