Date: 02/27/99
- Next message: sas <email protected>: "Re: [PHP-DEV] PHP3 and 64-bit land"
- Previous message: sas: "[PHP-DEV] CVS update: php3/functions"
- Next in thread: sas: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Saturday February 27, 1999 @ 11:11
Author: sas
Update of /repository/php3/functions
In directory asf:/u/temp/cvs-serv4577/functions
Modified Files:
base64.c
Log Message:
pointer fun
Index: php3/functions/base64.c
diff -c php3/functions/base64.c:1.28 php3/functions/base64.c:1.29
*** php3/functions/base64.c:1.28 Fri Jan 1 12:59:07 1999
--- php3/functions/base64.c Sat Feb 27 11:11:08 1999
***************
*** 26,32 ****
| Author: Jim Winstead (jimw <email protected>) |
+----------------------------------------------------------------------+
*/
! /* $Id: base64.c,v 1.28 1999/01/01 17:59:07 zeev Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
--- 26,32 ----
| Author: Jim Winstead (jimw <email protected>) |
+----------------------------------------------------------------------+
*/
! /* $Id: base64.c,v 1.29 1999/02/27 16:11:08 sas Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
***************
*** 86,91 ****
--- 86,92 ----
unsigned char *_php3_base64_decode(const unsigned char *string, int length, int *ret_length) {
const unsigned char *current = string;
int ch, i = 0, j = 0, k;
+ char *chp;
unsigned char *result = (unsigned char *)emalloc((length / 4 * 3 + 1) * sizeof(char));
if (result == NULL) {
***************
*** 95,106 ****
/* run through the whole string, converting as we go */
while ((ch = *current++) != '\0') {
if (ch == base64_pad) break;
! ch = (int)strchr(base64_table, ch);
! if (ch == 0) {
efree(result);
return NULL;
}
! ch -= (int)base64_table;
switch(i % 4) {
case 0:
--- 96,107 ----
/* run through the whole string, converting as we go */
while ((ch = *current++) != '\0') {
if (ch == base64_pad) break;
! chp = strchr(base64_table, ch);
! if (chp == NULL) {
efree(result);
return NULL;
}
! ch = chp - base64_table;
switch(i % 4) {
case 0:
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: sas <email protected>: "Re: [PHP-DEV] PHP3 and 64-bit land"
- Previous message: sas: "[PHP-DEV] CVS update: php3/functions"
- Next in thread: sas: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

