Re: Null src pointer in memcpy?

2008-05-06 Thread Martin Sebor
PROTECTED] On Behalf Of Martin Sebor Sent: Thursday, April 10, 2008 7:40 PM To: dev@stdcxx.apache.org Subject: Re: Null src pointer in memcpy? This is explicitly required in 7.1.4 of C99: 7.1.4 Use of library functions -1- Each of the following statements applies unless explicitly stated

RE: Null src pointer in memcpy?

2008-04-11 Thread Eric Lemings
Sent: Thursday, April 10, 2008 7:40 PM To: dev@stdcxx.apache.org Subject: Re: Null src pointer in memcpy? This is explicitly required in 7.1.4 of C99: 7.1.4 Use of library functions -1- Each of the following statements applies unless explicitly stated otherwise

Null src pointer in memcpy?

2008-04-10 Thread Eric Lemings
Is it safe to pass a null pointer as the 2nd argument to memcpy()? Or undefined? Brad.

RE: Null src pointer in memcpy?

2008-04-10 Thread Travis Vitek
-Original Message- From: Eric Lemings [mailto:[EMAIL PROTECTED] Sent: Thursday, April 10, 2008 5:42 PM To: dev@stdcxx.apache.org Subject: Null src pointer in memcpy? Is it safe to pass a null pointer as the 2nd argument to memcpy()? Or undefined? The function is documented to copy

Re: Null src pointer in memcpy?

2008-04-10 Thread Martin Sebor
Eric Lemings wrote: Is it safe to pass a null pointer as the 2nd argument to memcpy()? Or undefined? Assuming the third argument is 0. Strictly speaking I believe it's undefined because memcpy(s1, s2, n) is specified to copy n bytes from the object pointed to by s2 into the object pointed

Re: Null src pointer in memcpy?

2008-04-10 Thread Martin Sebor
This is explicitly required in 7.1.4 of C99: 7.1.4 Use of library functions -1- Each of the following statements applies unless explicitly stated otherwise in the detailed descriptions that follow: If an argument to a function has an invalid value (such as a value outside