[FFmpeg-cvslog] nsvdec: Propagate errors
Alex Converse
git at videolan.org
Fri May 11 22:33:52 CEST 2012
ffmpeg | branch: release/0.5 | Alex Converse <alex.converse at gmail.com> | Thu Jan 26 17:23:09 2012 -0800| [ec4979e16e119e9ccb42b111008e74b9bc667428] | committer: Reinhard Tartler
nsvdec: Propagate errors
Related to CVE-2011-3940.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit c898431ca5ef2a997fe9388b650f658fb60783e5)
Conflicts:
libavformat/nsvdec.c
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
(cherry picked from commit 0100c4b1b0736e0f5b3c98f9b0ab8acbef574888)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
(cherry picked from commit 3253dd2b420583a7f10afa87e47b9cb73e950e2a)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec4979e16e119e9ccb42b111008e74b9bc667428
---
libavformat/nsvdec.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index 9e5f38d..25b3d6c 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -511,11 +511,16 @@ static int nsv_read_header(AVFormatContext *s, AVFormatParameters *ap)
for (i = 0; i < NSV_MAX_RESYNC_TRIES; i++) {
if (nsv_resync(s) < 0)
return -1;
- if (nsv->state == NSV_FOUND_NSVF)
+ if (nsv->state == NSV_FOUND_NSVF) {
err = nsv_parse_NSVf_header(s, ap);
+ if (err < 0)
+ return err;
+ }
/* we need the first NSVs also... */
if (nsv->state == NSV_FOUND_NSVS) {
err = nsv_parse_NSVs_header(s, ap);
+ if (err < 0)
+ return err;
break; /* we just want the first one */
}
}
More information about the ffmpeg-cvslog
mailing list