diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-06-23 15:30:01 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-23 15:32:04 -0400 |
commit | b1ad1a1d0266a20bb0dac15e65abe7b65a74e8a0 (patch) | |
tree | f8199dbd96fcd0e613abcfc19bb54d46819e4ad9 /src/common/util.h | |
parent | d0243e82cfcdf6684283c37f20db2d999740bdf3 (diff) | |
download | tor-b1ad1a1d0266a20bb0dac15e65abe7b65a74e8a0.tar.gz tor-b1ad1a1d0266a20bb0dac15e65abe7b65a74e8a0.zip |
Resolve crash caused by format_helper_exit_status changes in #5557
Because the string output was no longer equal in length to
HEX_ERRNO_SIZE, the write() call would add some extra spaces and
maybe a NUL, and the NUL would trigger an assert in
get_string_from_pipe.
Fixes bug 6225; bug not in any released version of Tor.
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/util.h b/src/common/util.h index 6b7c6fb623..a2ab0ccac8 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -473,8 +473,8 @@ void tor_process_handle_destroy(process_handle_t *process_handle, int format_hex_number_for_helper_exit_status(unsigned int x, char *buf, int max_len); -void format_helper_exit_status(unsigned char child_state, - int saved_errno, char *hex_errno); +int format_helper_exit_status(unsigned char child_state, + int saved_errno, char *hex_errno); /* Space for hex values of child state, a slash, saved_errno (with leading minus) and newline (no null) */ |