Avoid segfaults on uninitialized data.

This commit is contained in:
Ferenc Wagner 2004-07-06 21:02:51 +00:00 committed by Alexandre Julliard
parent 8b3aeacfa3
commit 13414ae867
1 changed files with 2 additions and 2 deletions

View File

@ -812,7 +812,7 @@ static void test_ScCopyRelocProps(void)
pvProp.ulPropTag, buffer + sizeof(SPropValue) + sizeof(char*),
szTestA, sizeof(SPropValue) + sizeof(char*) + 5, sc,
lpResProp->Value.MVszA.cValues, lpResProp->ulPropTag,
lpResProp->Value.MVszA.lppszA[0], lpResProp->Value.MVszA.lppszA[0], ulCount);
lpResProp->Value.MVszA.lppszA[0], sc==S_OK?lpResProp->Value.MVszA.lppszA[0]:NULL, ulCount);
memcpy(buffer2, buffer, sizeof(buffer));
@ -838,7 +838,7 @@ static void test_ScCopyRelocProps(void)
pvProp.ulPropTag, buffer2 + sizeof(SPropValue) + sizeof(char*),
szTestA, sizeof(SPropValue) + sizeof(char*) + 5, sc,
lpResProp->Value.MVszA.cValues, lpResProp->ulPropTag,
lpResProp->Value.MVszA.lppszA[0], lpResProp->Value.MVszA.lppszA[0], ulCount);
lpResProp->Value.MVszA.lppszA[0], sc==S_OK?lpResProp->Value.MVszA.lppszA[0]:NULL, ulCount);
/* Native crashes with lpNew or lpOld set to NULL so skip testing this */
}