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.

(cherry picked from commit ca925c9c28934739311210a1cc5e19fab972c5fa)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
2 files changed