Thread View: gnu.utils.bug
2 messages
2 total messages
Started by Kaz Sasayama
Thu, 21 Jan 1993 23:01
textutils-1.4: Macro use bug in src/pr.c
Author: Kaz Sasayama
Date: Thu, 21 Jan 1993 23:01
Date: Thu, 21 Jan 1993 23:01
16 lines
1020 bytes
1020 bytes
I found a macro use bug in file src/pr.c of textutils-1.4. The file
src/pr.c has a line:
if (!ISDIGIT (*++s))
in function main, while another file src/system.h defines the macro
`ISDIGIT' as follows.
#define ISDIGIT(c) (isascii (c) && isdigit (c))
So the pointer `s' is incremented twice if macro `isascii' is defined
by the system.
-----
* Kaz Sasayama <sasayama@mickey.yoshida.nuie.nagoya-u.ac.jp>.
* Dept. of Information Engineering, School of Engineering, Nagoya
University.
Re: textutils-1.4: Macro use bug in src/pr.c
Author: James Buster
Date: Wed, 27 Jan 1993 03:24
Date: Wed, 27 Jan 1993 03:24
18 lines
1213 bytes
1213 bytes
In article <9301210807.AA22827@minnie.yoshida.nuie.nagoya-u.ac.jp> sasayama@mickey.yoshida.nuie.nagoya-u.ac.jp (Kaz Sasayama) writes: >I found a macro use bug in file src/pr.c of textutils-1.4. The file >src/pr.c has a line: > > if (!ISDIGIT (*++s)) Unfortunately, Mr?/Ms? (I can't tell) Sasayama didn't give a description of the symptoms of this bug. The symptoms are that `pr +N', where N is a decimal integer, will always fail with the message "pr: `+' requires a numeric argument". Changing the above code fragment to: ++s; if (!ISDIGIT (*s)) seems to fix the problem. -- James Buster bitbug@netcom.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads