mod_curltest: fix allocation size

It wasn't causing an issue with current usage.

Found by Codex Security

Follow-up to 35cfb081d2 #16541

Closes #20994
This commit is contained in:
Viktor Szakats 2026-03-19 00:53:00 +01:00
parent 6c0772fd7f
commit 3bc6ae5500
No known key found for this signature in database

View file

@ -420,7 +420,7 @@ static int curltest_tweak_handler(request_rec *r)
if(x_hd_len > 0) {
int i, hd_len = (16 * 1024);
int n = (x_hd_len / hd_len);
char *hd_val = apr_palloc(r->pool, x_hd_len);
char *hd_val = apr_palloc(r->pool, hd_len);
memset(hd_val, 'X', hd_len);
hd_val[hd_len - 1] = 0;
for(i = 0; i < n; ++i) {