Commit db8e2388 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

setupapi: Properly null-terminate the path in concat_W().

parent e8c4dbce
...@@ -122,6 +122,7 @@ static void concat_W( WCHAR *buffer, const WCHAR *src1, const WCHAR *src2, const ...@@ -122,6 +122,7 @@ static void concat_W( WCHAR *buffer, const WCHAR *src1, const WCHAR *src2, const
strcpyW( buffer, src1 ); strcpyW( buffer, src1 );
buffer += strlenW(buffer ); buffer += strlenW(buffer );
if (buffer[-1] != '\\') *buffer++ = '\\'; if (buffer[-1] != '\\') *buffer++ = '\\';
*buffer = 0;
if (src2) while (*src2 == '\\') src2++; if (src2) while (*src2 == '\\') src2++;
} }
...@@ -130,6 +131,7 @@ static void concat_W( WCHAR *buffer, const WCHAR *src1, const WCHAR *src2, const ...@@ -130,6 +131,7 @@ static void concat_W( WCHAR *buffer, const WCHAR *src1, const WCHAR *src2, const
strcpyW( buffer, src2 ); strcpyW( buffer, src2 );
buffer += strlenW(buffer ); buffer += strlenW(buffer );
if (buffer[-1] != '\\') *buffer++ = '\\'; if (buffer[-1] != '\\') *buffer++ = '\\';
*buffer = 0;
if (src3) while (*src3 == '\\') src3++; if (src3) while (*src3 == '\\') src3++;
} }
......
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