Date: 07/27/01
- Next message: Tomas V.V.Cox: "[PHP-DEV] PHP arrays managment bug :-?"
- Previous message: Peter Petermann: "Re: [PHP-DEV] Security Issues"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-- php-4.0.6/Zend/zend_alloc.c (160) -------------------------------
if (!p) {
fprintf(stderr,"FATAL: emalloc(): Unable to allocate %ld bytes\n",
(long) size);
#if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID)
kill(getpid(), SIGSEGV);
#else
exit(1);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)p;
}
--------------------------------------------------------------------
If p==NULL _emalloc does not return, so checking the return value is
pointless because you can do this iff it's ok. Maybe I'missing
something :-)
A minor problem exists with size: size_t should be unsigned and the
type modifier assumes it's signed.
Ciao.
-- Walter Franzini, e-mail: walter <email protected> SysNet, Via Digione 8, 27100 Pavia - Italy-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Tomas V.V.Cox: "[PHP-DEV] PHP arrays managment bug :-?"
- Previous message: Peter Petermann: "Re: [PHP-DEV] Security Issues"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

