WINEDUMP: Make sure the component string is nul terminated.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

WINEDUMP: Make sure the component string is nul terminated.

Mike McCormack
ChangeLog:
Make sure the component string is nul terminated.

054a80a92f8e33a17cf3df85d63cd193dadb5404
diff --git a/tools/winedump/lnk.c b/tools/winedump/lnk.c
--- a/tools/winedump/lnk.c
+++ b/tools/winedump/lnk.c
@@ -364,7 +364,10 @@ static int dump_advertise_info(int fd, c
         comp = &avt->bufA[20];
         feat = strchr(comp,'>');
         if (feat)
+        {
             memcpy( comp_str, comp, feat - comp );
+            comp_str[feat-comp] = 0;
+        }
         else
             strcpy( prod_str, "?" );