Bug 192630 - [patch] databases/rrdtool: rrdupdate crash on amd64 systems
[patch] databases/rrdtool: rrdupdate crash on amd64 systems
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
amd64 Any
: --- Affects Some People
Assigned To: Niclas Zeising
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-13 01:30 UTC by Henry Hu
Modified: 2014-08-30 19:01 UTC (History)
0 users

See Also:


Attachments
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
https://github.com/oetiker/rrdtool-1.x/commit/d0bd4217d9fb69db9f94363087936cf93fa9b4ea
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

Log:
  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>

Changes:
  head/databases/rrdtool/Makefile
  head/databases/rrdtool/files/patch-src__rrdupdate.c
Comment 3 Niclas Zeising freebsd_committer 2014-08-30 19:01:48 UTC
Fixed, thanks!