ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] Passing NULL to %s format specifiers

From: Evan Huus <eapache@xxxxxxxxx>
Date: Tue, 14 Aug 2012 20:32:02 -0400
On Linux and most other operating systems I know of, passing a NULL to
a %s format specifier is safe. On Solaris, as it turns out, it isn't
[1].

The case in the filed bug is fairly trivial to fix, but I'm wondering
if this is something that should be added to the Code Style /
Portability section of README.developer?

Alternatively, since I have no idea how many of these bugs we may have
to fix, perhaps we should be wrapping all format strings somehow?

Hopefully someone with some Solaris experience (or even a Solaris test
box) could weigh in, since I have neither.

Cheers,
Evan

[1] https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7634