macro: account for negative values in DECIMAL_STR_WIDTH()
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 13 Mar 2022 13:45:03 +0000 (14:45 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Apr 2022 16:37:25 +0000 (18:37 +0200)
commit25b3c48ec5203a1220daaf33b8df6e50e79fd74a
tree93530595643dff2669c7c32cdfb033b0b046687f
parent8f2f6a94d8793cc167665170c55cf151cee19cdb
macro: account for negative values in DECIMAL_STR_WIDTH()

With negative numbers we wouldn't account for the minus sign, thus
returning a string with one character too short, triggering buffer
overflows in certain situations.

(cherry picked from commit e3dd9ea8ea4510221f73071ad30ee657ca77565d)
src/basic/macro.h