urlmon: Fixed array size check (Coverity).

This commit is contained in:
Marcus Meissner 2011-06-27 13:21:40 +02:00 committed by Alexandre Julliard
parent 4d1a28b299
commit 5cf0b44d06

View file

@ -612,7 +612,7 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
if (!szURL || !ppmk)
return E_INVALIDARG;
if(dwFlags > sizeof(create_flags_map)/sizeof(*create_flags_map)) {
if(dwFlags >= sizeof(create_flags_map)/sizeof(*create_flags_map)) {
FIXME("Unsupported flags %x\n", dwFlags);
return E_INVALIDARG;
}
@ -665,7 +665,7 @@ HRESULT WINAPI CreateURLMonikerEx2(IMoniker *pmkContext, IUri *pUri, IMoniker **
if (!pUri || !ppmk)
return E_INVALIDARG;
if(dwFlags > sizeof(create_flags_map)/sizeof(*create_flags_map)) {
if(dwFlags >= sizeof(create_flags_map)/sizeof(*create_flags_map)) {
FIXME("Unsupported flags %x\n", dwFlags);
return E_INVALIDARG;
}