Commit 86724af0 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

setupapi: Handle an empty string for the source file in SetupQueueCopySection().

parent 42be0b77
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment