vmnc: return error on decode_init() failure.

Message ID 20120229195836.258B35E0C7@aruru.libav.org
State New
Headers show

Commit Message

Janne Grunau Feb. 29, 2012, 7:58 p.m.
Module: libav
Branch: master
Commit: 07a180972fb369bb59bf6d4f8edb4598c51e80d2

Author:    Ronald S. Bultje <rsbultje@gmail.com>
Committer: Ronald S. Bultje <rsbultje@gmail.com>
Date:      Tue Feb 28 19:00:48 2012 -0800

vmnc: return error on decode_init() failure.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

---

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

Patch

diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c
index 8cc78fa..b1c4cbd 100644
--- a/libavcodec/vmnc.c
+++ b/libavcodec/vmnc.c
@@ -483,6 +483,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_INVALIDDATA;
     }
 
     return 0;