From 2ebb66ed82bdb94920a1ea69451df437613df4c0 Mon Sep 17 00:00:00 2001 From: Mike Melanson Date: Sat, 28 Dec 2002 19:00:30 +0000 Subject: sanity check for certain header fields CVS patchset: 3712 CVS date: 2002/12/28 19:00:30 --- src/demuxers/demux_fli.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c index 9188436ba..3bf4e447c 100644 --- a/src/demuxers/demux_fli.c +++ b/src/demuxers/demux_fli.c @@ -22,7 +22,7 @@ * avoid while programming a FLI decoder, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_fli.c,v 1.32 2002/12/23 23:03:00 tmmm Exp $ + * $Id: demux_fli.c,v 1.33 2002/12/28 19:00:30 tmmm Exp $ */ #ifdef HAVE_CONFIG_H @@ -132,6 +132,11 @@ static int open_fli_file(demux_fli_t *this) { this->frame_pts_inc = this->speed * 90; } + /* sanity check: the FLI file must have non-zero values for width, height, + * and frame count */ + if ((!this->width) || (!this->height) || (!this->frame_count)) + return 0; + return 1; } -- cgit v1.2.3