[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2007-06-07 Thread changelog
changelog   Fri Jun  8 01:31:09 2007 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2712r2=1.2713diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2712 php-src/ChangeLog:1.2713
--- php-src/ChangeLog:1.2712Thu Jun  7 01:31:12 2007
+++ php-src/ChangeLog   Fri Jun  8 01:31:08 2007
@@ -1,3 +1,81 @@
+2007-06-07  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/date/php_date.c:
+  
+  MFB: Final shot at the date issue
+
+* (PHP_5_2)
+  ext/date/php_date.c:
+  
+  Final shot at the date issue
+
+2007-06-07  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/gd/libgd/gd_gif_in.c:
+  - #41630, fix segfault when an invalid color index is present in the 
image
+data
+
+2007-06-07  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_4_4)
+  ext/mysql/php_mysql.c
+  ext/mysql/php_mysql.c:
+  MFH: reset active_result_id when fetching persistent connection
+  patch by Peter Christensen
+
+* ext/mysql/php_mysql.c:
+  reset active_result_id when fetching persistent connection
+  patch by Peter Christensen
+
+* ext/calendar/easter.c
+  ext/pdo_sqlite/sqlite/src/date.c
+  ext/sqlite/libsqlite/src/date.c
+  ext/standard/info.c
+  ext/xmlrpc/libxmlrpc/xmlrpc.c:
+  php_localtime_r() checks
+
+* ext/ftp/ftp.c
+  ext/interbase/ibase_query.c
+  ext/session/session.c
+  ext/standard/datetime.c
+  ext/standard/ftp_fopen_wrapper.c:
+  php_gmtime_r() fixes
+
+* ext/calendar/cal_unix.c
+  ext/date/php_date.c
+  ext/mime_magic/mime_magic.c
+  main/main.c:
+  check return value of *time_r() functions for NULL
+  more checks will follow
+
+* (PHP_5_2)
+  ext/calendar/cal_unix.c
+  ext/date/php_date.c
+  ext/mime_magic/mime_magic.c
+  main/main.c:
+  MFH: check return value of *time_r() functions for NULL
+
+* (PHP_5_2)
+  ZendEngine2/zend_constants.c
+  ZendEngine2/tests/class_constants_001.phpt
+  ZendEngine2/tests/class_constants_002.phpt
+  ZendEngine2/tests/class_constants_003.phpt:
+  MFH: change E_NOTICE to E_ERROR when using a class constant from
+  non-existent class
+  (noticed by Jani)
+  add tests
+
+2007-06-07  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/date/php_date.c:
+  
+  Fixed typo
+
+* (PHP_5_2)
+  ext/date/php_date.c:
+  Fixed typo
+
 2007-06-06  Ilia Alshanetsky  [EMAIL PROTECTED]
 
 * ext/date/php_date.c:


