From a693a53e2302fe9cc60c1b5d2bf59c42032b20a3 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 31 Dec 2019 15:09:20 -0800 Subject: fixes #1081 Use after free possible in stats fixes #1080 Desire better way to access statistics for NNG objects We've also added a test that uses some of this, in order to verify that the req protocol rejects invalid peers. --- tests/testutil.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/testutil.h') diff --git a/tests/testutil.h b/tests/testutil.h index b9acfedf..14cc1712 100644 --- a/tests/testutil.h +++ b/tests/testutil.h @@ -40,6 +40,11 @@ extern void testutil_sleep(int); // testutil_next_port returns a new port number (presumably unique) extern uint16_t testutil_next_port(void); +// testutil_scratch_addr makes a scratch address for the given scheme. +// The address buffer must be supplied, and the size should be at least +// 64 bytes to ensure no truncation occurs. +extern void testutil_scratch_addr(const char *, size_t, char *); + // testutil_marry connects two sockets using inproc. It uses socket // pipe hooks to ensure that it does not return before both sockets // are fully connected. -- cgit v1.2.3-70-g09d2