mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-31 14:39:55 +01:00
Merge pull request #4020 from bluca/fuzz_options
Problem: test_socket_options_fuzzer can pass non-NUL terminated data …
This commit is contained in:
commit
241240b79f
@ -43,6 +43,9 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
|
|||||||
void *s = test_context_socket (ZMQ_XPUB);
|
void *s = test_context_socket (ZMQ_XPUB);
|
||||||
int option;
|
int option;
|
||||||
|
|
||||||
|
// A lot of options expect a well-formatted string
|
||||||
|
((uint8_t *)data)[size - 1] = 0;
|
||||||
|
|
||||||
for (option = ZMQ_AFFINITY; option < ZMQ_BINDTODEVICE + 1; ++option) {
|
for (option = ZMQ_AFFINITY; option < ZMQ_BINDTODEVICE + 1; ++option) {
|
||||||
uint8_t out[512];
|
uint8_t out[512];
|
||||||
size_t out_size = 512;
|
size_t out_size = 512;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user