From: Jaroslav Kysela Date: Sun, 2 Feb 2025 21:27:29 +0000 (+0100) Subject: seq: seq.c - fix calloc arguments X-Git-Tag: v1.2.14~28 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=305168fd22b4ed430b562d669da1d22c93f09d87;p=alsa-lib.git seq: seq.c - fix calloc arguments The usage was inverted. The first argument is count of elements, the second one is size of one element. Signed-off-by: Jaroslav Kysela --- diff --git a/src/seq/seq.c b/src/seq/seq.c index 1a40e8bb..d3af93f5 100644 --- a/src/seq/seq.c +++ b/src/seq/seq.c @@ -1356,7 +1356,7 @@ int snd_seq_set_input_buffer_size(snd_seq_t *seq, size_t size) if (size != seq->ibufsize) { char *newbuf; /* use ump event size for avoiding reallocation at switching */ - newbuf = calloc(sizeof(snd_seq_ump_event_t), size); + newbuf = calloc(size, sizeof(snd_seq_ump_event_t)); if (newbuf == NULL) return -ENOMEM; free(seq->ibuf);