Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rrdtool
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Diederik de Haas
rrdtool
Commits
9923a8c1
Verified
Commit
9923a8c1
authored
1 year ago
by
Diederik de Haas
Browse files
Options
Downloads
Patches
Plain Diff
d/patches: Add "Fix unsigned integer overflow in rrdtool first" patch
parent
f3ae95cd
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
debian/changelog
+1
-0
1 addition, 0 deletions
debian/changelog
debian/patches/Fix-unsigned-integer-overflow-in-rrdtool-first.patch
+35
-0
35 additions, 0 deletions
...ches/Fix-unsigned-integer-overflow-in-rrdtool-first.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
37 additions
and
0 deletions
debian/changelog
+
1
−
0
View file @
9923a8c1
...
...
@@ -22,6 +22,7 @@ rrdtool (1.8.0-1) UNRELEASED; urgency=medium
- "acinclude.m4: Include <stdlib.h> when using exit"
- "Update Version and Copyright year in git files"
- "Fix BUILD_DATE in rrdtool help output"
- "Fix unsigned integer overflow in rrdtool first"
-- Jean-Michel Vourgère <nirgal@debian.org> Mon, 21 Mar 2022 10:55:32 +0100
...
...
This diff is collapsed.
Click to expand it.
debian/patches/Fix-unsigned-integer-overflow-in-rrdtool-first.patch
0 → 100644
+
35
−
0
View file @
9923a8c1
From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= <c72578@yahoo.de>
Date: Fri, 1 Apr 2022 19:14:49 +0200
Subject: Fix unsigned integer overflow in rrdtool first
Origin: https://github.com/oetiker/rrdtool-1.x/commit/b74a0d64e00770384d025e40becdb2ed83c04c0c
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 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/rrd_first.c b/src/rrd_first.c
index 0e93397c..a696c5c3 100644
--- a/src/rrd_first.c
+++ b/src/rrd_first.c
@@ -113,7 +113,8 @@
time_t rrd_first_r(
then = (rrd.live_head->last_up -
rrd.live_head->last_up %
(rrd.rra_def[rraindex].pdp_cnt * rrd.stat_head->pdp_step)) +
- (timer * rrd.rra_def[rraindex].pdp_cnt * rrd.stat_head->pdp_step);
+ (timer * (long) rrd.rra_def[rraindex].pdp_cnt *
+ (long) rrd.stat_head->pdp_step);
err_close:
rrd_close(rrd_file);
err_free:
--
2.40.0
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
9923a8c1
...
...
@@ -4,3 +4,4 @@ translations
acinclude.m4-Include-stdlib.h-when-using-exit.patch
Update-Version-and-Copyright-year-in-git-files.patch
Fix-BUILD_DATE-in-rrdtool-help-output.patch
Fix-unsigned-integer-overflow-in-rrdtool-first.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment