Group :: Sciences/Other
RPM: pd
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: pd-0.42-6-fix_strncpy_usage.patch
Download
Download
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, '/'))