diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-07-25 13:59:23 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-07-25 13:59:23 -0700 |
| commit | 984da7f8d2589b53cca7c920e597eab30d4c1b36 (patch) | |
| tree | 3893c6b5190ce7ba24431c61610453c1fe0302d6 | |
| parent | a5194d806c46a71d523054db28f0b22e23284a3c (diff) | |
| parent | 64c45dc72ef039215f23d1b8f077dd6f9f254d38 (diff) | |
| download | git-984da7f8d2589b53cca7c920e597eab30d4c1b36.tar.xz | |
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
| -rw-r--r-- | gpg-interface.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gpg-interface.c b/gpg-interface.c index 8ed274533f..d60115ca40 100644 --- a/gpg-interface.c +++ b/gpg-interface.c @@ -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; |
