[PATCH] Fix bug in arecord --max-file-time where the file size could overflow 32 bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Scott Gilliland <scott.gilliland@xxxxxxxxxx>

Fix bug in arecord --max-file-time where the file size could overflow 32 bits

Signed-off-by: Scott Gilliland <scott.gilliland@xxxxxxxxxx>
---
 aplay/aplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.11.0
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux