Update of /cvsroot/xine/xine-lib/src/input/libdvdnav
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13083/src/input/libdvdnav
Modified Files:
remap.c
Log Message:
Fix wrong length specification for strncat() calls.
Consolidated multiple strncat() calls to snprintf().
Index: remap.c
===================================================================
RCS file: /cvsroot/xine/xine-lib/src/input/libdvdnav/remap.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- remap.c 17 Sep 2006 13:01:08 -0000 1.5
+++ remap.c 8 Dec 2006 16:26:10 -0000 1.6
@@ -193,10 +193,7 @@
/* 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");
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Xine-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-cvslog