[Mplayer-cvslog] CVS: 0_90 configure, 1.673, 1.674 playtree.c, 1.18, 1.19 subreader.c, 1.98, 1.99
Diego Biurrun CVS
syncmail at mplayerhq.hu
Thu Jul 1 12:22:29 CEST 2004
CVS change done by Diego Biurrun CVS
Update of /cvsroot/mplayer/0_90
In directory mail:/var2/tmp/cvs-serv26448
Modified Files:
configure playtree.c subreader.c
Log Message:
string handling security fixes ported from main
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/0_90/configure,v
retrieving revision 1.673
retrieving revision 1.674
diff -u -r1.673 -r1.674
--- configure 9 Aug 2003 12:11:59 -0000 1.673
+++ configure 1 Jul 2004 10:22:26 -0000 1.674
@@ -2250,6 +2250,35 @@
echores "$_strsep"
+echocheck "strlcpy()"
+cat > $TMPC << EOF
+#include <string.h>
+int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
+EOF
+_strlcpy=no
+cc_check && _strlcpy=yes
+if test "$_strlcpy" = yes ; then
+ _def_strlcpy='#define HAVE_STRLCPY 1'
+else
+ _def_strlcpy='#undef HAVE_STRLCPY'
+fi
+echores "$_strlcpy"
+
+echocheck "strlcat()"
+cat > $TMPC << EOF
+#include <string.h>
+int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
+EOF
+_strlcat=no
+cc_check && _strlcat=yes
+if test "$_strlcat" = yes ; then
+ _def_strlcat='#define HAVE_STRLCAT 1'
+else
+ _def_strlcat='#undef HAVE_STRLCAT'
+fi
+echores "$_strlcat"
+
+
echocheck "vsscanf()"
cat > $TMPC << EOF
#include <stdarg.h>
@@ -5263,6 +5292,18 @@
/* Define this if your system has strsep */
$_def_strsep
+/* Define this if your system has strlcpy */
+$_def_strlcpy
+#ifndef HAVE_STRLCPY
+unsigned int strlcpy (char *dest, char *src, unsigned int size);
+#endif
+
+/* Define this if your system has strlcat */
+$_def_strlcat
+#ifndef HAVE_STRLCAT
+unsigned int strlcat (char *dest, char *src, unsigned int size);
+#endif
+
/* Define this if your system has vsscanf */
$_def_vsscanf
Index: playtree.c
===================================================================
RCS file: /cvsroot/mplayer/0_90/playtree.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- playtree.c 5 Feb 2003 23:02:05 -0000 1.18
+++ playtree.c 1 Jul 2004 10:22:26 -0000 1.19
@@ -986,7 +986,7 @@
void pt_add_gui_file(play_tree_t** ppt, char* path, char* file)
{
- char* wholename = malloc(strlen(path)+strlen(file)+3);
+ char* wholename = malloc(strlen(path)+strlen(file)+2);
if (wholename)
{
Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/0_90/subreader.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- subreader.c 7 Feb 2003 21:12:50 -0000 1.98
+++ subreader.c 1 Jul 2004 10:22:26 -0000 1.99
@@ -997,7 +997,7 @@
while (l){
char *ip = icbuffer;
char *op = sub->text[--l];
- strcpy(ip, op);
+ strlcpy(ip, op, ICBUFFSIZE);
ileft = strlen(ip);
oleft = ICBUFFSIZE - 1;
More information about the MPlayer-cvslog
mailing list