]> git.alsa-project.org Git - alsa-utils.git/commitdiff
aplay: Fix --max-file-time option 32 bits overflow
authorScott Gilliland <scott.gilliland@gatech.edu>
Fri, 23 Jun 2017 18:35:03 +0000 (18:35 +0000)
committerTakashi Iwai <tiwai@suse.de>
Mon, 26 Jun 2017 15:05:38 +0000 (17:05 +0200)
Fix bug in arecord --max-file-time where the file size could overflow
32 bits.

Signed-off-by: Scott Gilliland <scott.gilliland@gatech.edu>
Acked-by: John Sauter <John_Sauter@systemeyescomputerstore.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c

index f793c82a0a2537d26ed3ce94f15f8d27f9187a11..00af66246cad33fbd257f0d978524e8397028734 100644 (file)
@@ -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