Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 27948: /trunk/epan/ /trunk/epan/: em

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 3 Apr 2009 10:37:39 -0700

On Apr 3, 2009, at 10:32 AM, jmayer@xxxxxxxxxxxxx wrote:

Don't crash on linux:
strlen(NULL) isn't an acceptable call.

I'd be somewhat surprised if there's a platform out there on which we run where strlen(NULL) *doesn't* crash; on most if not all platforms on which we run:

	1) NULL has all of its bits zero;

2) at least one page of address space starting at 0 is deliberately missing (to catch null-pointer dereferences);

and I suspect most if not all implementations of strlen() don't explicitly check for a null argument.