Module: wine Branch: master Commit: 952f0a6af43f9252d696953a99e37a4b5ba4a1fd URL: http://source.winehq.org/git/wine.git/?a=commit;h=952f0a6af43f9252d696953a99...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun Jan 23 14:13:01 2011 +0300
msxml3: Fix invalid read before allocated block (Valgrind).
---
dlls/msxml3/node.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index b2e5b16..08df8bd 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -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);