[tor-commits] [tor/master] Fix a compile warning on OS X 10.6 and up
nickm at torproject.org
nickm at torproject.org
Tue Oct 11 02:01:07 UTC 2011
commit cce85c819b4a9c20562f7860cbe2a8020123ebff
Author: Sebastian Hahn <sebastian at 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)) {
More information about the tor-commits
mailing list