mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 08:37:04 +02:00
BUG/MAJOR: b_rew() must pass a signed offset to b_ptr()
Commit 13e66da
introduced b_rew() but passes -adv which is an unsigned
quantity on 64-bit platforms, causing the buffer to advance in the wrong
direction.
No backport is needed.
This commit is contained in:
parent
cde18fc1ba
commit
ab152a7eda
@ -313,7 +313,7 @@ static inline void b_rew(struct buffer *b, unsigned int adv)
|
|||||||
b->o -= adv;
|
b->o -= adv;
|
||||||
if (!b->o && !b->pipe)
|
if (!b->o && !b->pipe)
|
||||||
b->flags |= BF_OUT_EMPTY;
|
b->flags |= BF_OUT_EMPTY;
|
||||||
b->p = b_ptr(b, -adv);
|
b->p = b_ptr(b, (int)-adv);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the amount of bytes that can be written into the buffer at once,
|
/* Return the amount of bytes that can be written into the buffer at once,
|
||||||
|
Loading…
Reference in New Issue
Block a user