mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-26 22:29:58 +01:00
gpg: Fix use of uninit.value in listing sig subpkts.
* g10/parse-packet.c (dump_sig_subpkt): Print regex subpacket sanitized. -- We may not use "%s" to print an arbitrary buffer. At least "%.*s" should have been used. However, it is in general preferable to escape control characters while printf user data. Reported-by: Hanno Böck Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
0988764397
commit
596ae9f543
@ -1151,7 +1151,11 @@ dump_sig_subpkt (int hashed, int type, int critical,
|
|||||||
if (!length)
|
if (!length)
|
||||||
p = "[invalid regexp subpacket]";
|
p = "[invalid regexp subpacket]";
|
||||||
else
|
else
|
||||||
es_fprintf (listfp, "regular expression: \"%s\"", buffer);
|
{
|
||||||
|
es_fprintf (listfp, "regular expression: \"");
|
||||||
|
es_write_sanitized (listfp, buffer, length, "\"", NULL);
|
||||||
|
p = "\"";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SIGSUBPKT_REVOCABLE:
|
case SIGSUBPKT_REVOCABLE:
|
||||||
if (length)
|
if (length)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user