You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2022/04/27 06:43:11 UTC
svn commit: r1900307 - in /httpd/httpd/trunk: changes-entries/pr66034.txt modules/filters/mod_substitute.c
Author: rpluem
Date: Wed Apr 27 06:43:11 2022
New Revision: 1900307
URL: http://svn.apache.org/viewvc?rev=1900307&view=rev
Log:
* Use apr_size_t instead of int to avoid an overflow
PR: 66034
Added:
httpd/httpd/trunk/changes-entries/pr66034.txt (with props)
Modified:
httpd/httpd/trunk/modules/filters/mod_substitute.c
Added: httpd/httpd/trunk/changes-entries/pr66034.txt
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/changes-entries/pr66034.txt?rev=1900307&view=auto
==============================================================================
--- httpd/httpd/trunk/changes-entries/pr66034.txt (added)
+++ httpd/httpd/trunk/changes-entries/pr66034.txt Wed Apr 27 06:43:11 2022
@@ -0,0 +1,2 @@
+ *) mod_substitute: Fix an integer overflow that can happen in very special
+ setups. PR 66034 [Ruediger Pluem]
Propchange: httpd/httpd/trunk/changes-entries/pr66034.txt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: httpd/httpd/trunk/modules/filters/mod_substitute.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_substitute.c?rev=1900307&r1=1900306&r2=1900307&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_substitute.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_substitute.c Wed Apr 27 06:43:11 2022
@@ -309,7 +309,7 @@ static apr_status_t do_pattmatch(ap_filt
}
}
else if (script->regexp) {
- int left = bytes;
+ apr_size_t left = bytes;
const char *pos = buff;
char *repl;
apr_size_t space_left = cfg->max_line_length;