[MPlayer-cvslog] CVS: main/libmpdemux asf_streaming.c,1.60,1.61
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Sun Mar 12 22:44:24 CET 2006
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv24733
Modified Files:
asf_streaming.c
Log Message:
fix feature pragma length check
Index: asf_streaming.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/asf_streaming.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- asf_streaming.c 6 Nov 2005 15:25:08 -0000 1.60
+++ asf_streaming.c 12 Mar 2006 21:44:22 -0000 1.61
@@ -680,15 +680,13 @@
pragma += 9;
end = strstr( pragma, "," );
if( end==NULL ) {
- size_t s = strlen(pragma);
- if(s > sizeof(features)) {
- mp_msg(MSGT_NETWORK,MSGL_WARN,MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma,pragma,s,sizeof(features));
- len = sizeof(features);
- } else {
- len = s;
- }
+ len = strlen(pragma);
} else {
- len = MIN((unsigned int)(end-pragma),sizeof(features));
+ len = (unsigned int)(end-pragma);
+ }
+ if(len > sizeof(features) - 1) {
+ mp_msg(MSGT_NETWORK,MSGL_WARN,MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma,pragma,s,sizeof(features));
+ len = sizeof(features) - 1;
}
strncpy( features, pragma, len );
features[len]='\0';
More information about the MPlayer-cvslog
mailing list