mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-06 21:50:17 +00:00
BUG/MEDIUM: sample: Fix adjusting size in word converter
Adjust the size of the sample buffer before we change the "area"
pointer. Otherwise, we end up not changing the size, because the area
pointer is already the same as "start" before we compute the difference
between the two.
This is similar to the change in b28430591d
but for the word converter instead of field.
This commit is contained in:
parent
d8c195a326
commit
6a0d217628
@ -2596,13 +2596,14 @@ found:
|
||||
if (!smp->data.u.str.data)
|
||||
return 1;
|
||||
|
||||
smp->data.u.str.area = start;
|
||||
|
||||
/* Compute remaining size if needed
|
||||
Note: smp->data.u.str.size cannot be set to 0 */
|
||||
if (smp->data.u.str.size)
|
||||
smp->data.u.str.size -= start - smp->data.u.str.area;
|
||||
|
||||
smp->data.u.str.area = start;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user