cvs: /php4/ext/standard base64.c
| From: | Thies C. Arntzen | Date: | Sun, 06 Feb 2000 15:19:29 +0000 |
| Subject: | cvs: /php4/ext/standard base64.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9877@lists.php.net to get a copy of this message | ||
thies Sun Feb 6 07:19:29 2000 EDT
Modified files:
/php4/ext/standard base64.c
Log:
@- Fixed possible buffer-overflow in base64_decode. (Thies)
fix #3226
Index: php4/ext/standard/base64.c
diff -u php4/ext/standard/base64.c:1.13 php4/ext/standard/base64.c:1.14
--- php4/ext/standard/base64.c:1.13 Fri Dec 31 17:31:48 1999
+++ php4/ext/standard/base64.c Sun Feb 6 07:18:59 2000
@@ -15,7 +15,7 @@
| Author: Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
-/* $Id: base64.c,v 1.13 2000/01/01 01:31:48 sas Exp $ */
+/* $Id: base64.c,v 1.14 2000/02/06 15:18:59 thies Exp $ */
#include <string.h>
@@ -88,7 +88,7 @@
}
}
- result = (unsigned char *)emalloc((length / 4 * 3 + 1) * sizeof(char));
+ result = (unsigned char *)emalloc(length + 1);
if (result == NULL) {
return NULL;
}