aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_proxy_module.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2015-07-02 17:20:29 +0300
committerValentin Bartenev <vbart@nginx.com>2015-07-02 17:20:29 +0300
commitcd17f869cf2c9a72cf90e67afec0271a8ff12f10 (patch)
tree1138a8e304e294ed2ac4dadbe7d39649620c03cc /src/stream/ngx_stream_proxy_module.c
parent035732696d21e83ece031d520eb780dcf036a266 (diff)
downloadnginx-cd17f869cf2c9a72cf90e67afec0271a8ff12f10.tar.gz
nginx-cd17f869cf2c9a72cf90e67afec0271a8ff12f10.zip
Stream: fixed possible integer overflow in rate limiting.
Diffstat (limited to 'src/stream/ngx_stream_proxy_module.c')
-rw-r--r--src/stream/ngx_stream_proxy_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stream/ngx_stream_proxy_module.c b/src/stream/ngx_stream_proxy_module.c
index 761e5f708..c25d6a1b6 100644
--- a/src/stream/ngx_stream_proxy_module.c
+++ b/src/stream/ngx_stream_proxy_module.c
@@ -1062,7 +1062,7 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
break;
}
- if (size > (size_t) limit) {
+ if ((off_t) size > limit) {
size = (size_t) limit;
}
}