[FFmpeg-devel] [PATCH] avutil/softfloat: Assert that the exponent did not overflow the legal range in av_normalize1_sf()

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Fri Dec 11 17:06:04 CET 2015


On 11.12.2015 00:48, Michael Niedermayer wrote:
> On Mon, Nov 09, 2015 at 09:17:34PM +0100, Andreas Cadhalpun wrote:
>> On 08.11.2015 21:51, Andreas Cadhalpun wrote:
>>> On 08.11.2015 13:41, Michael Niedermayer wrote:
>>>> From: Michael Niedermayer <michael at niedermayer.cc>
>>>>
>>>> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
>>>> ---
>>>>  libavutil/softfloat.h |    1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h
>>>> index 023ccd0..ed1aab3 100644
>>>> --- a/libavutil/softfloat.h
>>>> +++ b/libavutil/softfloat.h
>>>> @@ -79,6 +79,7 @@ static inline av_const SoftFloat av_normalize1_sf(SoftFloat a){
>>>>          a.mant>>=1;
>>>>      }
>>>>      av_assert2(a.mant < 0x40000000 && a.mant > -0x40000000);
>>>> +    av_assert2(a.exp <= MAX_EXP);
>>>>      return a;
>>>>  #elif 1
>>>>      int t= a.mant + 0x40000000 < 0;
>>>>
>>>
>>> This assert would be triggered by more than 15% of my test samples for aac_fixed.
>>> So unless that changes, this assert shouldn't be added.
>>
>> I've sent a patch fixing this. Once the patch is applied, this assert should be fine.
> 
> i assume this has been fixed so ill apply this soon

Yes. For reference the commit fixing this is 0e36a14.

Best regards,
Andreas


More information about the ffmpeg-devel mailing list