[PATCH] with-colons: proper buffering for group keys
Jason A. Donenfeld
Jason at zx2c4.com
Wed Jan 28 15:37:29 CET 2015
This changes the output of group keys to use the es_ variety of
functions, so that the output is correct.
Previously, the keys would be flushed before the rest:
$ gpg --list-config --with-colons
39E5020CE469141074A374C[..snipped...]A374E4691410cfg:group:big
group:;;;;
cfg:group:group2:
cfg:group:group1:;
This patch restores the correct behavior:
$ gpg --list-config --with-colons
cfg:group:big group:39E5020C;E4691410;EB7D54A8;D774A374;CF90C77B
cfg:group:group2:E4691410
cfg:group:group1:D774A374;E4691410
Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
---
g10/gpg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/g10/gpg.c b/g10/gpg.c
index 2047e30..6786a13 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -1599,7 +1599,7 @@ list_config(char *items)
for(sl=iter->values;sl;sl=sl->next)
{
- print_sanitized_string2 (stdout, sl->d, ':',';');
+ es_write_sanitized (es_stdout, sl->d, strlen(sl->d), ":;", NULL);
if(sl->next)
es_printf(";");
}
--
2.2.1
More information about the Gnupg-devel
mailing list