Actions
Bug #13032
closedprintf(3C) should talk about NULL string pointers
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:
Description
The printf(3C)
manual page has this to say on the subject of NULL
pointers passed as the value argument for a %s
conversion specifier:
An argument with a null value will yield undefined results.
This has not really been true since around 2009, when 6724478 was fixed in 9f773e28 -- though with an accompanying change to the documentation.
As noted in the original bug, everybody else prints some version of a diagnostic (null)
string if passed a NULL
pointer. It is unlikely that this could or should change again, so we should document and commit to that behaviour from now on.
Updated by Electric Monk over 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 9fff840dca14d75459a8240b19c931e2fec186c5
commit 9fff840dca14d75459a8240b19c931e2fec186c5 Author: John Gardner <jgardner100@hotmail.com> Date: 2020-08-24T23:49:05.000Z 13032 printf(3C) should talk about NULL string pointers Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Andy Fiddaman <andy@omniosce.org> Approved by: Dan McDonald <danmcd@joyent.com>
Actions