]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a compile warning on OS X 10.6 and up
authorSebastian Hahn <sebastian@torproject.org>
Tue, 11 Oct 2011 00:25:00 +0000 (02:25 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Tue, 11 Oct 2011 00:25:00 +0000 (02:25 +0200)
src/common/util.c

index 9df7a5031f2f43d544cadac72acbbf3c10e7e18c..79e09e4f59db02a5205d811580826135ec77fc05 100644 (file)
@@ -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)) {