stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <>
Subject RE: Null src pointer in memcpy?
Date Fri, 11 Apr 2008 01:02:23 GMT

>-----Original Message-----
>From: Eric Lemings [] 
>Sent: Thursday, April 10, 2008 5:42 PM
>Subject: Null src pointer in memcpy?
>Is it safe to pass a null pointer as the 2nd argument to memcpy()?  Or

The function is documented to copy n bytes from s2 into s1. If n is
non-zero, then it must attempt to copy that many bytes from s2. So it is
safe only when the third parameter is 0.


View raw message