mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-14 01:37:56 +08:00
Problem: buffer overflow in new test case
Solution: fix it
This commit is contained in:
parent
ee9c0919e2
commit
117cbe690c
@ -126,11 +126,11 @@ void test_nested_topic_prefixes ()
|
|||||||
|
|
||||||
// Subscribe to other 3 (nested) topics
|
// Subscribe to other 3 (nested) topics
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (
|
TEST_ASSERT_SUCCESS_ERRNO (
|
||||||
zmq_setsockopt (subscriber, ZMQ_SUBSCRIBE, "xyz", strlen ("a")));
|
zmq_setsockopt (subscriber, ZMQ_SUBSCRIBE, "xyz", strlen ("xyz")));
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (
|
TEST_ASSERT_SUCCESS_ERRNO (
|
||||||
zmq_setsockopt (subscriber, ZMQ_SUBSCRIBE, "xy", strlen ("ab")));
|
zmq_setsockopt (subscriber, ZMQ_SUBSCRIBE, "xy", strlen ("xy")));
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (
|
TEST_ASSERT_SUCCESS_ERRNO (
|
||||||
zmq_setsockopt (subscriber, ZMQ_SUBSCRIBE, "x", strlen ("abc")));
|
zmq_setsockopt (subscriber, ZMQ_SUBSCRIBE, "x", strlen ("x")));
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL_INT (get_subscription_count (subscriber), 6);
|
TEST_ASSERT_EQUAL_INT (get_subscription_count (subscriber), 6);
|
||||||
TEST_ASSERT_EQUAL_INT (get_subscription_count (publisher), 6);
|
TEST_ASSERT_EQUAL_INT (get_subscription_count (publisher), 6);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user