[PATCH] dlls/msxml3: Using strlenW instead of SysStringLen to check node name length

Eric Lanz elanz at icarusstudios.com
Mon Mar 22 15:26:26 CDT 2010


Hello,

Decided to keep it simple for my first patch.  SysStringLen was returning 0 for bstrs from our updater application which caused the domdoc_createNode function to exit early even though the bstr actually contained a valid name.  It seems that other functions in this file use strlenW for this purpose which seems to always return the correct length.

Eric

-------------- next part --------------
From 6faacde29ca87b7b93897fd4eb2948d402f610fe Mon Sep 17 00:00:00 2001
From: Eric Lanz <Elanz at IcarusStudios.com>
Date: Mon, 22 Mar 2010 16:06:13 -0400
Subject: Using strlenW instead of SysStringLen to check node name length

---
 dlls/msxml3/domdoc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index aae8a34..b60df53 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -1368,7 +1368,7 @@ static HRESULT WINAPI domdoc_createNode(
     case NODE_ATTRIBUTE:
     case NODE_ENTITY_REFERENCE:
     case NODE_PROCESSING_INSTRUCTION:
-        if (!name || SysStringLen(name) == 0) return E_FAIL;
+        if (!name || strlenW(name) == 0) return E_FAIL;
     default:
         break;
     }
-- 
1.7.0



More information about the wine-devel mailing list