diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2014-04-14 18:10:01 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2014-04-14 18:10:01 +0300 |
commit | f410a5e391deccc10838b363955fe823a336bc82 (patch) | |
tree | c9cdb77c340b3b5fbc92d285ef354250da966797 /lib/util.c | |
parent | 0f34b70c90afb487541448ae88ca99d7186e8150 (diff) | |
download | bemenu-f410a5e391deccc10838b363955fe823a336bc82.tar.gz bemenu-f410a5e391deccc10838b363955fe823a336bc82.tar.bz2 bemenu-f410a5e391deccc10838b363955fe823a336bc82.zip |
Make sure the text is null terminated.
Diffstat (limited to 'lib/util.c')
-rw-r--r-- | lib/util.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -279,6 +279,7 @@ size_t _bmUtf8RuneInsert(char **inOutString, size_t *inOutBufSize, size_t start, char *str = *inOutString + start; memmove(str + u8len, str, len - start); memcpy(str, rune, u8len); + (*inOutString)[len + u8len] = 0; if (outRuneWidth) *outRuneWidth = _bmUtf8RuneWidth(rune, u8len); |