[FFmpeg-cvslog] vmnc: Fail if bpp is not recognized instead of crashing.

Michael Niedermayer git at videolan.org
Wed Feb 29 06:41:52 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 29 06:21:44 2012 +0100| [6aca18a9a0b570b61d75ef351d3ca6bb104c04db] | committer: Michael Niedermayer

vmnc: Fail if bpp is not recognized instead of crashing.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6aca18a9a0b570b61d75ef351d3ca6bb104c04db
---

 libavcodec/vmnc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c
index 21141fa..ac0b825 100644
--- a/libavcodec/vmnc.c
+++ b/libavcodec/vmnc.c
@@ -484,6 +484,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
         break;
     default:
         av_log(avctx, AV_LOG_ERROR, "Unsupported bitdepth %i\n", c->bpp);
+        return AVERROR_PATCHWELCOME;
     }
 
     return 0;



More information about the ffmpeg-cvslog mailing list