🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: dnet.atari
Article #346

Re: FSEL_INPUT

#346
From: Hans-Ch. Eckert
Date: Tue, 27 Aug 1991 01:26
24 lines
1521 bytes
Moin.

Ich bin da auch schonmal gut reingefallen.  Ich habe ein Programm, das ein
Fenster oeffnet und einen Puffer, der einen ganzen Bildschirm aufnehmen kann.

Die Variablen int x_max, y_max;
Die Groesse des Buffers long bufsize;

bufsize= (long) ( x_max * y_max ) / 8;

Leider ist unter Overscan bufsize < 0 und der anschliessende malloc()
fuehrt zum Crash.  Grund: x_max * y_max gab 'nen int-overflow, da nuetzte
der cast auf long hinterher auch nichts mehr.
Nun sind die Variablen alle long :-)


Wie man sieht muss man schon gut aufpassen, damit nichts schiefgeht...

Gruss,
				RIPLEY
--
Greetings from RIPLEY | D-1000 Berlin 30    | ripley@opal.cs.tu-berlin.de
Hans-Christian Eckert | Regensburger Str. 2 | (ripley@tubopal.UUCP)
Attention: My phone-# is changing 01-Jan-1991 ! s/246292/2186292/ 
Technical Details
Message-ID: <RIPLEY.91Aug27032632@track.cs.tu-berlin.de>
Path: arc1-ca.pugleaf.net!gmdzi!unido!opal!ripley
References: <michaels.682856654@hathi> <2574@netmbx.UUCP> <PERLE.91Aug24153911@alaspin.cs.tu-berlin.de> <2579@netmbx.UUCP>

Show Full Headers
Complete Article Headers
X-Google-Language: GERMAN,ASCII-7-bit
X-Google-Thread: 12bdcf,2c4e55db26d7f324
X-Google-Attributes: gid12bdcf,public
X-Google-ArrivalTime: 1991-08-26 21:41:26 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!opal!ripley
From: ripley@cs.tu-berlin.de (Hans-Ch. Eckert)
Newsgroups: dnet.atari
Subject: Re: FSEL_INPUT
Message-ID: <RIPLEY.91Aug27032632@track.cs.tu-berlin.de>
Date: 27 Aug 91 01:26:31 GMT
References: <michaels.682856654@hathi> <2574@netmbx.UUCP>
 <PERLE.91Aug24153911@alaspin.cs.tu-berlin.de> <2579@netmbx.UUCP>
Sender: ripley@opal.cs.tu-berlin.de
Distribution: dnet
Organization: Technical University of Berlin
Lines: 24
In-reply-to: franky@netmbx.UUCP's message of 25 Aug 91 09:16:30 GMT