summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-03-21 10:33:20 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-03-21 10:33:20 -0700
commitc29940ca72ef114880317061d054ab97ffb87639 (patch)
tree27e300e72b0d833abb65768c28c6a2353b57a4d8
parentdb98a7e28b6af387ce1aa8645eb7385d2f6096b3 (diff)
tests: Fix invalid buffer size
This was triggering an buffer read overflow with asan.
-rw-r--r--tests/test_parse.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_parse.cpp b/tests/test_parse.cpp
index 013bca9..cd3f9c0 100644
--- a/tests/test_parse.cpp
+++ b/tests/test_parse.cpp
@@ -1336,7 +1336,7 @@ TEST(parse_encoding_detect_auto_incomplete)
{ "<\x00\x00n/\x00>\x00", 8, encoding_utf16_le },
{ "\x00<n\x00\x00/\x00>", 8, encoding_utf16_be },
{ "<\x00?n/\x00>\x00", 8, encoding_utf16_le },
- { "\x00 ", 8, encoding_utf8 },
+ { "\x00 ", 2, encoding_utf8 },
// <?xml encoding
{ "<?xmC encoding='latin1'?>", 25, encoding_utf8 },
{ "<?xBC encoding='latin1'?>", 25, encoding_utf8 },