Defect report from : Nick Stoughton , USENIX Association
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 874 line 28523 section popen comment {nms-popen-1}
Problem:
Edition of Specification (Year): 2004
Defect code : 3. Clarification required
If the mode value is any character other than "r" or "w", according to line
28523 the result is undefined. However, at line 28535, there is a defined error
value (under a "may fail").
I am assuming that a bad char * pointer will cause undefined behavior, while a
good pointer to a bad value will result in EINVAL. This could be explained more
clearly. (NOTE, this is not an issue with fdopen or fopen, since these
functions do not contain the "undefined" language).
Action:
EITHER Change line 28523 to:
If the value of the mode argument is a valid pointer, but does not reference
the strings "r" or "w", popen shall fail and return a null pointer; otherwise
the result is undefined.
OR (following fdopen and fopen model):
Delete line 28523
[[ leaving simply the "May Fail" error condition]]
|