[PATCH 1/5] mfplat: Fix early return from GetString() (Coverity).
Nikolay Sivov
nsivov at codeweavers.com
Sat Apr 6 14:02:39 CDT 2019
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/mfplat/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index 8303bf2f74..13c48cfe23 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -1260,9 +1260,9 @@ HRESULT attributes_GetString(struct attributes *attributes, REFGUID key, WCHAR *
*length = len;
if (size <= len)
- return STRSAFE_E_INSUFFICIENT_BUFFER;
-
- memcpy(value, attribute->value.u.pwszVal, (len + 1) * sizeof(WCHAR));
+ hr = STRSAFE_E_INSUFFICIENT_BUFFER;
+ else
+ memcpy(value, attribute->value.u.pwszVal, (len + 1) * sizeof(WCHAR));
}
else
hr = MF_E_INVALIDTYPE;
--
2.20.1
More information about the wine-devel
mailing list