[tor/master] Fix a compile warning on OS X 10.6 and up

11 Oct
2011
11 Oct
'11
2:01 a.m.
commit cce85c819b4a9c20562f7860cbe2a8020123ebff Author: Sebastian Hahn <sebastian@torproject.org> Date: Tue Oct 11 02:25:00 2011 +0200 Fix a compile warning on OS X 10.6 and up --- src/common/util.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/common/util.c b/src/common/util.c index 9df7a50..79e09e4 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -3894,7 +3894,9 @@ get_string_from_pipe(FILE *stream, char *buf_out, size_t count) char *retval; size_t len; - retval = fgets(buf_out, count, stream); + tor_assert(count <= INT_MAX); + + retval = fgets(buf_out, (int)count, stream); if (!retval) { if (feof(stream)) {
4988
Age (days ago)
4988
Last active (days ago)
0 comments
1 participants
participants (1)
-
nickm@torproject.org