Skip to content
Snippets Groups Projects
Commit d0dd8616 authored by Howard Chu's avatar Howard Chu
Browse files

Fix UTF8StringNormalize overrun on zero-length string

Detected by valgrind
parent df47eb24
No related branches found
No related tags found
No related merge requests found
......@@ -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';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment