msxml3: Fix invalid read before allocated block (Valgrind).

oldstable
Nikolay Sivov 2011-01-23 14:13:01 +03:00 committed by Alexandre Julliard
parent 8e1755aa49
commit 952f0a6af4
1 changed files with 2 additions and 2 deletions

View File

@ -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);