OSDN Git Service

pcm_file: fix SEGFAULT if file option is missing while infile is not.
authorAndrey Mazo <mazo@telum.ru>
Sat, 16 Nov 2013 21:11:54 +0000 (01:11 +0400)
committerTakashi Iwai <tiwai@suse.de>
Sun, 17 Nov 2013 09:15:26 +0000 (10:15 +0100)
commit1919ee473d9bc6983f11327aef3ae76e923f41be
tree18af75faff5bd117df6cf5ba9126557750669548
parentae035b7fe5620fcaf4f5ea33ecabcf93b8e056cd
pcm_file: fix SEGFAULT if file option is missing while infile is not.

Commit 5c5f1358123af69155267463a0b6254ad9cbecc4 requires both file and
infile options to be missing to report a failure.
In fact, only file option is mandatory and should be checked there.
Otherwise, NULL file triggers segfault in
snd_pcm_file_replace_fname() called from
snd_pcm_file_open_output_file().
infile option is optional, so don't report fatal error if it's missing.

Signed-off-by: Andrey Mazo <mazo@telum.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_file.c