/* proxy_util.c */
-PROXY_DECLARE(apr_status_t) ap_proxy_strncpy(char *dst, const char *src, size_t dlen);
+PROXY_DECLARE(apr_status_t) ap_proxy_strncpy(char *dst, const char *src,
+ apr_size_t dlen);
PROXY_DECLARE(int) ap_proxy_hex2c(const char *x);
PROXY_DECLARE(void) ap_proxy_c2hex(int ch, char *x);
PROXY_DECLARE(char *)ap_proxy_canonenc(apr_pool_t *p, const char *x, int len, enum enctype t,
(request_rec *r, request_rec *pr), (r, pr),
OK, DECLINED)
-PROXY_DECLARE(apr_status_t) ap_proxy_strncpy(char *dst, const char *src, size_t dlen)
+PROXY_DECLARE(apr_status_t) ap_proxy_strncpy(char *dst, const char *src,
+ apr_size_t dlen)
{
if ((strlen(src)+1) > dlen) {
- /* APR_ENOSPACE would be better */
+ /* XXX: APR_ENOSPACE would be better */
return APR_EGENERAL;
}
else {
+ /* XXX: Once slen and dlen are known, no excuse not to memcpy */
apr_cpystrn(dst, src, dlen);
}
return APR_SUCCESS;
proxy_req_conf *rconf = ap_get_module_config(r->request_config,
&proxy_module);
struct proxy_alias *ent;
- size_t len = strlen(str);
+ apr_size_t len = strlen(str);
const char *newpath = NULL;
const char *newdomain = NULL;
const char *pathp;
const char *domainp;
const char *pathe = NULL;
const char *domaine = NULL;
- size_t l1, l2, poffs = 0, doffs = 0;
+ apr_size_t l1, l2, poffs = 0, doffs = 0;
int i;
int ddiff = 0;
int pdiff = 0;