[Pkg-gnupg-commit] [gpgme] 240/412: Fix including nil bytes in keylist output.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 22 21:26:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gpgme.
commit 6a7ee33abd5059f5ae2f70a7dd9f610c16552f8e
Author: Ben Kibbey <bjk at luxsci.net>
Date: Mon Jul 18 20:16:46 2016 -0400
Fix including nil bytes in keylist output.
* src/gpgme-tool.c (cmd_keylist,gt_result): use strlen().
Signed-off-by: Ben Kibbey <bjk at luxsci.net>
---
src/gpgme-tool.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c
index 080b306..5ad5b25 100644
--- a/src/gpgme-tool.c
+++ b/src/gpgme-tool.c
@@ -1725,9 +1725,9 @@ gt_result (gpgme_tool_t gt, unsigned int flags)
{
int indent = 2;
- gt_write_data (gt, xml_preamble1, sizeof (xml_preamble1));
+ gt_write_data (gt, xml_preamble1, strlen (xml_preamble1));
gt_write_data (gt, NULL, 0);
- gt_write_data (gt, xml_preamble2, sizeof (xml_preamble2));
+ gt_write_data (gt, xml_preamble2, strlen (xml_preamble2));
gt_write_data (gt, NULL, 0);
if (flags & GT_RESULT_ENCRYPT)
result_encrypt_to_xml (gt->ctx, indent,
@@ -1753,7 +1753,7 @@ gt_result (gpgme_tool_t gt, unsigned int flags)
if (flags & GT_RESULT_VFS_MOUNT)
result_vfs_mount_to_xml (gt->ctx, indent,
(result_xml_write_cb_t) gt_write_data, gt);
- gt_write_data (gt, xml_end, sizeof (xml_end));
+ gt_write_data (gt, xml_end, strlen (xml_end));
return 0;
}
@@ -2853,9 +2853,9 @@ cmd_keylist (assuan_context_t ctx, char *line)
}
pattern[idx] = NULL;
- gt_write_data (gt, xml_preamble1, sizeof (xml_preamble1));
+ gt_write_data (gt, xml_preamble1, strlen (xml_preamble1));
gt_write_data (gt, NULL, 0);
- gt_write_data (gt, xml_preamble2, sizeof (xml_preamble2));
+ gt_write_data (gt, xml_preamble2, strlen (xml_preamble2));
gt_write_data (gt, NULL, 0);
result_init (&state, indent, (result_xml_write_cb_t) gt_write_data, gt);
result_xml_tag_start (&state, "keylist", NULL);
@@ -2930,7 +2930,7 @@ cmd_keylist (assuan_context_t ctx, char *line)
}
result_xml_tag_end (&state); /* keylist */
- gt_write_data (gt, xml_end, sizeof (xml_end));
+ gt_write_data (gt, xml_end, strlen (xml_end));
server_reset_fds (server);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list