]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mqtt: Fix parser for string with more than 127 characters
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 28 Jun 2021 13:26:00 +0000 (15:26 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 28 Jun 2021 14:29:44 +0000 (16:29 +0200)
commitca925c9c28934739311210a1cc5e19fab972c5fa
tree1c52236ff400f8f9ba2e625064a6476074346c21
parent5bbfff107bb8b5bcb2d7985f0ec0769139c89235
BUG/MINOR: mqtt: Fix parser for string with more than 127 characters

Parsing of too long strings (> 127 characters) was buggy because of a wrong
cast on the length bytes. To fix the bug, we rely on mqtt_read_2byte_int()
function. This way, the string length is properly decoded.

This patch should partely fix the issue #1310. It must be backported to 2.4.
reg-tests/converter/mqtt.vtc
src/mqtt.c