зеркало из https://github.com/microsoft/git.git
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:
Коммит
c5d81d7f59
|
@ -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;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче