- Backport upstream fixes: cleanups, non-glibc build fixes, fixes and enhancements of pcm_file plugin, etc. 0010-remove-unnecessary-obsolete-compat-hsearch_r.c.patch 0011-local.h-include-sys-types.h-to-fix-issues-with-pcm.h.patch 0012-test-chmap-Add-missing-usage-text-for-s-option.patch 0013-include-global.h-don-t-define-timeval-and-timespec-s.patch 0014-conf.c-use-portable-way-to-initialize-recursive-mute.patch 0015-pcm_file-fix-SEGFAULT-if-file-option-is-missing-whil.patch 0016-pcm_file-fixed-memory-leak.patch 0017-pcm_file-don-t-touch-infile-on-playback-and-output-f.patch 0018-pcm_file-document-new-argument-to-snd_pcm_file_open.patch - Fix aborting in races at closing dmix streams (bnc#852446): 0019-dmix-Don-t-use-assert-and-abort.patch - Don't include modprobe.d hack for 12.2 and older distros, which seem broken on them OBS-URL: https://build.opensuse.org/request/show/208679 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=143
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 1919ee473d9bc6983f11327aef3ae76e923f41be Mon Sep 17 00:00:00 2001
|
|
From: Andrey Mazo <mazo@telum.ru>
|
|
Date: Sun, 17 Nov 2013 01:11:54 +0400
|
|
Subject: [PATCH] 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 | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
|
|
index 59504019d557..3d14090fd2ea 100644
|
|
--- a/src/pcm/pcm_file.c
|
|
+++ b/src/pcm/pcm_file.c
|
|
@@ -948,7 +948,7 @@ int _snd_pcm_file_open(snd_pcm_t **pcmp, const char *name,
|
|
err = snd_pcm_slave_conf(root, slave, &sconf, 0);
|
|
if (err < 0)
|
|
return err;
|
|
- if ((!fname || strlen(fname) == 0) && fd < 0 && !ifname) {
|
|
+ if ((!fname || strlen(fname) == 0) && fd < 0) {
|
|
snd_config_delete(sconf);
|
|
SNDERR("file is not defined");
|
|
return -EINVAL;
|
|
--
|
|
1.8.4.3
|
|
|