Article View: comp.bugs.misc
Article #80doscan.o bug in Ultrix 1.2 & 2.0
From: tom
Date: Tue, 07 Jul 1987 08:18
Date: Tue, 07 Jul 1987 08:18
31 lines
1458 bytes
1458 bytes
Bug in doscan.o in /lib/libc.a on ULTRIX 1.2 and ULTRIX 2.0.
Try in you program.c the following line:
val = fscanf(file,"%*[ \t\n]%74[abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]", namebuf);
In case your input does not begin with space, tab or newline, scanf will
return 0 which is not right, since "*" should match "0 or more" .
The pascal compiler uses this type of scanf to read enumerated type data.
Try for example the following program:
( you can use any enumerated type instead of boolean).
program test(input,output);
var
a :boolean;
begin
readln(a);
writeln(a);
end.
Try as input the word "false" with and without leading blank.
You will get the following error : ( without leading blank)
Trace/BPT trap
Unknown name "" found on enumerated type read
I have inform DEC, but meanwhile i installed 4.3 doscan.o into
Ultrix libc.a.
Technical Details
Message-ID:
<309@nsta.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!oliveb!pyramid!nsc!nsta!tomShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!oliveb!pyramid!nsc!nsta!tom From: tom@nsta.UUCP Newsgroups: comp.bugs.misc,comp.bugs.4bsd Subject: doscan.o bug in Ultrix 1.2 & 2.0 Message-ID: <309@nsta.UUCP> Date: Tue, 7-Jul-87 04:18:55 EDT Article-I.D.: nsta.309 Posted: Tue Jul 7 04:18:55 1987 Date-Received: Thu, 9-Jul-87 03:13:55 EDT Reply-To: tom%nsta@nsc.com (Tom Gorodecki) Distribution: world Organization: National Semiconductor (Israel) Ltd. Lines: 31