From cce85c819b4a9c20562f7860cbe2a8020123ebff Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Tue, 11 Oct 2011 02:25:00 +0200 Subject: [PATCH] Fix a compile warning on OS X 10.6 and up --- src/common/util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/util.c b/src/common/util.c index 9df7a5031f..79e09e4f59 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)) {