Bug 129326 - x11-clocks/asclock dies due to buffer overrun at startup
Summary: x11-clocks/asclock dies due to buffer overrun at startup
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: Dirk Meyer
Depends on:
Reported: 2008-12-01 08:30 UTC by G. Paul Ziemba
Modified: 2008-12-04 21:18 UTC (History)
0 users

See Also:

file.txt (2.99 KB, text/plain)
2008-12-01 08:30 UTC, G. Paul Ziemba
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description G. Paul Ziemba 2008-12-01 08:30:01 UTC
asclock dies immediately with error "not enough free color cells"

Fix: "not enough free color cells" is erroneously printed for any error returned by XpmCreatePixmapFromData, e.g., corrupt xpm data.

The actual cause of the error in this case was a buffer overrun when constructing the LED pixmap data.

Attached patch addresses several things:
1 - buffer overrun
2 - simplified bizarre method of printing with format %04X
3 - error messages match actual errors from XpmCreatePixmapFromData
4 - missing error test for one call to XpmCreatePixmapFromData

Patch attached with submission follows:
How-To-Repeat: $ asclock
not enough free color cells
Comment 1 Edwin Groothuis freebsd_committer 2008-12-01 08:30:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2008-12-04 20:57:57 UTC
dinoex      2008-12-04 20:57:48 UTC

  FreeBSD ports repository

  Modified files:
    x11-clocks/asclock   Makefile 
  Added files:
    x11-clocks/asclock/files patch-color 
  - fix buffer overrun at startup
  PR:             129326
  Submitted by:   G. Paul Ziemba
  Revision  Changes    Path
  1.23      +1 -1      ports/x11-clocks/asclock/Makefile
  1.1       +76 -0     ports/x11-clocks/asclock/files/patch-color (new)
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Dirk Meyer freebsd_committer 2008-12-04 21:18:22 UTC
State Changed
From-To: open->closed

committed, thanks.