[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2007-06-07 Thread changelog
changelog   Fri Jun  8 01:31:13 2007 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1125r2=1.1126diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1125 ZendEngine2/ChangeLog:1.1126
--- ZendEngine2/ChangeLog:1.1125Thu Jun  7 01:31:15 2007
+++ ZendEngine2/ChangeLog   Fri Jun  8 01:31:12 2007
@@ -1,3 +1,15 @@
+2007-06-07  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  zend_constants.c
+  tests/class_constants_001.phpt
+  tests/class_constants_002.phpt
+  tests/class_constants_003.phpt:
+  MFH: change E_NOTICE to E_ERROR when using a class constant from
+  non-existent class
+  (noticed by Jani)
+  add tests
+
 2007-06-06  Antony Dovgal  [EMAIL PROTECTED]
 
 * (PHP_5_2)
@@ -18029,7 +18041,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1125 2007/06/07 01:31:15 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1126 2007/06/08 01:31:12 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -19753,7 +19765,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1125 2007/06/07 01:31:15 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1126 2007/06/08 01:31:12 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard url_scanner_ex.c

2007-06-07 Thread Marcus Boerger
Hello Jani,

  we have .re files that are being generated only manually. For one instance
look into date lib.

best regards
marcus

Thursday, June 7, 2007, 2:41:10 AM, you wrote:

 What do you mean with not all .re files have rules ??

 --Jani

 Marcus Boerger kirjoitti:
 Hello Nuno,
 
   not all .re files have rules. MAybe we could collect the .re files in the
 buildconf or configure process and automatically generate a makefile
 target re2c if re2c is available. This rulesset might as well check if we
 develop using gcc and pass -g to re2c in that case.
 
 best regards
 marcus
 
 Wednesday, June 6, 2007, 6:29:27 PM, you wrote:
 
 yep. letting 'make' regenerate the files should do the trick.
 Thanks,
 Nuno
 
 - Original Message - 
 I guess you need to generate the files the correct way  
 It should happen automatically when you do the test build..?  
 (just don't run re2c manually)

 --Jani

 Antony Dovgal kirjoitti:
 On 06.06.2007 20:00, Ilia Alshanetsky wrote:
 Nuno,

 What does the gcov build need that my re2c is not doing so that I can  
 fix it for the future.
 Apparently it needs full path, not just filename.
 
 
 
 
 Best regards,
  Marcus
 



Best regards,
 Marcus

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-CVS] cvs: php-src(PHP_5_2) / Makefile.global

2007-06-07 Thread Dmitry Stogov
Hi Jani,

After this patch all my tests failed, because PHP tries to load extensions
twice.
First from php.ini and then from command line (-d extension=...).

I like your idea, as it's going to allow testing of ALL compileed extensions
before installation, but it doesn't work yet.

Thanks. Dmitry.

 -Original Message-
 From: Jani Taskinen [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, June 06, 2007 10:28 PM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src(PHP_5_2) / Makefile.global 
 
 
 sniperWed Jun  6 18:28:14 2007 UTC
 
   Modified files:  (Branch: PHP_5_2)
 /php-src  Makefile.global 
   Log:
   MFH:- Fix passing of shared extensions to run-tests.php
   
 http://cvs.php.net/viewvc.cgi/php-src/Makefile.global?r1=1.57.
 2.5.2.2r2=1.57.2.5.2.3diff_format=u
 Index: php-src/Makefile.global
 diff -u php-src/Makefile.global:1.57.2.5.2.2 
 php-src/Makefile.global:1.57.2.5.2.3
 --- php-src/Makefile.global:1.57.2.5.2.2  Wed Apr 11 16:03:06 2007
 +++ php-src/Makefile.global   Wed Jun  6 18:28:13 2007
 @@ -69,22 +69,26 @@
   
  install-su: install-pear
  
 +PHP_TEST_SHARED_EXTENSIONS=`(for i in $(PHP_MODULES); do . 
 $$i ; echo 
 +-n -d extension=$$dlname ; done)` PHP_TEST_SETTINGS=-d 
 +'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 
 +'memory_limit=-1'
 +
  test: all 
   [EMAIL PROTECTED] test ! -z $(PHP_EXECUTABLE)  test -x 
 $(PHP_EXECUTABLE); then \
   TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
   TEST_PHP_SRCDIR=$(top_srcdir) \
   CC=$(CC) \
 - $(PHP_EXECUTABLE) -d 'open_basedir=' -d 
 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' 
 $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( 
 . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \
 + $(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) 
 $(top_srcdir)/run-tests.php 
 +-d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
   elif test ! -z $(SAPI_CLI_PATH)  test -x 
 $(SAPI_CLI_PATH); then \
   TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
   TEST_PHP_SRCDIR=$(top_srcdir) \
   CC=$(CC) \
 - $(top_builddir)/$(SAPI_CLI_PATH) -d 
 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 
 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \
 + $(top_builddir)/$(SAPI_CLI_PATH) 
 $(PHP_TEST_SETTINGS) 
 +$(top_srcdir)/run-tests.php -d 
 extension_dir=$(top_builddir)/modules/ 
 $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
   else \
   echo ERROR: Cannot run tests without CLI sapi.; \
   fi
  
  clean:
 + find . -name \*.gcno -o -name \*.gcda | xargs rm -f
   find . -name \*.lo -o -name \*.o | xargs rm -f
   find . -name \*.la -o -name \*.a | xargs rm -f 
   find . -name \*.so | xargs rm -f
 
 -- 
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/calendar cal_unix.c /ext/date php_date.c /ext/mime_magic mime_magic.c /main main.c

2007-06-07 Thread Antony Dovgal
tony2001Thu Jun  7 08:44:41 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/calendar   cal_unix.c 
/php-src/ext/date   php_date.c 
/php-src/ext/mime_magic mime_magic.c 
/php-src/main   main.c 
  Log:
  MFH: check return value of *time_r() functions for NULL
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/cal_unix.c?r1=1.17.2.2.2.1r2=1.17.2.2.2.2diff_format=u
Index: php-src/ext/calendar/cal_unix.c
diff -u php-src/ext/calendar/cal_unix.c:1.17.2.2.2.1 
php-src/ext/calendar/cal_unix.c:1.17.2.2.2.2
--- php-src/ext/calendar/cal_unix.c:1.17.2.2.2.1Mon Jan  1 09:35:48 2007
+++ php-src/ext/calendar/cal_unix.c Thu Jun  7 08:44:40 2007
@@ -50,6 +50,10 @@
   }
 
   ta = php_localtime_r(t, tmbuf);
+  if (!ta) {
+ RETURN_FALSE;
+  }
+
   jdate = GregorianToSdn(ta-tm_year+1900, ta-tm_mon+1, ta-tm_mday);
   
   RETURN_LONG(jdate);
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.48r2=1.43.2.45.2.49diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.48 
php-src/ext/date/php_date.c:1.43.2.45.2.49
--- php-src/ext/date/php_date.c:1.43.2.45.2.48  Thu Jun  7 02:21:26 2007
+++ php-src/ext/date/php_date.c Thu Jun  7 08:44:40 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.48 2007/06/07 02:21:26 iliaa Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.49 2007/06/07 08:44:40 tony2001 Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -578,16 +578,18 @@
{
struct tm *ta, tmbuf;
time_t the_time;
-   char  *tzid;
+   char  *tzid = NULL;

the_time = time(NULL);
ta = php_localtime_r(the_time, tmbuf);
-   tzid = timelib_timezone_id_from_abbr(ta-tm_zone, 
ta-tm_gmtoff, ta-tm_isdst);
+   if (ta) {
+   tzid = timelib_timezone_id_from_abbr(ta-tm_zone, 
ta-tm_gmtoff, ta-tm_isdst);
+   }
if (! tzid) {
tzid = UTC;
}

-   php_error_docref(NULL TSRMLS_CC, E_STRICT, DATE_TZ_ERRMSG We 
selected '%s' for '%s/%.1f/%s' instead, tzid, ta-tm_zone, (float) 
(ta-tm_gmtoff / 3600), ta-tm_isdst ? DST : no DST);
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, DATE_TZ_ERRMSG We 
selected '%s' for '%s/%.1f/%s' instead, tzid, ta ? ta-tm_zone : Unknown, ta 
? (float) (ta-tm_gmtoff / 3600) : 0, ta ? (ta-tm_isdst ? DST : no DST) : 
Unknown);
return tzid;
}
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/mime_magic.c?r1=1.42.2.5.2.6r2=1.42.2.5.2.7diff_format=u
Index: php-src/ext/mime_magic/mime_magic.c
diff -u php-src/ext/mime_magic/mime_magic.c:1.42.2.5.2.6 
php-src/ext/mime_magic/mime_magic.c:1.42.2.5.2.7
--- php-src/ext/mime_magic/mime_magic.c:1.42.2.5.2.6Thu Feb 15 00:05:42 2007
+++ php-src/ext/mime_magic/mime_magic.c Thu Jun  7 08:44:41 2007
@@ -15,7 +15,7 @@
   | Author: Hartmut Holzgraefe  [EMAIL PROTECTED]   |
   +--+
 
-  $Id: mime_magic.c,v 1.42.2.5.2.6 2007/02/15 00:05:42 iliaa Exp $ 
+  $Id: mime_magic.c,v 1.42.2.5.2.7 2007/06/07 08:44:41 tony2001 Exp $ 
 
   This module contains a lot of stuff taken from Apache mod_mime_magic,
   so the license section is a little bit longer than usual:
@@ -1764,6 +1764,9 @@
{
char ctimebuf[52];
pp = php_ctime_r((time_t *) p-l, ctimebuf);
+   if (!pp) {
+   return;
+   }
if ((rt = strchr(pp, '\n')) != NULL) {
*rt = '\0';
}
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.35r2=1.640.2.23.2.36diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.35 php-src/main/main.c:1.640.2.23.2.36
--- php-src/main/main.c:1.640.2.23.2.35 Wed Apr 18 09:38:56 2007
+++ php-src/main/main.c Thu Jun  7 08:44:41 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.35 2007/04/18 09:38:56 rrichards Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.36 2007/06/07 08:44:41 tony2001 Exp $ */
 
 /* {{{ includes
  */
@@ -1021,8 +1021,12 @@
time(curtime);
ta = php_localtime_r(curtime, tmbuf);
datetime_str = php_asctime_r(ta, asctimebuf);
-   datetime_str[strlen(datetime_str)-1]=0; /* get 
rid of the trailing newline */
-   snprintf(memory_leak_buf, 
sizeof(memory_leak_buf), [%s]  Script:  '%s'\n, datetime_str, 

[PHP-CVS] cvs: php-src /ext/calendar cal_unix.c /ext/date php_date.c /ext/mime_magic mime_magic.c /main main.c

2007-06-07 Thread Antony Dovgal
tony2001Thu Jun  7 08:46:32 2007 UTC

  Modified files:  
/php-src/ext/calendar   cal_unix.c 
/php-src/ext/date   php_date.c 
/php-src/ext/mime_magic mime_magic.c 
/php-src/main   main.c 
  Log:
  check return value of *time_r() functions for NULL
  more checks will follow
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/cal_unix.c?r1=1.22r2=1.23diff_format=u
Index: php-src/ext/calendar/cal_unix.c
diff -u php-src/ext/calendar/cal_unix.c:1.22 
php-src/ext/calendar/cal_unix.c:1.23
--- php-src/ext/calendar/cal_unix.c:1.22Mon Jan  1 09:29:21 2007
+++ php-src/ext/calendar/cal_unix.c Thu Jun  7 08:46:32 2007
@@ -47,8 +47,11 @@
   }
 
   ta = php_localtime_r(timestamp, tmbuf);
+  if (!ta) {
+ RETURN_FALSE;
+  }
+
   jdate = GregorianToSdn(ta-tm_year+1900, ta-tm_mon+1, ta-tm_mday);
-  
   RETURN_LONG(jdate);
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.139r2=1.140diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.139 php-src/ext/date/php_date.c:1.140
--- php-src/ext/date/php_date.c:1.139   Thu Jun  7 02:21:55 2007
+++ php-src/ext/date/php_date.c Thu Jun  7 08:46:32 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.139 2007/06/07 02:21:55 iliaa Exp $ */
+/* $Id: php_date.c,v 1.140 2007/06/07 08:46:32 tony2001 Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -583,16 +583,18 @@
{
struct tm *ta, tmbuf;
time_t the_time;
-   char  *tzid;
+   char  *tzid = NULL;

the_time = time(NULL);
ta = php_localtime_r(the_time, tmbuf);
-   tzid = timelib_timezone_id_from_abbr(ta-tm_zone, 
ta-tm_gmtoff, ta-tm_isdst);
+   if (ta) {
+   tzid = timelib_timezone_id_from_abbr(ta-tm_zone, 
ta-tm_gmtoff, ta-tm_isdst);
+   }
if (! tzid) {
tzid = UTC;
}

-   php_error_docref(NULL TSRMLS_CC, E_STRICT, DATE_TZ_ERRMSG We 
selected '%s' for '%s/%.1f/%s' instead, tzid, ta-tm_zone, (float) 
(ta-tm_gmtoff / 3600), ta-tm_isdst ? DST : no DST);
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, DATE_TZ_ERRMSG We 
selected '%s' for '%s/%.1f/%s' instead, tzid, ta ? ta-tm_zone : Unknown, ta 
? (float) (ta-tm_gmtoff / 3600) : 0, ta ? (ta-tm_isdst ? DST : no DST) : 
Unknown);
return tzid;
}
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/mime_magic.c?r1=1.56r2=1.57diff_format=u
Index: php-src/ext/mime_magic/mime_magic.c
diff -u php-src/ext/mime_magic/mime_magic.c:1.56 
php-src/ext/mime_magic/mime_magic.c:1.57
--- php-src/ext/mime_magic/mime_magic.c:1.56Mon May 28 23:33:13 2007
+++ php-src/ext/mime_magic/mime_magic.c Thu Jun  7 08:46:32 2007
@@ -15,7 +15,7 @@
   | Author: Hartmut Holzgraefe  [EMAIL PROTECTED]   |
   +--+
 
-  $Id: mime_magic.c,v 1.56 2007/05/28 23:33:13 iliaa Exp $ 
+  $Id: mime_magic.c,v 1.57 2007/06/07 08:46:32 tony2001 Exp $ 
 
   This module contains a lot of stuff taken from Apache mod_mime_magic,
   so the license section is a little bit longer than usual:
@@ -1764,6 +1764,9 @@
{
char ctimebuf[52];
pp = php_ctime_r((time_t *) p-l, ctimebuf);
+   if (!pp) {
+   return;
+   }
if ((rt = strchr(pp, '\n')) != NULL) {
*rt = '\0';
}
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.728r2=1.729diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.728 php-src/main/main.c:1.729
--- php-src/main/main.c:1.728   Thu Apr 26 09:39:03 2007
+++ php-src/main/main.c Thu Jun  7 08:46:32 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.728 2007/04/26 09:39:03 tony2001 Exp $ */
+/* $Id: main.c,v 1.729 2007/06/07 08:46:32 tony2001 Exp $ */
 
 /* {{{ includes
  */
@@ -1132,8 +1132,12 @@
time(curtime);
ta = php_localtime_r(curtime, tmbuf);
datetime_str = php_asctime_r(ta, asctimebuf);
-   datetime_str[strlen(datetime_str)-1]=0; /* get 
rid of the trailing newline */
-   snprintf(memory_leak_buf, 
sizeof(memory_leak_buf), [%s]  Script:  '%s'\n, datetime_str, 
SAFE_FILENAME(SG(request_info).path_translated));
+   if (datetime_str) {
+   datetime_str[strlen(datetime_str)-1]=0; 
/* get rid of the trailing newline */
+  

[PHP-CVS] cvs: php-src /ext/ftp ftp.c /ext/interbase ibase_query.c /ext/session session.c /ext/standard datetime.c ftp_fopen_wrapper.c

2007-06-07 Thread Antony Dovgal
tony2001Thu Jun  7 08:58:38 2007 UTC

  Modified files:  
/php-src/ext/ftpftp.c 
/php-src/ext/sessionsession.c 
/php-src/ext/standard   ftp_fopen_wrapper.c datetime.c 
/php-src/ext/interbase  ibase_query.c 
  Log:
  php_gmtime_r() fixes
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ftp/ftp.c?r1=1.123r2=1.124diff_format=u
Index: php-src/ext/ftp/ftp.c
diff -u php-src/ext/ftp/ftp.c:1.123 php-src/ext/ftp/ftp.c:1.124
--- php-src/ext/ftp/ftp.c:1.123 Mon Mar 26 08:02:36 2007
+++ php-src/ext/ftp/ftp.c   Thu Jun  7 08:58:38 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: ftp.c,v 1.123 2007/03/26 08:02:36 tony2001 Exp $ */
+/* $Id: ftp.c,v 1.124 2007/06/07 08:58:38 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1012,6 +1012,9 @@
/* figure out the GMT offset */
stamp = time(NULL);
gmt = php_gmtime_r(stamp, tmbuf);
+   if (!gmt) {
+   return -1;
+   }
gmt-tm_isdst = -1;
 
/* apply the GMT offset */
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.470r2=1.471diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.470 php-src/ext/session/session.c:1.471
--- php-src/ext/session/session.c:1.470 Wed May 16 01:32:28 2007
+++ php-src/ext/session/session.c   Thu Jun  7 08:58:38 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.470 2007/05/16 01:32:28 stas Exp $ */
+/* $Id: session.c,v 1.471 2007/06/07 08:58:38 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -930,11 +930,16 @@
 static inline void strcpy_gmt(char *ubuf, time_t *when)
 {
char buf[MAX_STR];
-   struct tm tm;
+   struct tm tm, *res;
int n;

-   php_gmtime_r(when, tm);
+   res = php_gmtime_r(when, tm);

+   if (!res) {
+   buf[0] = '\0';
+   return;
+   }
+
n = snprintf(buf, sizeof(buf), %s, %02d %s %d %02d:%02d:%02d GMT, /* 
SAFE */
week_days[tm.tm_wday], tm.tm_mday, 
month_names[tm.tm_mon], tm.tm_year + 1900, 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.93r2=1.94diff_format=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.93 
php-src/ext/standard/ftp_fopen_wrapper.c:1.94
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.93   Mon Apr 16 09:43:52 2007
+++ php-src/ext/standard/ftp_fopen_wrapper.cThu Jun  7 08:58:38 2007
@@ -18,7 +18,7 @@
|  Sara Golemon [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.93 2007/04/16 09:43:52 dmitry Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.94 2007/06/07 08:58:38 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -808,6 +808,9 @@
/* figure out the GMT offset */
stamp = time(NULL);
gmt = php_gmtime_r(stamp, tmbuf);
+   if (!gmt) {
+   goto mdtm_error;
+   }
gmt-tm_isdst = -1;
 
/* apply the GMT offset */
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/datetime.c?r1=1.144r2=1.145diff_format=u
Index: php-src/ext/standard/datetime.c
diff -u php-src/ext/standard/datetime.c:1.144 
php-src/ext/standard/datetime.c:1.145
--- php-src/ext/standard/datetime.c:1.144   Mon Jan  1 09:29:31 2007
+++ php-src/ext/standard/datetime.c Thu Jun  7 08:58:38 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: datetime.c,v 1.144 2007/01/01 09:29:31 sebastian Exp $ */
+/* $Id: datetime.c,v 1.145 2007/06/07 08:58:38 tony2001 Exp $ */
 
 #include php.h
 #include zend_operators.h
@@ -58,6 +58,12 @@
 
tm1 = php_gmtime_r(t, tmbuf);
str = emalloc(81);
+   str[0] = '\0';
+
+   if (!tm1) {
+   return str;
+   }
+
if (PG(y2k_compliance)) {
snprintf(str, 80, %s, %02d %s %04d %02d:%02d:%02d GMT,
day_short_names[tm1-tm_wday],
http://cvs.php.net/viewvc.cgi/php-src/ext/interbase/ibase_query.c?r1=1.32r2=1.33diff_format=u
Index: php-src/ext/interbase/ibase_query.c
diff -u php-src/ext/interbase/ibase_query.c:1.32 
php-src/ext/interbase/ibase_query.c:1.33
--- php-src/ext/interbase/ibase_query.c:1.32Fri Mar 16 09:30:18 2007
+++ php-src/ext/interbase/ibase_query.c Thu Jun  7 08:58:38 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ibase_query.c,v 1.32 2007/03/16 09:30:18 tony2001 Exp $ */
+/* $Id: ibase_query.c,v 1.33 2007/06/07 08:58:38 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/ftp ftp.c /ext/interbase ibase_query.c /ext/session session.c /ext/standard datetime.c ftp_fopen_wrapper.c

2007-06-07 Thread Antony Dovgal
tony2001Thu Jun  7 08:59:00 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/ftpftp.c 
/php-src/ext/sessionsession.c 
/php-src/ext/standard   ftp_fopen_wrapper.c datetime.c 
/php-src/ext/interbase  ibase_query.c 
  Log:
  MFH: php_gmtime_r() fixes
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ftp/ftp.c?r1=1.112.2.4.2.8r2=1.112.2.4.2.9diff_format=u
Index: php-src/ext/ftp/ftp.c
diff -u php-src/ext/ftp/ftp.c:1.112.2.4.2.8 php-src/ext/ftp/ftp.c:1.112.2.4.2.9
--- php-src/ext/ftp/ftp.c:1.112.2.4.2.8 Sat Mar 24 16:25:42 2007
+++ php-src/ext/ftp/ftp.c   Thu Jun  7 08:59:00 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: ftp.c,v 1.112.2.4.2.8 2007/03/24 16:25:42 iliaa Exp $ */
+/* $Id: ftp.c,v 1.112.2.4.2.9 2007/06/07 08:59:00 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1012,6 +1012,9 @@
/* figure out the GMT offset */
stamp = time(NULL);
gmt = php_gmtime_r(stamp, tmbuf);
+   if (!gmt) {
+   return -1;
+   }
gmt-tm_isdst = -1;
 
/* apply the GMT offset */
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.34r2=1.417.2.8.2.35diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.34 
php-src/ext/session/session.c:1.417.2.8.2.35
--- php-src/ext/session/session.c:1.417.2.8.2.34Wed May 16 01:18:14 2007
+++ php-src/ext/session/session.c   Thu Jun  7 08:59:00 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.34 2007/05/16 01:18:14 stas Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.35 2007/06/07 08:59:00 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -946,10 +946,15 @@
 static void strcpy_gmt(char *ubuf, time_t *when)
 {
char buf[MAX_STR];
-   struct tm tm;
+   struct tm tm, *res;
int n;

-   php_gmtime_r(when, tm);
+   res = php_gmtime_r(when, tm);
+
+   if (!res) {
+   buf[0] = '\0';
+   return;
+   }

n = slprintf(buf, sizeof(buf), %s, %02d %s %d %02d:%02d:%02d GMT, /* 
SAFE */
week_days[tm.tm_wday], tm.tm_mday, 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.85.2.4.2.1r2=1.85.2.4.2.2diff_format=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.1 
php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.2
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.1   Mon Jan  1 
09:36:08 2007
+++ php-src/ext/standard/ftp_fopen_wrapper.cThu Jun  7 08:59:00 2007
@@ -18,7 +18,7 @@
|  Sara Golemon [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.85.2.4.2.1 2007/01/01 09:36:08 sebastian Exp $ 
*/
+/* $Id: ftp_fopen_wrapper.c,v 1.85.2.4.2.2 2007/06/07 08:59:00 tony2001 Exp $ 
*/
 
 #include php.h
 #include php_globals.h
@@ -808,6 +808,9 @@
/* figure out the GMT offset */
stamp = time(NULL);
gmt = php_gmtime_r(stamp, tmbuf);
+   if (!gmt) {
+   goto mdtm_error;
+   }
gmt-tm_isdst = -1;
 
/* apply the GMT offset */
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/datetime.c?r1=1.134.2.2.2.3r2=1.134.2.2.2.4diff_format=u
Index: php-src/ext/standard/datetime.c
diff -u php-src/ext/standard/datetime.c:1.134.2.2.2.3 
php-src/ext/standard/datetime.c:1.134.2.2.2.4
--- php-src/ext/standard/datetime.c:1.134.2.2.2.3   Mon Jan  1 09:36:08 2007
+++ php-src/ext/standard/datetime.c Thu Jun  7 08:59:00 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: datetime.c,v 1.134.2.2.2.3 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: datetime.c,v 1.134.2.2.2.4 2007/06/07 08:59:00 tony2001 Exp $ */
 
 #include php.h
 #include zend_operators.h
@@ -58,6 +58,12 @@
 
tm1 = php_gmtime_r(t, tmbuf);
str = emalloc(81);
+   str[0] = '\0';
+
+   if (!tm1) {
+   return str;
+   }
+
if (PG(y2k_compliance)) {
snprintf(str, 80, %s, %02d %s %04d %02d:%02d:%02d GMT,
day_short_names[tm1-tm_wday],
http://cvs.php.net/viewvc.cgi/php-src/ext/interbase/ibase_query.c?r1=1.23.2.1.2.9r2=1.23.2.1.2.10diff_format=u
Index: php-src/ext/interbase/ibase_query.c
diff -u php-src/ext/interbase/ibase_query.c:1.23.2.1.2.9 
php-src/ext/interbase/ibase_query.c:1.23.2.1.2.10
--- php-src/ext/interbase/ibase_query.c:1.23.2.1.2.9Thu Mar 15 22:33:04 2007
+++ php-src/ext/interbase/ibase_query.c Thu Jun  7 08:59:00 2007
@@ -16,7 +16,7 @@

[PHP-CVS] cvs: php-src /ext/calendar easter.c /ext/pdo_sqlite/sqlite/src date.c /ext/sqlite/libsqlite/src date.c /ext/standard info.c /ext/xmlrpc/libxmlrpc xmlrpc.c

2007-06-07 Thread Antony Dovgal
tony2001Thu Jun  7 09:07:12 2007 UTC

  Modified files:  
/php-src/ext/pdo_sqlite/sqlite/src  date.c 
/php-src/ext/calendar   easter.c 
/php-src/ext/sqlite/libsqlite/src   date.c 
/php-src/ext/standard   info.c 
/php-src/ext/xmlrpc/libxmlrpc   xmlrpc.c 
  Log:
  php_localtime_r() checks
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite/src/date.c?r1=1.8r2=1.9diff_format=u
Index: php-src/ext/pdo_sqlite/sqlite/src/date.c
diff -u php-src/ext/pdo_sqlite/sqlite/src/date.c:1.8 
php-src/ext/pdo_sqlite/sqlite/src/date.c:1.9
--- php-src/ext/pdo_sqlite/sqlite/src/date.c:1.8Wed Dec  6 13:20:17 2006
+++ php-src/ext/pdo_sqlite/sqlite/src/date.cThu Jun  7 09:07:12 2007
@@ -415,8 +415,10 @@
   computeJD(x);
   t = (x.rJD-2440587.5)*86400.0 + 0.5;
   sqlite3OsEnterMutex();
-  pTm = php_localtime_r
-(t, tmbuf);
+  pTm = php_localtime_r(t, tmbuf);
+  if (!pTm) {
+ return 0;
+  }
   y.Y = pTm-tm_year + 1900;
   y.M = pTm-tm_mon + 1;
   y.D = pTm-tm_mday;
http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/easter.c?r1=1.20r2=1.21diff_format=u
Index: php-src/ext/calendar/easter.c
diff -u php-src/ext/calendar/easter.c:1.20 php-src/ext/calendar/easter.c:1.21
--- php-src/ext/calendar/easter.c:1.20  Mon Jan  1 09:29:21 2007
+++ php-src/ext/calendar/easter.c   Thu Jun  7 09:07:12 2007
@@ -36,10 +36,14 @@
/* Default to the current year if year parameter is not given */
{
time_t a;
-   struct tm b;
+   struct tm b, *res;
time(a);
-   php_localtime_r(a, b);
-   year = 1900 + b.tm_year;
+   res = php_localtime_r(a, b);
+   if (!res) {
+   year = 1900;
+   } else {
+   year = 1900 + b.tm_year;
+   }
}
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/libsqlite/src/date.c?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/date.c
diff -u php-src/ext/sqlite/libsqlite/src/date.c:1.6 
php-src/ext/sqlite/libsqlite/src/date.c:1.7
--- php-src/ext/sqlite/libsqlite/src/date.c:1.6 Mon Jan  1 09:29:30 2007
+++ php-src/ext/sqlite/libsqlite/src/date.c Thu Jun  7 09:07:12 2007
@@ -16,7 +16,7 @@
 ** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: date.c,v 1.6 2007/01/01 09:29:30 sebastian Exp $
+** $Id: date.c,v 1.7 2007/06/07 09:07:12 tony2001 Exp $
 **
 ** NOTES:
 **
@@ -418,6 +418,9 @@
   t = (x.rJD-2440587.5)*86400.0 + 0.5;
   sqliteOsEnterMutex();
   pTm = php_localtime_r(t, tmbuf);
+  if (!pTm) {
+ return 0;
+  }
   y.Y = pTm-tm_year + 1900;
   y.M = pTm-tm_mon + 1;
   y.D = pTm-tm_mday;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.278r2=1.279diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.278 php-src/ext/standard/info.c:1.279
--- php-src/ext/standard/info.c:1.278   Mon Apr  2 12:42:18 2007
+++ php-src/ext/standard/info.c Thu Jun  7 09:07:12 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.278 2007/04/02 12:42:18 sniper Exp $ */
+/* $Id: info.c,v 1.279 2007/06/07 09:07:12 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -1002,7 +1002,7 @@
the_time = time(NULL);
ta = php_localtime_r(the_time, tmbuf);
 
-   if ((ta-tm_mon==3)  (ta-tm_mday==1)) {
+   if (ta  (ta-tm_mon==3)  (ta-tm_mday==1)) {
logo_guid = PHP_EGG_LOGO_GUID;
} else {
logo_guid = PHP_LOGO_GUID;
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c?r1=1.10r2=1.11diff_format=u
Index: php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.10 
php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.11
--- php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.10  Mon Jan  1 09:29:33 2007
+++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c   Thu Jun  7 09:07:12 2007
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.10 2007/01/01 09:29:33 
sebastian Exp $;
+static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.11 2007/06/07 09:07:12 
tony2001 Exp $;
 
 
 /h* ABOUT/xmlrpc
@@ -43,6 +43,9 @@
  *   9/1999 - 10/2000
  * HISTORY
  *   $Log: xmlrpc.c,v $
+ *   Revision 1.11  2007/06/07 09:07:12  tony2001
+ *   php_localtime_r() checks
+ *
  *   Revision 1.10  2007/01/01 09:29:33  sebastian
  *   Bump year.
  *
@@ -239,6 +242,9 @@
 static int date_to_ISO8601 (time_t value, char *buf, int length) {
struct tm *tm, tmbuf;
tm = php_localtime_r(value, tmbuf);
+   if (!tm) {
+  return 0;
+   }
 #if 0  /* TODO: soap seems to favor this method. xmlrpc the latter. */
return strftime (buf, length, %Y-%m-%dT%H:%M:%SZ, tm);
 #else

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/calendar easter.c /ext/pdo_sqlite/sqlite/src date.c /ext/sqlite/libsqlite/src date.c /ext/standard info.c /ext/xmlrpc/libxmlrpc xmlrpc.c

2007-06-07 Thread Antony Dovgal
tony2001Thu Jun  7 09:07:36 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo_sqlite/sqlite/src  date.c 
/php-src/ext/calendar   easter.c 
/php-src/ext/sqlite/libsqlite/src   date.c 
/php-src/ext/standard   info.c 
/php-src/ext/xmlrpc/libxmlrpc   xmlrpc.c 
  Log:
  MFH: php_localtime_r() checks
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite/src/date.c?r1=1.3.2.2.2.5r2=1.3.2.2.2.6diff_format=u
Index: php-src/ext/pdo_sqlite/sqlite/src/date.c
diff -u php-src/ext/pdo_sqlite/sqlite/src/date.c:1.3.2.2.2.5 
php-src/ext/pdo_sqlite/sqlite/src/date.c:1.3.2.2.2.6
--- php-src/ext/pdo_sqlite/sqlite/src/date.c:1.3.2.2.2.5Mon Apr  9 
16:35:11 2007
+++ php-src/ext/pdo_sqlite/sqlite/src/date.cThu Jun  7 09:07:36 2007
@@ -417,6 +417,9 @@
   t = (x.rJD-2440587.5)*86400.0 + 0.5;
   sqlite3OsEnterMutex();
   pTm = php_localtime_r(t, tmbuf);
+  if (!pTm) {
+ return 0;
+  }
   y.Y = pTm-tm_year + 1900;
   y.M = pTm-tm_mon + 1;
   y.D = pTm-tm_mday;
http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/easter.c?r1=1.18.2.1.2.1r2=1.18.2.1.2.2diff_format=u
Index: php-src/ext/calendar/easter.c
diff -u php-src/ext/calendar/easter.c:1.18.2.1.2.1 
php-src/ext/calendar/easter.c:1.18.2.1.2.2
--- php-src/ext/calendar/easter.c:1.18.2.1.2.1  Mon Jan  1 09:35:48 2007
+++ php-src/ext/calendar/easter.c   Thu Jun  7 09:07:36 2007
@@ -36,10 +36,14 @@
/* Default to the current year if year parameter is not given */
{
time_t a;
-   struct tm b;
+   struct tm b, *res;
time(a);
-   php_localtime_r(a, b);
-   year = 1900 + b.tm_year;
+   res = php_localtime_r(a, b);
+   if (!res) {
+   year = 1900;
+   } else {
+   year = 1900 + b.tm_year;
+   }
}
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/libsqlite/src/date.c?r1=1.3.4.1.2.2r2=1.3.4.1.2.3diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/date.c
diff -u php-src/ext/sqlite/libsqlite/src/date.c:1.3.4.1.2.2 
php-src/ext/sqlite/libsqlite/src/date.c:1.3.4.1.2.3
--- php-src/ext/sqlite/libsqlite/src/date.c:1.3.4.1.2.2 Fri Dec  1 20:24:58 2006
+++ php-src/ext/sqlite/libsqlite/src/date.c Thu Jun  7 09:07:36 2007
@@ -16,7 +16,7 @@
 ** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: date.c,v 1.3.4.1.2.2 2006/12/01 20:24:58 fmk Exp $
+** $Id: date.c,v 1.3.4.1.2.3 2007/06/07 09:07:36 tony2001 Exp $
 **
 ** NOTES:
 **
@@ -420,6 +420,9 @@
   t = (x.rJD-2440587.5)*86400.0 + 0.5;
   sqliteOsEnterMutex();
   pTm = php_localtime_r(t, tmbuf);
+  if (!pTm) {
+ return 0;
+  }
   y.Y = pTm-tm_year + 1900;
   y.M = pTm-tm_mon + 1;
   y.D = pTm-tm_mday;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.249.2.10.2.11r2=1.249.2.10.2.12diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.249.2.10.2.11 
php-src/ext/standard/info.c:1.249.2.10.2.12
--- php-src/ext/standard/info.c:1.249.2.10.2.11 Mon Apr  2 12:41:07 2007
+++ php-src/ext/standard/info.c Thu Jun  7 09:07:36 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.249.2.10.2.11 2007/04/02 12:41:07 sniper Exp $ */
+/* $Id: info.c,v 1.249.2.10.2.12 2007/06/07 09:07:36 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -1066,7 +1066,7 @@
the_time = time(NULL);
ta = php_localtime_r(the_time, tmbuf);
 
-   if ((ta-tm_mon==3)  (ta-tm_mday==1)) {
+   if (ta  (ta-tm_mon==3)  (ta-tm_mday==1)) {
logo_guid = PHP_EGG_LOGO_GUID;
} else {
logo_guid = PHP_LOGO_GUID;
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c?r1=1.8.4.1r2=1.8.4.2diff_format=u
Index: php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8.4.1 
php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8.4.2
--- php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8.4.1   Thu Nov 30 16:38:37 2006
+++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c   Thu Jun  7 09:07:36 2007
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.8.4.1 2006/11/30 16:38:37 
iliaa Exp $;
+static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.8.4.2 2007/06/07 09:07:36 
tony2001 Exp $;
 
 
 /h* ABOUT/xmlrpc
@@ -43,6 +43,9 @@
  *   9/1999 - 10/2000
  * HISTORY
  *   $Log: xmlrpc.c,v $
+ *   Revision 1.8.4.2  2007/06/07 09:07:36  tony2001
+ *   MFH: php_localtime_r() checks
+ *
  *   Revision 1.8.4.1  2006/11/30 16:38:37  iliaa
  *   last set of zts fixes
  *
@@ -236,6 +239,9 @@
 static int date_to_ISO8601 (time_t value, char *buf, int length) {
struct tm *tm, tmbuf;
tm = php_localtime_r(value, tmbuf);
+   if (!tm) {
+  return 0;
+   }
 #if 0  /* 

RE: [PHP-CVS] cvs: php-src(PHP_5_2) / Makefile.global

2007-06-07 Thread Jani Taskinen
I was afraid that would happen. :)
But can't those warnings be suppressed either by excluding
E_CORE_WARNING in error_reporting directive or by setting
display_startup_errors to off..? 

Another issue that might be a problem is that you have some extension
in your php.ini which you're not compiling the time you run 'make test'.
Can't remember if that causes a fatal error or what..(if extension does
not exist :)

--Jani

On Thu, 2007-06-07 at 11:27 +0400, Dmitry Stogov wrote:
 Hi Jani,
 
 After this patch all my tests failed, because PHP tries to load extensions
 twice.
 First from php.ini and then from command line (-d extension=...).
 
 I like your idea, as it's going to allow testing of ALL compileed extensions
 before installation, but it doesn't work yet.
 
 Thanks. Dmitry.
 
  -Original Message-
  From: Jani Taskinen [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday, June 06, 2007 10:28 PM
  To: php-cvs@lists.php.net
  Subject: [PHP-CVS] cvs: php-src(PHP_5_2) / Makefile.global 
  
  
  sniper  Wed Jun  6 18:28:14 2007 UTC
  
Modified files:  (Branch: PHP_5_2)
  /php-srcMakefile.global 
Log:
MFH:- Fix passing of shared extensions to run-tests.php

  http://cvs.php.net/viewvc.cgi/php-src/Makefile.global?r1=1.57.
  2.5.2.2r2=1.57.2.5.2.3diff_format=u
  Index: php-src/Makefile.global
  diff -u php-src/Makefile.global:1.57.2.5.2.2 
  php-src/Makefile.global:1.57.2.5.2.3
  --- php-src/Makefile.global:1.57.2.5.2.2Wed Apr 11 16:03:06 2007
  +++ php-src/Makefile.global Wed Jun  6 18:28:13 2007
  @@ -69,22 +69,26 @@
  
   install-su: install-pear
   
  +PHP_TEST_SHARED_EXTENSIONS=`(for i in $(PHP_MODULES); do . 
  $$i ; echo 
  +-n -d extension=$$dlname ; done)` PHP_TEST_SETTINGS=-d 
  +'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 
  +'memory_limit=-1'
  +
   test: all 
  [EMAIL PROTECTED] test ! -z $(PHP_EXECUTABLE)  test -x 
  $(PHP_EXECUTABLE); then \
  TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
  TEST_PHP_SRCDIR=$(top_srcdir) \
  CC=$(CC) \
  -   $(PHP_EXECUTABLE) -d 'open_basedir=' -d 
  'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' 
  $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( 
  . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \
  +   $(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) 
  $(top_srcdir)/run-tests.php 
  +-d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
  elif test ! -z $(SAPI_CLI_PATH)  test -x 
  $(SAPI_CLI_PATH); then \
  TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
  TEST_PHP_SRCDIR=$(top_srcdir) \
  CC=$(CC) \
  -   $(top_builddir)/$(SAPI_CLI_PATH) -d 
  'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 
  'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \
  +   $(top_builddir)/$(SAPI_CLI_PATH) 
  $(PHP_TEST_SETTINGS) 
  +$(top_srcdir)/run-tests.php -d 
  extension_dir=$(top_builddir)/modules/ 
  $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
  else \
  echo ERROR: Cannot run tests without CLI sapi.; \
  fi
   
   clean:
  +   find . -name \*.gcno -o -name \*.gcda | xargs rm -f
  find . -name \*.lo -o -name \*.o | xargs rm -f
  find . -name \*.la -o -name \*.a | xargs rm -f 
  find . -name \*.so | xargs rm -f
  
  -- 
  PHP CVS Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard url_scanner_ex.c

2007-06-07 Thread Jani Taskinen
And another one seems to be ext/pdo/pdo_sql_parser.re.
Is there some reason not to have the build rules for these?

The generated .c files can still be committed and the -g for gcc 
forced in the Makefile.frag if re2c exists..

--Jani 

On Thu, 2007-06-07 at 08:06 +0200, Marcus Boerger wrote:
 Hello Jani,
 
   we have .re files that are being generated only manually. For one instance
 look into date lib.
 
 best regards
 marcus
 
 Thursday, June 7, 2007, 2:41:10 AM, you wrote:
 
  What do you mean with not all .re files have rules ??
 
  --Jani
 
  Marcus Boerger kirjoitti:
  Hello Nuno,
  
not all .re files have rules. MAybe we could collect the .re files in the
  buildconf or configure process and automatically generate a makefile
  target re2c if re2c is available. This rulesset might as well check if we
  develop using gcc and pass -g to re2c in that case.
  
  best regards
  marcus
  
  Wednesday, June 6, 2007, 6:29:27 PM, you wrote:
  
  yep. letting 'make' regenerate the files should do the trick.
  Thanks,
  Nuno
  
  - Original Message - 
  I guess you need to generate the files the correct way  
  It should happen automatically when you do the test build..?  
  (just don't run re2c manually)
 
  --Jani
 
  Antony Dovgal kirjoitti:
  On 06.06.2007 20:00, Ilia Alshanetsky wrote:
  Nuno,
 
  What does the gcov build need that my re2c is not doing so that I can  
  fix it for the future.
  Apparently it needs full path, not just filename.
  
  
  
  
  Best regards,
   Marcus
  
 
 
 
 Best regards,
  Marcus
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysql php_mysql.c

2007-06-07 Thread Antony Dovgal
tony2001Thu Jun  7 12:17:16 2007 UTC

  Modified files:  
/php-src/ext/mysql  php_mysql.c 
  Log:
  reset active_result_id when fetching persistent connection
  patch by Peter Christensen
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.236r2=1.237diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.236 php-src/ext/mysql/php_mysql.c:1.237
--- php-src/ext/mysql/php_mysql.c:1.236 Mon May 28 23:43:24 2007
+++ php-src/ext/mysql/php_mysql.c   Thu Jun  7 12:17:16 2007
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.236 2007/05/28 23:43:24 iliaa Exp $ */
+/* $Id: php_mysql.c,v 1.237 2007/06/07 12:17:16 tony2001 Exp $ */
 
 /* TODO:
  *
@@ -671,6 +671,7 @@
 #endif
 
mysql = (php_mysql_conn *) le-ptr;
+   mysql-active_result_id = 0;
}
ZEND_REGISTER_RESOURCE(return_value, mysql, le_plink);
} else { /* non persistent */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysql php_mysql.c

2007-06-07 Thread Antony Dovgal
tony2001Thu Jun  7 12:17:35 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/mysql  php_mysql.c 
  Log:
  MFH: reset active_result_id when fetching persistent connection
  patch by Peter Christensen
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.12r2=1.213.2.6.2.13diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6.2.12 
php-src/ext/mysql/php_mysql.c:1.213.2.6.2.13
--- php-src/ext/mysql/php_mysql.c:1.213.2.6.2.12Mon May 14 18:09:20 2007
+++ php-src/ext/mysql/php_mysql.c   Thu Jun  7 12:17:35 2007
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.213.2.6.2.12 2007/05/14 18:09:20 scottmac Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.13 2007/06/07 12:17:35 tony2001 Exp $ */
 
 /* TODO:
  *
@@ -738,6 +738,7 @@
 #endif
 
mysql = (php_mysql_conn *) le-ptr;
+   mysql-active_result_id = 0;
}
ZEND_REGISTER_RESOURCE(return_value, mysql, le_plink);
} else { /* non persistent */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c

2007-06-07 Thread Stanislav Malyshev
I think this one is still not right. Try N = -1, you should be getting 
23, but you'd get 0.



+   N = floor(N / 24) * 24 + 24;
}
 
 	switch (retformat) {




--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2007-06-07 Thread Philip Olson
philip  Thu Jun  7 18:15:40 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Give Ron Korving (ron) phpdoc karma
  
  http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1277r2=1.1278diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1277 CVSROOT/avail:1.1278
--- CVSROOT/avail:1.1277Mon Jun  4 14:55:07 2007
+++ CVSROOT/avail   Thu Jun  7 18:15:39 2007
@@ -40,7 +40,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.
 
-avail|jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,dbs,frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief97!
 
7,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodiv!
 e,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,ti
x,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhit!
 
ama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,nlopess,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan,jellybob,lauer,shenkong,jad,robert,peterhuewe,ogre,techtonik,narigone,realtebo,krid,mclay,dasch,miwaniec,abdshomad,sammywg,aeoris,mez,jed,hsc,luckec,dmytton,choudesh,phpvcn,simp,michael,grantc,atex,katja,sthulbourn,mikl,kevinsz,roast,lsmith,tessus,gavinfo,rant,colder,ramsey,arkadius,bjori,erinet,omar,sixd,oliver,rquadling,timo,shadda,joeaccord,ezyang,ljbuesch,knut,asonge,gwynne,mkoppanen|phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-!
 fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-
ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c

2007-06-07 Thread Ilia Alshanetsky
iliaa   Thu Jun  7 23:16:04 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/date   php_date.c 
  Log:
  
  Final shot at the date issue
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.49r2=1.43.2.45.2.50diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.49 
php-src/ext/date/php_date.c:1.43.2.45.2.50
--- php-src/ext/date/php_date.c:1.43.2.45.2.49  Thu Jun  7 08:44:40 2007
+++ php-src/ext/date/php_date.c Thu Jun  7 23:16:04 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.49 2007/06/07 08:44:40 tony2001 Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.50 2007/06/07 23:16:04 iliaa Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2330,10 +2330,8 @@
}
N = (calc_sunset ? h_set : h_rise) + gmt_offset;
 
-   if (N  24) {
+   if (N  24 || N  0) {
N -= floor(N / 24) * 24;
-   } else if (N  0) {
-   N = floor(N / 24) * 24 + 24;
}
 
switch (retformat) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c

2007-06-07 Thread Ilia Alshanetsky
iliaa   Thu Jun  7 23:16:41 2007 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  
  MFB: Final shot at the date issue
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.140r2=1.141diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.140 php-src/ext/date/php_date.c:1.141
--- php-src/ext/date/php_date.c:1.140   Thu Jun  7 08:46:32 2007
+++ php-src/ext/date/php_date.c Thu Jun  7 23:16:41 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.140 2007/06/07 08:46:32 tony2001 Exp $ */
+/* $Id: php_date.c,v 1.141 2007/06/07 23:16:41 iliaa Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2487,10 +2487,8 @@
}
N = (calc_sunset ? h_set : h_rise) + gmt_offset;
 
-   if (N  24) {
+   if (N  24 || N  0) {
N -= floor(N / 24) * 24;
-   } else if (N  0) {
-   N = floor(N / 24) * 24 + 24;
}
 
switch (retformat) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/bcmath bcmath.c

2007-06-07 Thread Ilia Alshanetsky
iliaa   Fri Jun  8 00:41:58 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/bcmath bcmath.c 
/php-srcNEWS 
  Log:
  
  Added missing error check inside bcpowmod().
  
http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/bcmath.c?r1=1.62.2.2.2.7r2=1.62.2.2.2.8diff_format=u
Index: php-src/ext/bcmath/bcmath.c
diff -u php-src/ext/bcmath/bcmath.c:1.62.2.2.2.7 
php-src/ext/bcmath/bcmath.c:1.62.2.2.2.8
--- php-src/ext/bcmath/bcmath.c:1.62.2.2.2.7Wed Jun  6 22:09:25 2007
+++ php-src/ext/bcmath/bcmath.c Fri Jun  8 00:41:57 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: bcmath.c,v 1.62.2.2.2.7 2007/06/06 22:09:25 tony2001 Exp $ */
+/* $Id: bcmath.c,v 1.62.2.2.2.8 2007/06/08 00:41:57 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -465,13 +465,17 @@
 
scale_int = (int) ((int)scale  0) ? 0 : scale;
 
-   bc_raisemod(first, second, mod, result, scale_int TSRMLS_CC);
-   if (result-n_scale  scale) {
-   result-n_scale = scale;
+   if (bc_raisemod(first, second, mod, result, scale_int TSRMLS_CC) != 
-1) {
+   if (result-n_scale  scale) {
+   result-n_scale = scale;
+   }
+   Z_STRVAL_P(return_value) = bc_num2str(result);
+   Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
+   Z_TYPE_P(return_value) = IS_STRING;
+   } else {
+   RETVAL_FALSE;
}
-   Z_STRVAL_P(return_value) = bc_num2str(result);
-   Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
-   Z_TYPE_P(return_value) = IS_STRING;
+   
bc_free_num(first);
bc_free_num(second);
bc_free_num(mod);
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.767r2=1.2027.2.547.2.768diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.767 php-src/NEWS:1.2027.2.547.2.768
--- php-src/NEWS:1.2027.2.547.2.767 Wed Jun  6 22:41:23 2007
+++ php-src/NEWSFri Jun  8 00:41:57 2007
@@ -8,6 +8,7 @@
 - Added missing open_basedir checks to CGI. (anight at eyelinkmedia dot com, 
   Tony)
 - Added missing format validator to unpack() function. (Ilia)
+- Added missing error check inside bcpowmod(). (Ilia)
 - Fixed several integer overflows in ImageCreate(), ImageCreateTrueColor(), 
   ImageCopyResampled() and ImageFilledPolygon() reported by Mattias Bengtsson. 
   (Tony)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/gd/libgd gd_gif_in.c

2007-06-07 Thread Pierre-Alain Joye
pajoye  Fri Jun  8 05:25:52 2007 UTC

  Modified files:  
/php-src/ext/gd/libgd   gd_gif_in.c 
  Log:
  - MFB: #41630, fix segfault when an invalid color index is present in the
image data
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.16r2=1.17diff_format=u
Index: php-src/ext/gd/libgd/gd_gif_in.c
diff -u php-src/ext/gd/libgd/gd_gif_in.c:1.16 
php-src/ext/gd/libgd/gd_gif_in.c:1.17
--- php-src/ext/gd/libgd/gd_gif_in.c:1.16   Wed Apr  4 11:42:54 2007
+++ php-src/ext/gd/libgd/gd_gif_in.cFri Jun  8 05:25:52 2007
@@ -590,6 +590,10 @@
/*} */
 
while ((v = LWZReadByte(fd, sd, FALSE, c, ZeroDataBlockP)) = 0 ) {
+   if (v = gdMaxColors) {
+   v = 0;
+   }
+
/* This how we recognize which colors are actually used. */
if (im-open[v]) {
im-open[v] = 0;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php