php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30 problem of base64 function with 8bits (3.0b4)
Submitted: 1998-02-03 02:29 UTC Modified: 1998-02-06 05:23 UTC
From: tomo at arts dot box dot co dot jp Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0 Latest CVS OS: FreeBSD 2.2.5-stable
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 + 44 = ?
Subscribe to this entry?

 
 [1998-02-03 02:29 UTC] tomo at arts dot box dot co dot jp
hi. I found base64_encode() couldn't work with 8-bits data string.
I guess it is because base64_encode() in function/base64.c is using 'char*' instead of 'unsigned char*'.

in function/base64.c:64
>char *base64_encode(const char *string) {
>     const char *current = string;
            ^^^^---> unsigned char

bye.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-02-06 05:23 UTC] ssb
Fixed in
base64.c:
     $Id: base64.c,v 1.16 1998/02/06 10:22:50 ssb Exp $

base64.h:
     $Id: base64.h,v 1.7 1998/02/06 10:22:50 ssb Exp $

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC