Re: base64_encode() memory issue

From: Date: Thu, 30 Dec 2004 10:02:29 +0000
Subject: Re: base64_encode() memory issue
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-14239@lists.php.net to get a copy of this message
Hello, this issue was already cleared as bogus safe_emalloc already takes care of the one extra byte that should get added. safe_emalloc does allocate param1 * param2 + param3 bytes
result = (unsigned char *)safe_emalloc(((length + 2) / 3) * 4, sizeof(char), 1); would become result = (unsigned char *)safe_emalloc(((length + 2) / 3) * 4 + 1, sizeof(char), 1);
Stefan

« previous php.internals (#14239) next »