From: Michael R. <mr...@us...> - 2004-07-27 18:06:54
|
Update of /cvsroot/xine/xine-lib/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16514/misc Modified Files: cdda_server.c libdvdcss-1.2.6-network.patch Log Message: from the docs of sprintf: "when the strings overlap, the behaviour is undefined" (actually it works with glibc and sprintf, but not with snprintf) Index: cdda_server.c =================================================================== RCS file: /cvsroot/xine/xine-lib/misc/cdda_server.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- cdda_server.c 25 Jul 2004 17:06:03 -0000 1.3 +++ cdda_server.c 27 Jul 2004 18:06:45 -0000 1.4 @@ -317,7 +317,7 @@ /* Each line sent is '\n' terminated */ if((buf[strlen(buf)] == '\0') && (buf[strlen(buf) - 1] != '\n')) - sprintf(buf, "%s%c", buf, '\n'); + strcat(buf, "\n"); return sock_data_write(socket, buf, strlen(buf)); } Index: libdvdcss-1.2.6-network.patch =================================================================== RCS file: /cvsroot/xine/xine-lib/misc/libdvdcss-1.2.6-network.patch,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- libdvdcss-1.2.6-network.patch 25 Jul 2004 17:06:07 -0000 1.2 +++ libdvdcss-1.2.6-network.patch 27 Jul 2004 18:06:45 -0000 1.3 @@ -432,7 +432,7 @@ + + /* Each line sent is '\n' terminated */ + if((buf[strlen(buf)] == '\0') && (buf[strlen(buf) - 1] != '\n')) -+ sprintf(buf, "%s%c", buf, '\n'); ++ strcat(buf, "\n"); + + if( sock_data_write(socket, buf, strlen(buf)) < (int)strlen(buf) ) + { |