diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 0dee7f329c..9a01705d9c 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -674,7 +674,7 @@ static int w64_read_header(AVFormatContext *s) uint32_t count, chunk_size, i; start = avio_tell(pb); - end = start + size; + end = start + FFALIGN(size, INT64_C(8)) - 24; count = avio_rl32(pb); for (i = 0; i < count; i++) {