]> git.alsa-project.org Git - alsa-python.git/commit
alsaseq: fix 'ext' buffer fill
authorFrançois Laignel <fengalin@free.fr>
Sun, 7 Mar 2021 19:00:19 +0000 (20:00 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 31 May 2022 13:49:08 +0000 (15:49 +0200)
commita9e9bbf452fc364b13bc68c340004284678e4527
tree897d8dd8ef1565f1a7275ab8aa1dc3b242337e70
parenta1e64cc703a8a33d3acecf5f46cd40bebab88936
alsaseq: fix 'ext' buffer fill

The `GETDICTEXT` macro used to perfom one pass on the provided int
list to check the actual item types brefore allocating and filling
the target buffer. The python list was not read again causing the
buffer to be filled with the last value read during the type check.

This patch performs the type check as well as buffer fill in one go.
The buffer is freed if an item is found to be of a wrong type.

Fixes: https://github.com/alsa-project/alsa-python/pull/3
Signed-off-by: François Laignel <fengalin@free.fr>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
pyalsa/alsaseq.c