mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
BUG/MINOR: applet: Fix applet_getword() to not return one extra byte
applet_getword() function is returning one extra byte when a string is returned because the "ret" variable is not reset before the loop on the data. The patch also fixes applet_getline(). It is a 3.3-specific issue. No need to backport.
This commit is contained in:
parent
32f864e645
commit
bbf668a18a
@ -645,7 +645,7 @@ static inline int applet_getword(const struct appctx *appctx, char *str, int len
|
|||||||
}
|
}
|
||||||
|
|
||||||
p = b_head(buf);
|
p = b_head(buf);
|
||||||
|
ret = 0;
|
||||||
while (max) {
|
while (max) {
|
||||||
*str++ = *p;
|
*str++ = *p;
|
||||||
ret++;
|
ret++;
|
||||||
|
Loading…
Reference in New Issue
Block a user