From: Takashi Iwai Date: Thu, 13 Sep 2012 06:06:26 +0000 (+0200) Subject: test/chmap: Fix wrong malloc size X-Git-Tag: v1.0.27~42 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=58c45b30309a1dd255c8b9e5cb34398658867b81;p=alsa-lib.git test/chmap: Fix wrong malloc size Signed-off-by: Takashi Iwai --- diff --git a/test/chmap.c b/test/chmap.c index a566b1cf..d73ae736 100644 --- a/test/chmap.c +++ b/test/chmap.c @@ -118,7 +118,7 @@ static int set_chmap(snd_pcm_t *pcm, int format, int channels, int rate, } 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;