cvs: php4 /ext/interbase interbase.c /sapi/aolserver aolserver.c

From: Date: Wed, 26 Jun 2002 07:54:52 +0000
Subject: cvs: php4 /ext/interbase interbase.c /sapi/aolserver aolserver.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12536@lists.php.net to get a copy of this message
sas Wed Jun 26 03:54:52 2002 EDT Modified files: /php4/sapi/aolserver aolserver.c /php4/ext/interbase interbase.c Log: Fix code which makes wrong assumptions about the return value of snprintf. The AOLserver module did not use the return value, so simply drop it. Index: php4/sapi/aolserver/aolserver.c diff -u php4/sapi/aolserver/aolserver.c:1.68 php4/sapi/aolserver/aolserver.c:1.69 --- php4/sapi/aolserver/aolserver.c:1.68 Fri May 10 22:58:43 2002 +++ php4/sapi/aolserver/aolserver.c Wed Jun 26 03:54:49 2002 @@ -22,7 +22,7 @@ * - CGI/1.1 conformance */ -/* $Id: aolserver.c,v 1.68 2002/05/11 02:58:43 zeev Exp $ */ +/* $Id: aolserver.c,v 1.69 2002/06/26 07:54:49 sas Exp $ */ /* conflict between PHP and AOLserver headers */ #define Debug php_Debug @@ -205,7 +205,7 @@ int i; php_info_print_table_start(); - php_info_print_table_row(2, "SAPI module version", "$Id: aolserver.c,v 1.68 2002/05/11 02:58:43 zeev Exp $"); + php_info_print_table_row(2, "SAPI module version", "$Id: aolserver.c,v 1.69 2002/06/26 07:54:49 sas Exp $"); php_info_print_table_row(2, "Build date", Ns_InfoBuildDate()); php_info_print_table_row(2, "Config file path", Ns_InfoConfigFile()); php_info_print_table_row(2, "Error Log path", Ns_InfoErrorLog()); @@ -310,9 +310,9 @@ char *value = Ns_SetValue(NSG(conn->headers), i); char *p; char c; - int buf_len; - buf_len = snprintf(buf, NS_BUF_SIZE, "HTTP_%s", key); + snprintf(buf, NS_BUF_SIZE, "HTTP_%s", key); + for(p = buf + 5; (c = *p); p++) { c = toupper(c); if(c < 'A' || c > 'Z') { Index: php4/ext/interbase/interbase.c diff -u php4/ext/interbase/interbase.c:1.86 php4/ext/interbase/interbase.c:1.87 --- php4/ext/interbase/interbase.c:1.86 Thu Jun 6 15:47:28 2002 +++ php4/ext/interbase/interbase.c Wed Jun 26 03:54:50 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interbase.c,v 1.86 2002/06/06 19:47:28 daniela Exp $ */ +/* $Id: interbase.c,v 1.87 2002/06/26 07:54:50 sas Exp $ */ /* TODO: Arrays, roles? @@ -285,13 +285,12 @@ static void _php_ibase_module_error(char *msg, ...) { va_list ap; - int len; TSRMLS_FETCH(); va_start(ap, msg); - len = vsnprintf(IBG(errmsg), MAX_ERRMSG - 1, msg, ap); + /* vsnprintf NUL terminates the buf and writes at most n-1 chars+NUL */ + vsnprintf(IBG(errmsg), MAX_ERRMSG, msg, ap); va_end(ap); - IBG(errmsg[len]) = '\0'; php_error(E_WARNING, "InterBase module: %s", IBG(errmsg)); } @@ -609,7 +608,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "Interbase Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.86 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.87 $"); #ifdef COMPILE_DL_INTERBASE php_info_print_table_row(2, "Dynamic Module", "yes"); #endif

« previous php.cvs (#12536) next »