From 4169f9efdaeda8a60b5cfd464bd39b80a9dd2032 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Fri, 8 Dec 2006 16:26:10 +0000 Subject: Fix wrong length specification for strncat() calls. Consolidated multiple strncat() calls to snprintf(). CVS patchset: 8407 CVS date: 2006/12/08 16:26:10 --- src/input/libdvdnav/remap.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/input/libdvdnav/remap.c') diff --git a/src/input/libdvdnav/remap.c b/src/input/libdvdnav/remap.c index 86cf3a4ad..f2049ac06 100644 --- a/src/input/libdvdnav/remap.c +++ b/src/input/libdvdnav/remap.c @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: remap.c,v 1.5 2006/09/17 13:01:08 valtri Exp $ + * $Id: remap.c,v 1.6 2006/12/08 16:26:10 mshopf Exp $ */ #include @@ -193,10 +193,7 @@ remap_t* remap_loadmap( char *title) { /* Build the map filename */ home = getenv("HOME"); assert(home); - strncpy(fname, home, sizeof(fname)); - strncat(fname, "/.dvdnav/", sizeof(fname)); - strncat(fname, title, sizeof(fname)); - strncat(fname, ".map", sizeof(fname)); + snprintf (fname, sizeof(fname), "%s/.dvdnav/%s.map", home, title); /* Open the map file */ fp = fopen( fname, "r"); -- cgit v1.2.3