mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-13 10:50:16 -04: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
41a40680ce
commit
574d0d8211
1 changed files with 1 additions and 1 deletions
|
|
@ -645,7 +645,7 @@ static inline int applet_getword(const struct appctx *appctx, char *str, int len
|
|||
}
|
||||
|
||||
p = b_head(buf);
|
||||
|
||||
ret = 0;
|
||||
while (max) {
|
||||
*str++ = *p;
|
||||
ret++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue