advapi32/service.c -- remove untriggerable check

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sun Nov 18 10:54:06 CST 2007


>>>>> "Gerald" == Gerald Pfeifer <gerald at pfeifer.com> writes:

    Gerald> n is of type DWORD which is unsigned, so n < 0 always will
    Gerald> evaluate to false.

    Gerald> Gerald

    Gerald> ChangeLog: Remove untriggerable check.

    Gerald> Index: dlls/advapi32/service.c
    Gerald> ===================================================================
    Gerald> RCS file: /home/wine/wine/dlls/advapi32/service.c,v retrieving
    Gerald> revision 1.160 diff -u -3 -p -r1.160 service.c ---
    Gerald> dlls/advapi32/service.c 15 Oct 2007 16:29:59 -0000 1.160 +++
    Gerald> dlls/advapi32/service.c 18 Nov 2007 06:01:28 -0000 @@ -2107,9
    Gerald> +2107,6 @@ QueryServiceConfigW( SC_HANDLE hService, n -=
    Gerald> sizeof(WCHAR); }
 
    Gerald> - if( n < 0 ) - ERR("Buffer overflow!\n"); - TRACE("Image path =
    Gerald> %s\n", debugstr_w(lpServiceConfig->lpBinaryPathName) );
    Gerald> TRACE("Group = %s\n",
    Gerald> debugstr_w(lpServiceConfig->lpLoadOrderGroup) );
    Gerald> TRACE("Dependencies = %s\n",
    Gerald> debugstr_w(lpServiceConfig->lpDependencies) );

Is dropping the check the right answer? Shouldn't the check test for high
values like > 0xff00 and report a possible problem?
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the wine-devel mailing list