Re: [3/9] ole32: Validate pointer parameters in MkParseDisplayName.
Andrew Nguyen <anguyen(a)codeweavers.com> writes:
@@ -814,12 +814,53 @@ static void test_MkParseDisplayName(void) static const WCHAR wszDisplayNameProgId1[] = {'S','t','d','F','o','n','t',':',0}; static const WCHAR wszDisplayNameProgId2[] = {'@','S','t','d','F','o','n','t',0}; static const WCHAR wszDisplayNameProgIdFail[] = {'S','t','d','F','o','n','t',0}; + static const WCHAR wszEmpty[] = {0}; char szDisplayNameFile[256]; WCHAR wszDisplayNameFile[256]; + int i; + + const struct + { + LPBC pbc; + LPCOLESTR szDisplayName; + LPDWORD pchEaten; + LPMONIKER *ppmk; + } invalid_parameters[] = + { + {NULL, NULL, NULL, NULL}, + {NULL, NULL, NULL, &pmk}, + {NULL, NULL, &eaten, NULL}, + {NULL, NULL, &eaten, &pmk}, + {NULL, wszEmpty, NULL, NULL}, + {NULL, wszEmpty, NULL, &pmk}, + {NULL, wszEmpty, &eaten, NULL}, + {NULL, wszEmpty, &eaten, &pmk}, + {pbc, NULL, NULL, NULL}, + {pbc, NULL, NULL, &pmk}, + {pbc, NULL, &eaten, NULL}, + {pbc, NULL, &eaten, &pmk}, + {pbc, wszEmpty, NULL, NULL}, + {pbc, wszEmpty, NULL, &pmk}, + {pbc, wszEmpty, &eaten, NULL}, + {pbc, wszEmpty, &eaten, &pmk}, + };
This won't do what you want, there's nothing in pbc at this point. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard