mfplat: Fix early return from GetString() (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-04-06 22:02:39 +03:00 committed by Alexandre Julliard
parent 63352b5cce
commit 53f0a25e6d

View file

@ -1260,9 +1260,9 @@ HRESULT attributes_GetString(struct attributes *attributes, REFGUID key, WCHAR *
*length = len; *length = len;
if (size <= len) if (size <= len)
return STRSAFE_E_INSUFFICIENT_BUFFER; hr = STRSAFE_E_INSUFFICIENT_BUFFER;
else
memcpy(value, attribute->value.u.pwszVal, (len + 1) * sizeof(WCHAR)); memcpy(value, attribute->value.u.pwszVal, (len + 1) * sizeof(WCHAR));
} }
else else
hr = MF_E_INVALIDTYPE; hr = MF_E_INVALIDTYPE;