mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
g10: Fix possible null dereference.
* g10/armor.c (armor_filter): Access ->d in the internal loop. -- Cherry-picked master commit of: 802a2aa300bad3d4385d17a2deeb0966da4e737d GnuPG-bug-id: 4494 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
cf73c82e95
commit
5b22d2c400
@ -1156,10 +1156,10 @@ armor_filter( void *opaque, int control,
|
||||
}
|
||||
|
||||
/* write the comment strings */
|
||||
for(s=comment->d;comment;comment=comment->next,s=comment->d)
|
||||
for(;comment;comment=comment->next)
|
||||
{
|
||||
iobuf_writestr(a, "Comment: " );
|
||||
for( ; *s; s++ )
|
||||
for( s=comment->d; *s; s++ )
|
||||
{
|
||||
if( *s == '\n' )
|
||||
iobuf_writestr(a, "\\n" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user