]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/internal.h
exr: fix out-of-bounds read
[ffmpeg] / libavcodec / internal.h
index 35b9630b52b7f7f3d4ed963633af6bc1f506efa4..c92dba472a0c895f6376a3e37279d48569eaf9ca 100644 (file)
@@ -262,7 +262,7 @@ static av_always_inline int64_t ff_samples_to_time_base(AVCodecContext *avctx,
 static av_always_inline float ff_exp2fi(int x) {
     /* Normal range */
     if (-126 <= x && x <= 128)
-        return av_int2float(x+127 << 23);
+        return av_int2float((x+127) << 23);
     /* Too large */
     else if (x > 128)
         return INFINITY;