alsa/0022-test-chmap-Fix-wrong-malloc-size.patch
Takashi Iwai 8a90d87ca6 Accepting request 138456 from home:tiwai:branches:multimedia:libs
- backport from upstream tree:
  * lots of patches to support the new chmap API
  * fix segfault in rate plugin error path
  * add a couple of test programs
  * fix inifinte loop in htimestamp of dmix & co

OBS-URL: https://build.opensuse.org/request/show/138456
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=113
2012-10-17 08:17:46 +00:00

22 lines
631 B
Diff

From 58c45b30309a1dd255c8b9e5cb34398658867b81 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 13 Sep 2012 08:06:26 +0200
Subject: [PATCH 22/30] test/chmap: Fix wrong malloc size
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
test/chmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/test/chmap.c
+++ b/test/chmap.c
@@ -118,7 +118,7 @@ static int set_chmap(snd_pcm_t *pcm, int
}
if (setup_pcm(pcm, format, channels, rate))
return 1;
- map = malloc(sizeof(int) * channels + 1);
+ map = malloc(sizeof(int) * (channels + 1));
if (!map) {
printf("cannot malloc\n");
return 1;