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

Michael Niedermayer michaelni at gmx.at
Sun Nov 8 13:41:58 CET 2015


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;
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list