mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
gpg: Stop early on bogus old style comment packets.
* g10/parse-packet.c (parse_key): Take care of too short packets for old style commet packets. -- GnuPG-bug-id: 1714
This commit is contained in:
parent
84419f42da
commit
3d250d21d3
@ -1978,7 +1978,9 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
|
||||
for (; pktlen; pktlen--)
|
||||
{
|
||||
int c;
|
||||
c = iobuf_get_noeof (inp);
|
||||
c = iobuf_get (inp);
|
||||
if (c == -1)
|
||||
break; /* Ooops: shorter than indicated. */
|
||||
if (c >= ' ' && c <= 'z')
|
||||
es_putc (c, listfp);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user