From: Sebastian Hahn Date: Tue, 11 Oct 2011 00:25:00 +0000 (+0200) Subject: Fix a compile warning on OS X 10.6 and up X-Git-Tag: tor-0.2.3.6-alpha~32^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cce85c819b4a9c20562f7860cbe2a8020123ebff;p=thirdparty%2Ftor.git Fix a compile warning on OS X 10.6 and up --- 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)) {