projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0d4ecc
)
tests: fix out-of-bounds memory access in bytereader unit test
author
Tim-Philipp Müller
<tim@centricular.com>
Thu, 30 Oct 2014 23:14:59 +0000
(23:14 +0000)
committer
Tim-Philipp Müller
<tim@centricular.com>
Thu, 30 Oct 2014 23:16:54 +0000
(23:16 +0000)
Caught by -fsanitize=address / libasan.
https://bugzilla.gnome.org/show_bug.cgi?id=739431
tests/check/libs/bytereader.c
patch
|
blob
|
history
diff --git
a/tests/check/libs/bytereader.c
b/tests/check/libs/bytereader.c
index 471e6a64b43b772b0c1da11b9c83daaec1503403..fd4f95dc0f17cfc080ef433d4fe678f2fab5735e 100644
(file)
--- a/
tests/check/libs/bytereader.c
+++ b/
tests/check/libs/bytereader.c
@@
-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));