]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: hbuf: treat unexpected escape sequences as literals
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 8 Jul 2026 06:24:19 +0000 (08:24 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 8 Jul 2026 06:27:49 +0000 (08:27 +0200)
commitff95f204ec9f938526eb383604f7e62d05b85de1
treed5cce29c982a943800fe902173d0c3f30823b0b1
parent1e1e780b7916a29fda9d65938591c92fbd6bf481
BUG/MINOR: hbuf: treat unexpected escape sequences as literals

When encountering an unexpected escape sequence, treat it as a literal
character instead of skipping it.

This is a deliberate choice for two reasons:

- to avoid a desynchronization between the h->data counter and the
  buffer content, which would otherwise leave uninitialized memory
  ("garbage") in the destination buffer;

- to ensure that an invalid configuration string triggers a parsing
  error immediately (fail-fast), rather than resulting in a silently
  malformed configuration.

Thank to @dirkmueller for having reported this issue.

No need to backport. huf arrived with this current version.
src/hbuf.c