Re: Quickie: does estr(n)dup NUL-terminate the newly allocated string?
| From: | Zeev Suraski | Date: | Sat, 01 Sep 2001 15:41:35 +0000 |
| Subject: | Re: Quickie: does estr(n)dup NUL-terminate the newly allocated string? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-64877@lists.php.net to get a copy of this message | ||
estrdup() assumes that the string is NULL terminated, and it copies the entire string, including the NULL.
estrndup() forces a NULL byte at the end of the duplicated string.
It *is* in the source, it'd be a bit of a problem if it wasn't :)
Zeev
At 18:06 01-09-01, jeroen@php.net wrote:
Couldn't find it anywhere (manpages, zend-api, source...) --jeroen -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net