[FFmpeg-cvslog] avcodec/shorten: More complete pred_order check

Michael Niedermayer git at videolan.org
Tue Jun 2 00:50:14 CEST 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Fri May 15 17:02:28 2015 +0200| [078ae8cbb7a2bebc851919c1f3056557d3631413] | committer: Michael Niedermayer

avcodec/shorten: More complete pred_order check

Fixes CID1239055

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 294469416d8193a28710d802bb0c46e5fa09fad7)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/shorten.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 7eb3ac4..587c22a 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -277,7 +277,7 @@ static int decode_subframe_lpc(ShortenContext *s, int command, int channel,
     if (command == FN_QLPC) {
         /* read/validate prediction order */
         pred_order = get_ur_golomb_shorten(&s->gb, LPCQSIZE);
-        if (pred_order > s->nwrap) {
+        if ((unsigned)pred_order > s->nwrap) {
             av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\n",
                    pred_order);
             return AVERROR(EINVAL);



More information about the ffmpeg-cvslog mailing list