Browse Source

Merge remote-tracking branch 'sebastian/osxcompile'

Nick Mathewson 13 years ago
parent
commit
b5edc838f2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/common/util.c

+ 3 - 1
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)) {