Sebastian Lackner : quartz: Add check for NULL pointer in FileSource_Load.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Apr 29 11:05:58 CDT 2016
Module: wine
Branch: master
Commit: b28a8a31572ad3f322374df07e8194bebb423076
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b28a8a31572ad3f322374df07e8194bebb423076
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Thu Apr 28 21:56:50 2016 +0200
quartz: Add check for NULL pointer in FileSource_Load.
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/quartz/filesource.c | 3 +++
dlls/quartz/tests/avisplitter.c | 1 -
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index 1a2af44..f0f85fd 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -613,6 +613,9 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
TRACE("(%s, %p)\n", debugstr_w(pszFileName), pmt);
+ if (!pszFileName)
+ return E_POINTER;
+
/* open file */
/* FIXME: check the sharing values that native uses */
hFile = CreateFileW(pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
diff --git a/dlls/quartz/tests/avisplitter.c b/dlls/quartz/tests/avisplitter.c
index fe1069d..83415c2 100644
--- a/dlls/quartz/tests/avisplitter.c
+++ b/dlls/quartz/tests/avisplitter.c
@@ -252,7 +252,6 @@ static void test_filesourcefilter(void)
ok(olepath == NULL, "expected NULL, got %p\n", olepath);
hr = IFileSourceFilter_Load(filesource, NULL, NULL);
- todo_wine
ok(hr == E_POINTER, "expected E_POINTER, got %08x\n", hr);
hr = IFileSourceFilter_Load(filesource, path, NULL);
More information about the wine-cvs
mailing list