1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-08 23:37:47 +02:00

Backport bug fix. Fixes bug#1240.

This commit is contained in:
Werner Koch 2010-06-18 08:08:21 +00:00
parent c253383ab1
commit 5474061365
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-06-18 Werner Koch <wk@g10code.com>
* parse-packet.c (skip_packet, parse_gpg_control): Take care of
premature EOFs. Backport from trunk.
2010-06-01 Werner Koch <wk@g10code.com>
* gpg.c (main): Add dummy option --debug-level and ignore

View File

@ -622,7 +622,11 @@ skip_packet( IOBUF inp, int pkttype, unsigned long pktlen, int partial )
else
{
for( ; pktlen; pktlen-- )
dump_hex_line(iobuf_get(inp), &i);
{
dump_hex_line ((c=iobuf_get(inp)), &i);
if (c==-1)
break;
}
}
putc ('\n', listfp);
return;
@ -2441,7 +2445,11 @@ parse_gpg_control( IOBUF inp, int pkttype,
}
else {
for( ; pktlen; pktlen-- )
dump_hex_line(iobuf_get(inp), &i);
{
dump_hex_line ((c=iobuf_get (inp)), &i);
if (c == -1)
break;
}
}
putc ('\n', listfp);
}