msxml3: Fix invalid read before allocated block (Valgrind).
This commit is contained in:
parent
8e1755aa49
commit
952f0a6af4
|
@ -534,8 +534,8 @@ static inline xmlChar* trim_whitespace(xmlChar* str)
|
|||
while (*ret && isspace(*ret))
|
||||
++ret;
|
||||
len = xmlStrlen(ret);
|
||||
while (isspace(ret[len-1]))
|
||||
--len;
|
||||
if (len)
|
||||
while (isspace(ret[len-1])) --len;
|
||||
|
||||
ret = xmlStrndup(ret, len);
|
||||
xmlFree(str);
|
||||
|
|
Loading…
Reference in New Issue