]> git.alsa-project.org Git - alsa-utils.git/commit
aplay: Fix invalid file size check for non-regular files
authorTakashi Iwai <tiwai@suse.de>
Tue, 15 May 2018 20:17:01 +0000 (22:17 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 15 May 2018 20:17:01 +0000 (22:17 +0200)
commitda4d5bd53a1a57d1b39318b83d3280fbcd78e9f6
tree05e76a3bc9e04588ca0737af660a3d023f902605
parent9a6ab342038855fa798a9df741b687997b1f5e68
aplay: Fix invalid file size check for non-regular files

aplay tries to check the file size via fstat() at parsing the format
headers and avoids parsing when the size is shorter than the given
size.  This works fine for regular files, but when a special file like
pipe is passed, it fails, eventually leading to the fallback mode
wrongly.

A proper fix is to do this sanity check only for a regular file.

Reported-by: Jay Foster <jay@systech.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c