mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
tests: fix out-of-bounds memory access in bytereader unit test
Caught by -fsanitize=address / libasan. https://bugzilla.gnome.org/show_bug.cgi?id=739431
This commit is contained in:
parent
e0d4eccc1e
commit
34abd91e90
1 changed files with 2 additions and 1 deletions
|
@ -722,7 +722,8 @@ GST_START_TEST (test_sub_reader)
|
|||
fail_unless_equals_int (gst_byte_reader_get_remaining (&sub), 13);
|
||||
fail_unless (gst_byte_reader_peek_data (&reader, 13, &data));
|
||||
fail_unless (gst_byte_reader_peek_data (&sub, 13, &sub_data));
|
||||
fail_unless (memcmp (data, sub_data, 16) == 0);
|
||||
fail_unless (memcmp (data, sub_data, 13) == 0);
|
||||
fail_unless (memcmp (memdata + 3, sub_data, 13) == 0);
|
||||
|
||||
fail_unless_equals_int (gst_byte_reader_get_remaining (&reader), 13);
|
||||
fail_unless (gst_byte_reader_peek_sub_reader (&reader, &sub, 3));
|
||||
|
|
Loading…
Reference in a new issue