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

Alexandre Julliard julliard at winehq.org
Thu May 2 16:45:09 CDT 2019


Module: wine
Branch: master
Commit: db8e2388d940f908db009f34f620da1ac8b46d07
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=db8e2388d940f908db009f34f620da1ac8b46d07

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed May  1 18:24:11 2019 -0500

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

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/setupapi/queue.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c
index 0775507..c6c3440 100644
--- a/dlls/setupapi/queue.c
+++ b/dlls/setupapi/queue.c
@@ -122,6 +122,7 @@ static void concat_W( WCHAR *buffer, const WCHAR *src1, const WCHAR *src2, const
         strcpyW( buffer, src1 );
         buffer += strlenW(buffer );
         if (buffer[-1] != '\\') *buffer++ = '\\';
+        *buffer = 0;
         if (src2) while (*src2 == '\\') src2++;
     }
 
@@ -130,6 +131,7 @@ static void concat_W( WCHAR *buffer, const WCHAR *src1, const WCHAR *src2, const
         strcpyW( buffer, src2 );
         buffer += strlenW(buffer );
         if (buffer[-1] != '\\') *buffer++ = '\\';
+        *buffer = 0;
         if (src3) while (*src3 == '\\') src3++;
     }
 




More information about the wine-cvs mailing list