]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
Fix unsigned integer overflow in rrdtool first 1168/head
authorWolfgang Stöggl <c72578@yahoo.de>
Fri, 1 Apr 2022 17:14:49 +0000 (19:14 +0200)
committerWolfgang Stöggl <c72578@yahoo.de>
Fri, 1 Apr 2022 17:14:49 +0000 (19:14 +0200)
commitb74a0d64e00770384d025e40becdb2ed83c04c0c
treeced5aba1f01e79dfc221083e6735a3c85a782b20
parent9b342f9d3822fb27984b6038db63fe21d7236245
Fix unsigned integer overflow in rrdtool first

This fixes a signed/unsigned conversion bug in the calculation of
"then". Background info:
pdp_cnt and pdp_step are both unsigned long, whereas timer is signed.
When multiplying signed and unsigned integers (same size), a signed is
implicitly typecast to unsigned.

- A similar fix has already been applied to rrd_dump.c
  in commit e193975
- Resolves #1140
src/rrd_first.c