Bug 155382 - sysutils/xfce4-systemload-plugin: Memory size overflow when >3.5GB
Summary: sysutils/xfce4-systemload-plugin: Memory size overflow when >3.5GB
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Max Brazhnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 22:20 UTC by lichray
Modified: 2011-07-03 13:10 UTC (History)
0 users

See Also:


Attachments
file.diff (515 bytes, patch)
2011-03-08 22:20 UTC, lichray
no flags Details | Diff
xfce4-systemload-plugin_2.patch (2.24 KB, patch)
2011-05-18 04:06 UTC, lichray
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lichray 2011-03-08 22:20:08 UTC
In file panel-plugin/memswap.c , the author defined the *_pages
variables as int, which is long enough to represent the length of pages.
But he multiplied the total_pages by pagesize, so the overflow occurred.

Fix: Use the authors' own macro CONVERT(_pages), which casts the page length
into quad_t, to calculate the memory sizes.


Patch attached with submission follows:
How-To-Repeat: Starts xfce4-systemload-plugin on a system with more than 3.5GB real
memory, you will see a very huge number for the total memory (If the
used memory is larger than 3.5GB, no lucky).
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-03-08 22:20:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgollucci

pgollucci@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-03-08 22:20:25 UTC
Maintainer of sysutils/xfce4-systemload-plugin,

Please note that PR ports/155382 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/155382

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2011-03-08 22:20:27 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 lichray 2011-05-18 04:06:02 UTC
Maintainer timeout. Please just commit the patch included.
Comment 5 Philip M. Gollucci freebsd_committer freebsd_triage 2011-06-23 19:44:47 UTC
Responsible Changed
From-To: pgollucci->freebsd-ports-bugs

E-NO-TIME right now, back to pool
Comment 6 Max Brazhnikov freebsd_committer freebsd_triage 2011-07-03 12:31:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->makc

I'll take it.
Comment 7 Max Brazhnikov freebsd_committer freebsd_triage 2011-07-03 12:44:22 UTC
State Changed
From-To: feedback->open

Maintainer timeout
Comment 8 Max Brazhnikov freebsd_committer freebsd_triage 2011-07-03 13:04:47 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 9 dfilter service freebsd_committer freebsd_triage 2011-07-03 13:04:49 UTC
makc        2011-07-03 12:04:37 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/xfce4-systemload-plugin Makefile 
  Added files:
    sysutils/xfce4-systemload-plugin/files 
                                           patch-panel-plugin__memswap.c 
                                           patch-panel-plugin__uptime.c 
  Log:
  Fix reported memory size on systems with more than 3.5GB real memory.
  
  PR:             ports/155382
  Submitted by:   Zhihao Yuan <lichray at gmail.com>
  Approved by:    maintainer timeout (several months)
  
  Revision  Changes    Path
  1.37      +1 -1      ports/sysutils/xfce4-systemload-plugin/Makefile
  1.1       +13 -0     ports/sysutils/xfce4-systemload-plugin/files/patch-panel-plugin__memswap.c (new)
  1.1       +11 -0     ports/sysutils/xfce4-systemload-plugin/files/patch-panel-plugin__uptime.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"