From 3477c0de62ae18b7c1ed86ee0ed09af43c17972731005d26c39f236cff86d030 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 9 Sep 2013 17:03:13 +0000 Subject: [PATCH] Accepting request 198043 from home:tiwai:branches:multimedia:libs - Upstream fix: 0003-aplay-fix-two-off-by-one-errors.patch OBS-URL: https://build.opensuse.org/request/show/198043 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=90 --- 0003-aplay-fix-two-off-by-one-errors.patch | 38 ++++++++++++++++++++++ alsa-utils.changes | 6 ++++ alsa-utils.spec | 2 ++ 3 files changed, 46 insertions(+) create mode 100644 0003-aplay-fix-two-off-by-one-errors.patch diff --git a/0003-aplay-fix-two-off-by-one-errors.patch b/0003-aplay-fix-two-off-by-one-errors.patch new file mode 100644 index 0000000..58cddec --- /dev/null +++ b/0003-aplay-fix-two-off-by-one-errors.patch @@ -0,0 +1,38 @@ +From 719faff80962a5d93c09980673f08048ae58add6 Mon Sep 17 00:00:00 2001 +From: Jurgen Kramer +Date: Mon, 9 Sep 2013 12:02:29 +0200 +Subject: [PATCH] aplay: fix two off by one errors + +Attached patch for aplay fixes two off-by-one errors preventing usage +of the last available sample format. + +Signed-off-by: Takashi Iwai +--- + aplay/aplay.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/aplay/aplay.c b/aplay/aplay.c +index 89c6b06..e0631c4 100644 +--- a/aplay/aplay.c ++++ b/aplay/aplay.c +@@ -242,7 +242,7 @@ _("Usage: %s [OPTION]... [FILE]...\n" + ) + , command); + printf(_("Recognized sample formats are:")); +- for (k = 0; k < SND_PCM_FORMAT_LAST; ++k) { ++ for (k = 0; k <= SND_PCM_FORMAT_LAST; ++k) { + const char *s = snd_pcm_format_name(k); + if (s) + printf(" %s", s); +@@ -1114,7 +1114,7 @@ static void show_available_sample_formats(snd_pcm_hw_params_t* params) + snd_pcm_format_t format; + + fprintf(stderr, "Available formats:\n"); +- for (format = 0; format < SND_PCM_FORMAT_LAST; format++) { ++ for (format = 0; format <= SND_PCM_FORMAT_LAST; format++) { + if (snd_pcm_hw_params_test_format(handle, params, format) == 0) + fprintf(stderr, "- %s\n", snd_pcm_format_name(format)); + } +-- +1.8.4 + diff --git a/alsa-utils.changes b/alsa-utils.changes index 38c45f2..7e35223 100644 --- a/alsa-utils.changes +++ b/alsa-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 9 14:16:52 CEST 2013 - tiwai@suse.de + +- Upstream fix: + 0003-aplay-fix-two-off-by-one-errors.patch + ------------------------------------------------------------------- Fri Sep 6 10:02:34 CEST 2013 - tiwai@suse.de diff --git a/alsa-utils.spec b/alsa-utils.spec index d2ec1be..4fc41f2 100644 --- a/alsa-utils.spec +++ b/alsa-utils.spec @@ -60,6 +60,7 @@ Source1: 01beep.conf # upstream fix patches Patch1: 0001-alsactl-alsa-state.service-fix-typo-rkill-kill.patch Patch2: 0002-alsaloop-fix-wrong-alias-for-signal.h.patch +Patch3: 0003-aplay-fix-two-off-by-one-errors.patch # Patch99: alsa-utils-gettext-version-removal.diff Url: http://www.alsa-project.org/ @@ -77,6 +78,7 @@ sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am # patch -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 # %if %suse_version < 1020 %patch99 -p1