[FFmpeg-devel] [PATCH] check for invalid roq decoding (issue 2521) (original) (raw)
Michael Niedermayer michaelni
Mon Jan 10 02:13:38 CET 2011
- Previous message: [FFmpeg-devel] [PATCH] check for invalid roq decoding (issue 2521)
- Next message: [FFmpeg-devel] [PATCH] check for invalid roq decoding (issue 2521)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Jan 09, 2011 at 08:06:11PM -0500, Daniel Kang wrote:
On Sun, Jan 9, 2011 at 7:58 PM, Michael Niedermayer wrote:
> On Sun, Jan 09, 2011 at 05:59:34PM -0500, Daniel Kang wrote: > > ffmpeg does not check for invalid decoding (motion vector I believe) > > when decoding roq files. The patch attached adds a check for this. As > > with the fix for issue 2513 (r26279), ffmpeg will continue to decode > > when it encounters this error. > > > roqvideo.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > 9500ce3dabb508b67dad1f6a34b83fa4be1f8d0b roqinvaliddecodecheck.diff > > From 94559de1e80e66baf7cd8a803313b114d481825a Mon Sep 17 00:00:00 2001 > > From: Daniel Kang <daniel.d.kang at gmail.com> > > Date: Sun, 9 Jan 2011 17:44:09 -0500 > > Subject: [PATCH] Add check for invalid decode type > > > > --- > > libavcodec/roqvideo.c | 4 ++++ > > 1 files changed, 4 insertions(+), 0 deletions(-) > > > > diff --git a/libavcodec/roqvideo.c b/libavcodec/roqvideo.c > > index 830eb7b..bddd542 100644 > > --- a/libavcodec/roqvideo.c > > +++ b/libavcodec/roqvideo.c > > @@ -118,6 +118,10 @@ static inline void applymotiongeneric(RoqContext > *ri, int x, int y, int deltax > > for(cp = 0; cp < 3; cp++) {_ _> > int outstride = ri->currentframe->linesize[cp]; > > int instride = ri->lastframe ->linesize[cp]; > > + if (ri->lastframe->data[cp] == NULL) { > > + avlog(NULL, AVLOGERROR, "Invalid decode type. Invalid > header?\n"); > > + return; > > + } > > if one of them is 0 the others are 0 too
If that is the case, should I move the check outside the loop (e.g. check for ri->lastframe->data[0])?
thats probably the easiest option here. the alternative would be to allocate a last frame ...
[...]
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
DNS cache poisoning attacks, popular search engine, Google internet authority dont be evil, please -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110110/7097c248/attachment.pgp>
- Previous message: [FFmpeg-devel] [PATCH] check for invalid roq decoding (issue 2521)
- Next message: [FFmpeg-devel] [PATCH] check for invalid roq decoding (issue 2521)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]