Aric Stewart : quartz: Check hr so we are not incrementing a NULL ( Coverity 106).

Alexandre Julliard julliard at winehq.org
Tue Oct 7 08:53:40 CDT 2008


Module: wine
Branch: master
Commit: a3c2c5080997817ae34064bfaf42a9ce2ba4cdac
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a3c2c5080997817ae34064bfaf42a9ce2ba4cdac

Author: Aric Stewart <aric at codeweavers.com>
Date:   Mon Oct  6 07:44:29 2008 -0500

quartz: Check hr so we are not incrementing a NULL (Coverity 106).

---

 dlls/quartz/filesource.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index d41899d..c862362 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -168,12 +168,10 @@ static HRESULT process_pattern_string(LPCWSTR wszPatternString, IAsyncReader * p
     if (!(wszPatternString = strchrW(wszPatternString, ',')))
         hr = E_INVALIDARG;
 
-    wszPatternString++; /* skip ',' */
-
     if (hr == S_OK)
     {
-        for ( ; !isxdigitW(*wszPatternString) && (*wszPatternString != ','); wszPatternString++)
-            ;
+        wszPatternString++; /* skip ',' */
+        while (!isxdigitW(*wszPatternString) && (*wszPatternString != ',')) wszPatternString++;
 
         for (strpos = 0; isxdigitW(*wszPatternString) && (strpos/2 < ulBytes); wszPatternString++, strpos++)
         {




More information about the wine-cvs mailing list