]> granicus.if.org Git - apache/commitdiff
mod_deflate: don't require <limits.h> by using APR_INT32_MAX instead of INT_MAX.
authorYann Ylavic <ylavic@apache.org>
Fri, 18 Jul 2014 17:21:16 +0000 (17:21 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 18 Jul 2014 17:21:16 +0000 (17:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1611725 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_deflate.c

index 0acc07db92acb4d66f5116411758ac93c7d82b28..bab19c69f3bac2b0ef41cdcdbbdd3ff46eb3dc3c 100644 (file)
@@ -50,8 +50,6 @@
 
 #include "zlib.h"
 
-#include <limits.h>     /* for INT_MAX */
-
 static const char deflateFilterName[] = "DEFLATE";
 module AP_MODULE_DECLARE_DATA deflate_module;
 
@@ -970,8 +968,8 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
             apr_bucket_delete(e);
             continue;
         }
-        if (len > INT_MAX) {
-            apr_bucket_split(e, INT_MAX);
+        if (len > APR_INT32_MAX) {
+            apr_bucket_split(e, APR_INT32_MAX);
             apr_bucket_read(e, &data, &len, APR_BLOCK_READ);
         }
 
@@ -1343,8 +1341,8 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
             if (!len) {
                 continue;
             }
-            if (len > INT_MAX) {
-                apr_bucket_split(bkt, INT_MAX);
+            if (len > APR_INT32_MAX) {
+                apr_bucket_split(bkt, APR_INT32_MAX);
                 apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ);
             }
 
@@ -1731,8 +1729,8 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
             apr_bucket_delete(e);
             continue;
         }
-        if (len > INT_MAX) {
-            apr_bucket_split(e, INT_MAX);
+        if (len > APR_INT32_MAX) {
+            apr_bucket_split(e, APR_INT32_MAX);
             apr_bucket_read(e, &data, &len, APR_BLOCK_READ);
         }