]> git.kaiwu.me - nginx.git/commitdiff
Stream: fixed possible integer overflow in rate limiting.
authorValentin Bartenev <vbart@nginx.com>
Thu, 2 Jul 2015 14:20:29 +0000 (17:20 +0300)
committerValentin Bartenev <vbart@nginx.com>
Thu, 2 Jul 2015 14:20:29 +0000 (17:20 +0300)
src/stream/ngx_stream_proxy_module.c

index 761e5f70866e77ced90bfab0b28590aebf4e21c0..c25d6a1b6ebe0bf84d5071718684b2e561ceb061 100644 (file)
@@ -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;
                 }
             }