mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-16 20:06:06 -05:00
Make space for trailing NUL
This commit is contained in:
parent
bb6f9f4c53
commit
66368d28f4
1 changed files with 2 additions and 2 deletions
|
|
@ -252,8 +252,8 @@ struct berval * UTF8bvnormalize(
|
|||
last = i;
|
||||
|
||||
/* Allocate more space in out if necessary */
|
||||
if (len - i > outsize - outpos) {
|
||||
outsize = outsize + ((len - i) - (outsize - outpos));
|
||||
if (len - i >= outsize - outpos) {
|
||||
outsize += 1 + ((len - i) - (outsize - outpos));
|
||||
outtmp = (char *) realloc(out, outsize);
|
||||
if (outtmp == NULL) {
|
||||
free(out);
|
||||
|
|
|
|||
Loading…
Reference in a new issue