Changeset 4af0262f in ffmpeg


Ignore:
Timestamp:
Dec 16, 2011, 7:23:38 PM (13 years ago)
Author:
Michael Niedermayer <michaelni@gmx.at>
Branches:
master
Children:
6d8e6fe
Parents:
7b92863f
git-author:
Shitiz Garg <mail-5deEcKV3Bynk1uMJSBkQmQ@public.gmane.org> (12/15/11 23:20:21)
git-committer:
Michael Niedermayer <michaelni@gmx.at> (12/16/11 19:23:38)
Message:

cljr: Check if width or height are positive integers

width and height might get passed as 0 and would cause floating point
exceptions in decode_frame.
Fixes bugzilla #149

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libavcodec/cljr.c

    r7b92863f r4af0262f  
    6161    if (p->data[0])
    6262        avctx->release_buffer(avctx, p);
     63
     64    if (avctx->height <= 0 || avctx->width <= 0) {
     65        av_log(avctx, AV_LOG_ERROR, "Invalid width or height\n");
     66        return AVERROR_INVALIDDATA;
     67    }
    6368
    6469    if (buf_size / avctx->height < avctx->width) {
Note: See TracChangeset for help on using the changeset viewer.