diff options
author | Stefan Fritsch <sf@apache.org> | 2011-10-25 22:29:13 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-10-25 22:29:13 +0000 |
commit | 04ca93ecfff9e24a8d491eaaefb3e466f234c17b (patch) | |
tree | 6b5dc1754217a004190dcb2b119e92fb30c24452 /include/util_varbuf.h | |
parent | 1211292e7fa9c4466a47bd455e7fcbf055e1a0e4 (diff) | |
download | httpd-04ca93ecfff9e24a8d491eaaefb3e466f234c17b.tar.gz |
Limit ap_pregsub() to 64K, add ap_pregsub_ex() for longer strings and with
better error reporting. Modify ap_varbuf_regsub() to be similar to
ap_pregsub_ex().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1188950 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/util_varbuf.h')
-rw-r--r-- | include/util_varbuf.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/util_varbuf.h b/include/util_varbuf.h index dc55e2c90c..64637f3b4c 100644 --- a/include/util_varbuf.h +++ b/include/util_varbuf.h @@ -135,13 +135,17 @@ AP_DECLARE(char *) ap_varbuf_pdup(apr_pool_t *p, struct ap_varbuf *vb, * @param source The string that was originally matched to the regex * @param nmatch the nmatch returned from ap_pregex * @param pmatch the pmatch array returned from ap_pregex + * @param maxlen the maximum string length to append to vb + * @return APR_SUCCESS if successful * @note Just like ap_pregsub(), this function does not copy the part of * *source before the matching part (i.e. the first pmatch[0].rm_so * characters). */ -AP_DECLARE(void) ap_varbuf_regsub(struct ap_varbuf *vb, const char *input, - const char *source, size_t nmatch, - ap_regmatch_t pmatch[]); +AP_DECLARE(apr_status_t) ap_varbuf_regsub(struct ap_varbuf *vb, + const char *input, + const char *source, size_t nmatch, + ap_regmatch_t pmatch[], + apr_size_t maxlen); /** Read a line from an ap_configfile_t into an ap_varbuf. * @param vb pointer to the ap_varbuf struct |