#21523 [Opn->Ver]: number_format causes call to emalloc for a negative amount of memory

From: Date: Thu, 09 Jan 2003 12:15:26 +0000
Subject: #21523 [Opn->Ver]: number_format causes call to emalloc for a negative amount of memory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-29554@lists.php.net to get a copy of this message
ID: 21523 Updated by: nicos@php.net Reported By: cteubner@ncw-av.com -Status: Open +Status: Verified Bug Type: Strings related -Operating System: Windows 2000 / Apache 1.3.27 +Operating System: Windows 2000 PHP Version: 4.3.0 New Comment: Verified under WIN32. Previous Comments: ------------------------------------------------------------------------ [2003-01-09 06:05:50] nicos@php.net I can't reproduce this error under Linux, FreeBSD. ------------------------------------------------------------------------ [2003-01-08 13:05:47] cteubner@ncw-av.com When the following line is run: echo number_format(2, 2678); The following error appears in the Apache error log: FATAL: emalloc(): Unable to allocate -1112 bytes -259 and -123 have also appeared. Clearly I accidentally used number_format in the reverse direction that I meant to. However, it seems like whatever is requesting memory for number_format is experiencing integer overflow. That doesn't seem right. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21523&edit=1

« previous php.bugs (#29554) next »