]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/opusdec: check alignment, misalignment could lead to crashes with avx
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 24 May 2014 22:38:20 +0000 (00:38 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 24 May 2014 22:38:20 +0000 (00:38 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/opusdec.c

index 12c342c03c6a044b42d8524ddcf29e6854f206e1..b28edfbcd962bce33bc0983d1e09948072acd5c4 100644 (file)
@@ -240,6 +240,7 @@ static int opus_decode_frame(OpusStreamContext *s, const uint8_t *data, int size
             av_log(s->avctx, AV_LOG_ERROR, "Error resampling SILK data.\n");
             return samples;
         }
+        av_assert2((samples & 7) == 0);
         s->delayed_samples += s->packet.frame_duration - samples;
     } else
         ff_silk_flush(s->silk);