🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #1430

bug in Doc in handling default empty document

#1430
From: wyant
Date: Wed, 05 Jun 1991 15:17
16 lines
1139 bytes
When Doc is started without specifying a document, Application::read
creates a default one in a strstream. Document::read reads a line in
from the stream. The final 'else' of the massive 'if' statement that
starts this function looks for a "%" on the line. It expects this to be
followed by a space. However, the empty document created by Application::read does not provide this. This will cause the strncat in
that 'else' clause to fill the 'name' variable with garbage.

The fix seems to be change Application::read to procede the newline
it puts in the stream with a space:

	empty << " \n";

--geoff wyant
C++ Technologies Group
Saber Software
wyant@saber.com
Technical Details
Message-ID: <9106051517.AA22644@riposte>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!think.com!snorkelwacker.mit.edu!stanford.edu!saber.com!wyant

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!think.com!snorkelwacker.mit.edu!stanford.edu!saber.com!wyant
From: wyant@saber.com
Newsgroups: comp.windows.interviews
Subject: bug in Doc in handling default empty document
Message-ID: <9106051517.AA22644@riposte>
Date: 5 Jun 91 15:17:32 GMT
Sender: news@shelby.stanford.edu (USENET News System)
Organization: Internet-USENET Gateway at Stanford University
Lines: 16