mirror of
https://github.com/samba-team/samba.git
synced 2025-01-14 19:24:43 +03:00
util: fixed place where we could look one byte past end of string
We need to check the length before the value
This commit is contained in:
parent
3f5d535972
commit
dfa0b74516
@ -483,7 +483,7 @@ _PUBLIC_ char *strupper_talloc_n(TALLOC_CTX *ctx, const char *src, size_t n)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*src && n--) {
|
while (n-- && *src) {
|
||||||
size_t c_size;
|
size_t c_size;
|
||||||
codepoint_t c = next_codepoint_convenience(iconv_convenience, src, &c_size);
|
codepoint_t c = next_codepoint_convenience(iconv_convenience, src, &c_size);
|
||||||
src += c_size;
|
src += c_size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user