1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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>
This commit is contained in:
Neal H. Walfield 2015-11-23 22:13:56 +01:00
parent b75e1b3d8b
commit 5b84b0d660
4 changed files with 22 additions and 8 deletions

View file

@ -64,7 +64,7 @@ int hextobyte (const char *s);
char *sanitize_buffer (const void *p, size_t n, int delim);
size_t utf8_charcount (const char *s);
size_t utf8_charcount (const char *s, int len);
#ifdef HAVE_W32_SYSTEM