mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
Fix UTF8StringNormalize overrun on zero-length string
Detected by valgrind
This commit is contained in:
parent
df47eb24cd
commit
d0dd8616f1
1 changed files with 1 additions and 1 deletions
|
|
@ -1853,7 +1853,7 @@ UTF8StringNormalize(
|
|||
}
|
||||
nvalue.bv_val[nvalue.bv_len] = '\0';
|
||||
|
||||
} else {
|
||||
} else if ( nvalue.bv_len ) {
|
||||
/* string of all spaces is treated as one space */
|
||||
nvalue.bv_val[0] = ' ';
|
||||
nvalue.bv_val[1] = '\0';
|
||||
|
|
|
|||
Loading…
Reference in a new issue