mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
test/lsb/midi_event.c: check for buffer size check
Add a test to check that snd_midi_event_decode() checks its output buffer size. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This commit is contained in:
parent
61f5b8438b
commit
a7f744888e
1 changed files with 3 additions and 0 deletions
|
|
@ -145,6 +145,9 @@ static void test_decode(void)
|
|||
TEST_CHECK(DECODES_TO("f111"));
|
||||
TEST_CHECK(DECODES_TO("f111"));
|
||||
|
||||
/* buffer overflow */
|
||||
TEST_CHECK(snd_midi_event_decode(midi_event, buf, 1, &ev) == -ENOMEM);
|
||||
|
||||
snd_midi_event_free(midi_event);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue