Bug 192630 - [patch] databases/rrdtool: rrdupdate crash on amd64 systems
Summary: [patch] databases/rrdtool: rrdupdate crash on amd64 systems
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Niclas Zeising
Depends on:
Reported: 2014-08-13 01:30 UTC by Henry Hu
Modified: 2014-08-30 19:01 UTC (History)
0 users

See Also:

patch rrdupdate.c to fix the problem (970 bytes, text/plain)
2014-08-13 01:30 UTC, Henry Hu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2014-08-13 01:30:03 UTC
Created attachment 145745 [details]
patch rrdupdate.c to fix the problem

rrdupdate/rrdinfo in rrdtool crashes when executed.

The reason is that, in rrdupdate.c, basename() is used, but libgen.h is not included.
As a result, basename is implicitly declared. Its return type is considered as int, which only has 32 bits. On 64-bit systems, because its real return type is char*, the higher 32 bits would be cut off, and the return value is trashed.

The attached patch fixes this problem.

This has already been fixed upstream in
But there is no release after that.
Comment 1 John Marino freebsd_committer 2014-08-13 05:53:40 UTC
over to maintainer for approval
Comment 2 commit-hook freebsd_committer 2014-08-30 19:01:25 UTC
A commit references this bug:

Author: zeising
Date: Sat Aug 30 19:01:17 UTC 2014
New revision: 366668
URL: http://svnweb.freebsd.org/changeset/ports/366668

  Fix runtime on amd64

  Sorry for the portrevision churn, forgot this with previous commit.

  PR:		192630
  Submitted by:	Henry Hu <henry.hu.sh@gmail.com>

Comment 3 Niclas Zeising freebsd_committer 2014-08-30 19:01:48 UTC
Fixed, thanks!