Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37855399
en ru br
ALT Linux repos
S:0.42.6-alt5_12

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


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, '/'))
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin