]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: hpack: be careful about integer promotion from uint8_t
authorWilly Tarreau <w@1wt.eu>
Fri, 1 Apr 2022 15:12:08 +0000 (17:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Apr 2022 15:29:06 +0000 (17:29 +0200)
commit17b4687a896fda6bc7c98494c727ab74793df060
tree6ba37bcdcc1ea8684b2d2d7aace1b2378f58ed41
parenteb2a2da67cd47ec0604834846c523948cc2ebc31
CLEANUP: hpack: be careful about integer promotion from uint8_t

As reported in issue #1635, there's a subtle sign change when shifting
a uint8_t value to the left because integer promotion first turns any
smaller type to signed int *even if it was unsigned*. A warning was
reported about uint8_t shifted left 24 bits that couldn't fit in int
due to this.

It was verified that the emitted code didn't change, as expected, but
at least this allows to silence the code checkers. There's no need to
backport this.
src/hpack-huff.c