diff options
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r-- | src/microhttpd/response.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index f4dc361c..a77dbe27 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -546,9 +546,17 @@ pipe_reader (void *cls, | |||
546 | ssize_t n; | 546 | ssize_t n; |
547 | 547 | ||
548 | (void) pos; | 548 | (void) pos; |
549 | #ifndef _WIN32 | ||
550 | if (SSIZE_MAX < max) | ||
551 | max = SSIZE_MAX; | ||
552 | #else /* _WIN32 */ | ||
553 | if (UINT_MAX < max) | ||
554 | max = UINT_MAX; | ||
555 | #endif /* _WIN32 */ | ||
556 | |||
549 | n = read (response->fd, | 557 | n = read (response->fd, |
550 | buf, | 558 | buf, |
551 | max); | 559 | (MHD_SCKT_SEND_SIZE_) max); |
552 | if (0 == n) | 560 | if (0 == n) |
553 | return MHD_CONTENT_READER_END_OF_STREAM; | 561 | return MHD_CONTENT_READER_END_OF_STREAM; |
554 | if (n < 0) | 562 | if (n < 0) |