Wireshark-dev: Re: [Wireshark-dev] strlen() and NULL pointer checks
From: Jeff Morriss <[email protected]>
Date: Tue, 17 May 2011 12:37:44 -0400
Jeff Morriss wrote:
Jakub Zawadzki wrote:
- I had the same issue with another project, and we created macro:
  #define __(x) ((x) ? (x) : "(null)")

and use it when passing possible-null-strings. It's still PITA but IMHO it looks a little better than doing it by hand.
I don't mind doing it by hand (and in some cases I prefer NOT having 
another layer of abstraction), but then we still need to have a way to 
(regularly) test for it.
Oh, and I figured fuzz testing on the Solaris buildbot would not be a 
good solution because only people with access to Solaris boxes would be 
able to reproduce the crash...