diff --git a/aplay/aplay.c b/aplay/aplay.c index 4346464..2f4e6ef 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "aconfig.h" #include "formats.h" #include "version.h" @@ -1173,6 +1174,8 @@ void playback_go(int fd, int loaded, u_long count, int rtype, char *name) format_change = 1; set_format(); + assert(loaded < buffer_size); + while (count) { l = loaded; loaded = 0;