moriyoshi Tue Feb 11 18:30:13 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/main SAPI.c
Log:
MFH: reverted my patch & applying a new patch by Stefan Esser
Index: php4/main/SAPI.c
diff -u php4/main/SAPI.c:1.155.2.8 php4/main/SAPI.c:1.155.2.9
--- php4/main/SAPI.c:1.155.2.8 Mon Feb 10 21:26:37 2003
+++ php4/main/SAPI.c Tue Feb 11 18:30:13 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.c,v 1.155.2.8 2003/02/11 02:26:37 moriyoshi Exp $ */
+/* $Id: SAPI.c,v 1.155.2.9 2003/02/11 23:30:13 moriyoshi Exp $ */
#include <ctype.h>
#include <sys/stat.h>
@@ -619,18 +619,14 @@
0, &result_len, -1 TSRMLS_CC);
if(result_len==ptr_len) {
char *lower_temp =
estrdup(ptr);
- char conv_temp[64];
+ char conv_temp[32];
int conv_len;
php_strtolower(lower_temp,strlen(lower_temp));
/* If there is no realm string
at all, append one */
if(!strstr(lower_temp,"realm")) {
efree(result);
- conv_len =
snprintf(conv_temp, sizeof(conv_temp), " realm=\"%ld\"",myuid);
- /* some broken
snprintf() impls may return a negative value on failure */
- if (conv_len < 0) {
- conv_len = 0;
- }
+ conv_len =
+sprintf(conv_temp, " realm=\"%ld\"",myuid);
result =
emalloc(ptr_len+conv_len+1);
result_len =
ptr_len+conv_len;
memcpy(result, ptr,
ptr_len);
@@ -653,7 +649,7 @@
#else
{
myuid = php_getuid();
- result = emalloc(32);
+ result = emalloc(sizeof("WWW-Authenticate:
+")+20);
newlen = sprintf(result, "WWW-Authenticate:
%ld", myuid);
newheader = estrndup(result,newlen);
efree(header_line);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php