[MPlayer-dev-eng] [PATCH] fix avi demuxer problems (bug #277)
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Oct 21 23:05:23 CEST 2006
Hello,
Old code looks a bit weird, it considered all characters between '0' and
'Z' valid. I think '0'-'9', 'A'-'Z', 'a'-'z' makes more sense.
Unfortunately I do not know if this is really correct, so heavy testing
would be welcome. If you don't I'll just apply :-).
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libmpdemux/demux_avi.c
===================================================================
--- libmpdemux/demux_avi.c (revision 20343)
+++ libmpdemux/demux_avi.c (working copy)
@@ -81,7 +81,7 @@
static int valid_fourcc(unsigned int id){
unsigned char* fcc=(unsigned char*)(&id);
-#define FCC_CHR_CHECK(x) (x<48 || x>=96)
+#define FCC_CHR_CHECK(x) (x<'0' || (x>'9' && x<'A') || (x>'Z' && x<'a') || x>'z')
if(FCC_CHR_CHECK(fcc[0])) return 0;
if(FCC_CHR_CHECK(fcc[1])) return 0;
if(FCC_CHR_CHECK(fcc[2])) return 0;
More information about the MPlayer-dev-eng
mailing list