🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #98

Bug in epoch::read-pixmap-file : abort()'s if it's not an XPM file

#98
From: Michael Joosten
Date: Sun, 12 Apr 1992 18:35
34 lines
2017 bytes
Hello, while experimenting a bit with read-pixmap-file epoch-4.0p0 will surely
aboort if you read (mistakenly) a non XPM file, like a bitmap (btw: how to
read a bitmap file?). The reason was that the 'attribute' argument wasn't
properly initialized and thus free() tried to free garbage:

diff -c button.c.bak button.c
*** button.c.bak        Sat Apr 11 22:46:23 1992
--- button.c    Sun Apr 12 17:55:03 1992
***************
*** 149,154 ****
--- 149,160 ----
    attributes.colorsymbols = symbols;
    attributes.numsymbols = 0;

+   attributes.colorTable = (char***)0;
+   attributes.hints_cmt  = (char*)0;
+   attributes.colors_cmt = (char*)0;
+   attributes.pixels_cmt = (char*)0;
+   attributes.pixels     = (Pixel*)0;
+
    BLOCK_INPUT();
    status = XpmReadFileToPixmap(XD_display,cur_Xscreen->xid,

Michael
--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Michael Joosten   |       Tel.  : (+49) (+) 5251-284 120                 |
| CADLAB            |       Fax   : (+49) (+) 5251-284 140                 |
| Bahnhofstr. 32    |       E-Mail: joost@cadlab.de                        |
| D-4790 Paderborn  |        	    ...!uunet!unido!cadlab!joost           | 
| FRG               | Mass mail to: joost@pbinfo.uni-paderborn.de          |
|--------------------------------------------------------------------------|
| CADLAB is a cooperation between Uni-GH Paderborn & SNI AG                |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Technical Details
Message-ID: <JOOST.92Apr12193556@ori.cadlab.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!pbinfo!joost

Show Full Headers
Complete Article Headers
Newsgroups: gnu.epoch.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!pbinfo!joost
From: joost@cadlab.de (Michael Joosten)
Subject: Bug in epoch::read-pixmap-file : abort()'s if it's not an XPM file
Message-ID: <JOOST.92Apr12193556@ori.cadlab.de>
Sender: news@uni-paderborn.de (News Uni-Paderborn)
Nntp-Posting-Host: ori.cadlab.uni-paderborn.de
Reply-To: joost@cadlab.uni-paderborn.de
Organization: CADLAB, Paderborn, FRG
Date: Sun, 12 Apr 1992 18:35:56 GMT
Lines: 34