cvs: php4 /ext/standard base64.c

From: Date: Sun, 01 Dec 2002 02:44:50 +0000
Subject: cvs: php4 /ext/standard base64.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-16781@lists.php.net to get a copy of this message
moriyoshi Sat Nov 30 21:44:50 2002 EDT Modified files: /php4/ext/standard base64.c Log: Fixed possible buffer overflow in php_base64_decode(); # This bug doesn't appear to be harmful for now, # so I won't merge it into branches... Index: php4/ext/standard/base64.c diff -u php4/ext/standard/base64.c:1.33 php4/ext/standard/base64.c:1.34 --- php4/ext/standard/base64.c:1.33 Wed Aug 21 21:20:50 2002 +++ php4/ext/standard/base64.c Sat Nov 30 21:44:50 2002 @@ -15,7 +15,7 @@ | Author: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: base64.c,v 1.33 2002/08/22 01:20:50 sniper Exp $ */ +/* $Id: base64.c,v 1.34 2002/12/01 02:44:50 moriyoshi Exp $ */ #include <string.h> @@ -140,7 +140,7 @@ } /* run through the whole string, converting as we go */ - while ((ch = *current++) != '\0') { + while ((ch = *current++) != '\0' && length-- > 0) { if (ch == base64_pad) break; /* When Base64 gets POSTed, all pluses are interpreted as spaces.

« previous php.cvs (#16781) next »