[PATCH 6/9] Fix invalid read before allocated block (Valgrind)
Nikolay Sivov
nsivov at codeweavers.com
Sun Jan 23 05:13:01 CST 2011
---
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);
--
1.5.6.5
--------------090206000109030409060707--
More information about the wine-patches
mailing list