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
41a40680ce
commit
574d0d8211
@ -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 New Issue
Block a user