On 08/04/2012 02:51 AM, Anton Khirnov wrote:
> 
> On Wed,  1 Aug 2012 17:36:05 -0400, Justin Ruggles <justin.rugg...@gmail.com> 
> wrote:
>> Avoids using unsupported parameters and signed integer overflows.
>> ---
>>  libavformat/idcin.c |   19 +++++++++++++++++++
>>  1 files changed, 19 insertions(+), 0 deletions(-)
>>
>> diff --git a/libavformat/idcin.c b/libavformat/idcin.c
>> index 6a9b0ca..f278f42 100644
>> --- a/libavformat/idcin.c
>> +++ b/libavformat/idcin.c
>> @@ -68,6 +68,7 @@
>>   *       transmitting them to the video decoder
>>   */
>>  
>> +#include "libavutil/imgutils.h"
>>  #include "libavutil/intreadwrite.h"
>>  #include "avformat.h"
>>  #include "internal.h"
>> @@ -153,6 +154,24 @@ static int idcin_read_header(AVFormatContext *s)
>>      bytes_per_sample = avio_rl32(pb);
>>      channels = avio_rl32(pb);
>>  
>> +    if (av_image_check_size(width, height, 0, s) < 0)
> 
> Why not forward the error?
> 
> Otherwise LGTM

Because the error is AVERROR(EINVAL) which is not the correct error code
in this case.

-Justin

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to