From: Scott Gilliland Date: Fri, 23 Jun 2017 18:35:03 +0000 (+0000) Subject: aplay: Fix --max-file-time option 32 bits overflow X-Git-Tag: v1.1.5~7 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=a28ff22df8885a3d389901c18c96b45fce9e4fe2;p=alsa-utils.git aplay: Fix --max-file-time option 32 bits overflow Fix bug in arecord --max-file-time where the file size could overflow 32 bits. Signed-off-by: Scott Gilliland Acked-by: John Sauter Signed-off-by: Takashi Iwai --- diff --git a/aplay/aplay.c b/aplay/aplay.c index f793c82..00af662 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -3027,7 +3027,7 @@ static void capture(char *orig_name) if (count == 0) count = LLONG_MAX; /* compute the number of bytes per file */ - max_file_size = max_file_time * + max_file_size = (long long) max_file_time * snd_pcm_format_size(hwparams.format, hwparams.rate * hwparams.channels); /* WAVE-file should be even (I'm not sure), but wasting one byte