BUG/MINOR: pattern: a sample marked as const could be written
authorThierry Fournier <thierry.fournier@ozon.io>
Tue, 10 Nov 2020 19:51:36 +0000 (20:51 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 12 Nov 2020 14:19:43 +0000 (15:19 +0100)
commit9633f444ac3ae540f6ce5dd0b0880fb40fabe9d5
treea78b50fe3b6a1783deedd52f9cc832a6f097daf0
parent689d981541a4805760acd6a2ba1433dc3d3534b1
BUG/MINOR: pattern: a sample marked as const could be written

The functions add final 0 to string if the final 0 is not set,
but don't check the flag CONST. This patch duplicates the strings
if the final zero is not set and the string is CONST.

Should be backported until 2.2 (at least)

(cherry picked from commit a68affeaa9377f88f773ef62a9bb2541dfb672d3)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/pattern.c