git.samba.org
/
kai
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
util: fixed place where we could look one byte past end of string
[kai/samba.git]
/
lib
/
util
/
charset
/
util_unistr.c
diff --git
a/lib/util/charset/util_unistr.c
b/lib/util/charset/util_unistr.c
index 024dc70acc2748a22b5825b9616f8e46a0d4af5e..045aa4a3e3f4922a4df2c86d13e33425b5d05ae1 100644
(file)
--- a/
lib/util/charset/util_unistr.c
+++ b/
lib/util/charset/util_unistr.c
@@
-483,7
+483,7
@@
_PUBLIC_ char *strupper_talloc_n(TALLOC_CTX *ctx, const char *src, size_t n)
return NULL;
}
- while (
*src && n--
) {
+ while (
n-- && *src
) {
size_t c_size;
codepoint_t c = next_codepoint_convenience(iconv_convenience, src, &c_size);
src += c_size;