printf(3C) should talk about NULL string pointers
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.
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 almost 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 9fff840dca14d75459a8240b19c931e2fec186c5 Author: John Gardner <email@example.com> Date: 2020-08-24T23:49:05.000Z 13032 printf(3C) should talk about NULL string pointers Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Reviewed by: C Fraire <email@example.com> Reviewed by: Andy Fiddaman <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>