Zebediah Figura : setupapi: Handle an empty string for the source file in SetupQueueCopySection().
Alexandre Julliard
julliard at winehq.org
Mon May 13 16:24:17 CDT 2019
Module: wine
Branch: master
Commit: 86724af01241b257a4b4b39682031c9c7a3aaeaa
URL: https://source.winehq.org/git/wine.git/?a=commit;h=86724af01241b257a4b4b39682031c9c7a3aaeaa
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Mon May 13 10:28:51 2019 -0500
setupapi: Handle an empty string for the source file in SetupQueueCopySection().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47185
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/setupapi/queue.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c
index f267380..cacab2d 100644
--- a/dlls/setupapi/queue.c
+++ b/dlls/setupapi/queue.c
@@ -795,6 +795,7 @@ BOOL WINAPI SetupQueueCopySectionW( HSPFILEQ queue, PCWSTR src_root, HINF hinf,
SP_FILE_COPY_PARAMS_W params;
INT flags;
BOOL ret = FALSE;
+ DWORD len;
TRACE("queue %p, src_root %s, hinf %p, hlist %p, section %s, style %#x.\n",
queue, debugstr_w(src_root), hinf, hlist, debugstr_w(section), style);
@@ -830,7 +831,7 @@ BOOL WINAPI SetupQueueCopySectionW( HSPFILEQ queue, PCWSTR src_root, HINF hinf,
if (!SetupGetStringFieldW( &context, 1, dst_file, ARRAY_SIZE( dst_file ), NULL ))
goto end;
- if (!SetupGetStringFieldW( &context, 2, src_file, ARRAY_SIZE( src_file ), NULL ))
+ if (!SetupGetStringFieldW( &context, 2, src_file, ARRAY_SIZE( src_file ), &len ) || len <= sizeof(WCHAR))
strcpyW( src_file, dst_file );
if (!SetupGetIntField( &context, 4, &flags )) flags = 0; /* FIXME */
More information about the wine-cvs
mailing list