Sophie

Sophie

distrib > Mageia > 2 > i586 > by-pkgid > e21460f2675648c3124fec120938498e > files > 2

pd-0.42.6-2.mga2.src.rpm

Author: Paul Wise <pabs@debian.org>
Description: terminate strings properly before using strlen
--- a/src/t_tkcmd.c
+++ b/src/t_tkcmd.c
@@ -603,6 +603,7 @@
     pdgui_path = malloc(n+9);
 
     strncpy(pdgui_path, str, n);
+    pdgui_path[n] = 0;
     while (strlen(pdgui_path) > 0 && pdgui_path[strlen(pdgui_path)-1] == '/')
         pdgui_path[strlen(pdgui_path)-1] = 0;
     if (t = strrchr(pdgui_path, '/'))