File bsc-1240971.patch of Package haproxy.38224
--- haproxy-2.8.11+git0.01c1056a4/src/sample.c.orig 2025-04-09 10:24:27.422779696 +0200
+++ haproxy-2.8.11+git0.01c1056a4/src/sample.c 2025-04-09 10:24:59.790958045 +0200
@@ -2754,7 +2754,7 @@ static int sample_conv_regsub(const stru
output->data = exp_replace(output->area, output->size, start, arg_p[1].data.str.area, pmatch);
/* replace the matching part */
- max = output->size - output->data;
+ max = trash->size - trash->data;
if (max) {
if (max > output->data)
max = output->data;