diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-10-03 07:21:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-10-03 07:21:25 -0400 |
commit | b2802ae3c31e4b803427bbce4f8de78558660738 (patch) | |
tree | c7561c9e4293566a2eb87d8d743401ce8aaebd7c | |
parent | bca30bcb90a7c01eea453b1fdf2b6ba368500e03 (diff) | |
download | tor-b2802ae3c31e4b803427bbce4f8de78558660738.tar.gz tor-b2802ae3c31e4b803427bbce4f8de78558660738.zip |
util/map_anon_nofork: Add a cast to avoid passing -48 to memset
This fixes coverity CID 1454593, and bug 31948. Bug not in any
released version of Tor.
-rw-r--r-- | src/test/test_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 5024b23400..aebefe64c5 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -6197,7 +6197,7 @@ test_util_map_anon_nofork(void *arg) tor_munmap_anonymous(ptr, sz); ptr = tor_mmap_anonymous(sz, ANONMAP_NOINHERIT, &inherit); tt_ptr_op(ptr, OP_NE, 0); - memset(ptr, TEST_VALUE, sz); + memset(ptr, (uint8_t)TEST_VALUE, sz); tt_int_op(0, OP_EQ, pipe(pipefd)); pid_t child = fork(); |