Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2022-07-30 08:49:22 +08:00
commit 1822f2031e
3280 changed files with 281114 additions and 237673 deletions

View file

@ -11,7 +11,7 @@
********************************************************************
function:
last mod: $Id: decinfo.c 17276 2010-06-05 05:57:05Z tterribe $
last mod: $Id$
********************************************************************/
@ -20,6 +20,11 @@
#include <limits.h>
#include "decint.h"
/*Only used for fuzzing.*/
#if defined(HAVE_MEMORY_CONSTRAINT)
static const int MAX_FUZZING_WIDTH = 16384;
static const int MAX_FUZZING_HEIGHT = 16384;
#endif
/*Unpacks a series of octets from a given byte array into the pack buffer.
@ -55,8 +60,8 @@ static int oc_info_unpack(oc_pack_buf *_opb,th_info *_info){
/*verify we can parse this bitstream version.
We accept earlier minors and all subminors, by spec*/
if(_info->version_major>TH_VERSION_MAJOR||
_info->version_major==TH_VERSION_MAJOR&&
_info->version_minor>TH_VERSION_MINOR){
(_info->version_major==TH_VERSION_MAJOR&&
_info->version_minor>TH_VERSION_MINOR)){
return TH_EVERSION;
}
/*Read the encoded frame description.*/
@ -82,6 +87,11 @@ static int oc_info_unpack(oc_pack_buf *_opb,th_info *_info){
_info->fps_numerator==0||_info->fps_denominator==0){
return TH_EBADHEADER;
}
#if defined(HAVE_MEMORY_CONSTRAINT)
if(_info->frame_width>=MAX_FUZZING_WIDTH&&_info->frame_height>=MAX_FUZZING_HEIGHT){
return TH_EBADHEADER;
}
#endif
/*Note: The sense of pic_y is inverted in what we pass back to the
application compared to how it is stored in the bitstream.
This is because the bitstream uses a right-handed coordinate system, while