[Mplayer-cvslog] CVS: main/input input.c,1.81,1.82
Alban Bedel CVS
albeu at mplayerhq.hu
Fri Aug 15 20:46:06 CEST 2003
- Previous message: [Mplayer-cvslog] CVS: main/libmenu menu_filesel.c,1.9,1.10
- Next message: [Mplayer-cvslog] CVS: main/libmpdemux stream_ftp.c,NONE,1.1 stream.c,1.68,1.69 asf_mmst_streaming.c,1.10,1.11 asf_streaming.c,1.39,1.40 network.c,1.84,1.85 network.h,1.17,1.18 stream_netstream.c,1.5,1.6 Makefile,1.66,1.67
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/input
In directory mail:/var/tmp.root/cvs-serv10913/input
Modified Files:
input.c
Log Message:
I've juste found a bug which prevent to load a file whose name contain
a quote ('). The menu simply execute a "loadfile '%p'" but when the %p
is replaced by the actual value, quotes in it are not escaped !
Moreover, mp_input_parse_cmd contain some code to unescape strings but
this code was placed after the string was copied in his final buffer.
So this patch correct this issue.
By Aurélien Jacobs
Index: input.c
===================================================================
RCS file: /cvsroot/mplayer/main/input/input.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- input.c 13 Aug 2003 16:29:26 -0000 1.81
+++ input.c 15 Aug 2003 18:45:08 -0000 1.82
@@ -601,14 +601,15 @@
break;
} else if(!e) e = ptr+strlen(ptr);
l = e-start;
- cmd->args[i].v.s = (char*)malloc((l+1)*sizeof(char));
- strncpy(cmd->args[i].v.s,start,l);
- cmd->args[i].v.s[l] = '\0';
ptr2 = start;
for(e = strchr(ptr2,'\\') ; e ; e = strchr(ptr2,'\\')) {
memmove(e,e+1,strlen(e));
ptr2 = e + 1;
+ l--;
}
+ cmd->args[i].v.s = (char*)malloc((l+1)*sizeof(char));
+ strncpy(cmd->args[i].v.s,start,l);
+ cmd->args[i].v.s[l] = '\0';
} break;
case -1:
ptr = NULL;
- Previous message: [Mplayer-cvslog] CVS: main/libmenu menu_filesel.c,1.9,1.10
- Next message: [Mplayer-cvslog] CVS: main/libmpdemux stream_ftp.c,NONE,1.1 stream.c,1.68,1.69 asf_mmst_streaming.c,1.10,1.11 asf_streaming.c,1.39,1.40 network.c,1.84,1.85 network.h,1.17,1.18 stream_netstream.c,1.5,1.6 Makefile,1.66,1.67
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list