summaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@g10code.com>2015-11-23 22:13:56 +0100
committerNeal H. Walfield <neal@g10code.com>2015-11-23 22:23:37 +0100
commit5b84b0d660c8329e184d98682665aaea7e1703d2 (patch)
tree7eb86d1423780c332b27daa9226e1144e451bcb3 /g10/gpg.c
parentdirmngr: Fix http lookups when libadns is used. (diff)
downloadgnupg2-5b84b0d660c8329e184d98682665aaea7e1703d2.tar.xz
gnupg2-5b84b0d660c8329e184d98682665aaea7e1703d2.zip
common: Extend utf8_charcount to include the string's length.
* common/stringhelp.c (utf8_charcount): Take additional parameter, len. Process at most LEN bytes. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 5ba3a205c..5c5afa690 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -1043,7 +1043,7 @@ build_list (const char *text, char letter,
if (maybe_setuid)
gcry_control (GCRYCTL_INIT_SECMEM, 0, 0); /* Drop setuid. */
- indent = utf8_charcount (text);
+ indent = utf8_charcount (text, -1);
len = 0;
init_membuf (&mb, 512);