Re: cvs: php-src /ext/calendar calendar.c

From: Date: Thu, 07 Apr 2005 19:00:17 +0000
Subject: Re: cvs: php-src /ext/calendar calendar.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-31283@lists.php.net to get a copy of this message
    Doesn't this problem exist in PHP_4_3 branch?
    --Jani
On Thu, 7 Apr 2005, Dmitry Stogov wrote:
dmitry Thu Apr 7 12:12:28 2005 EDT Modified files: /php-src/ext/calendar calendar.c Log: Fixed wrong result of cal_days_in_month() with bad dates http://cvs.php.net/diff.php/php-src/ext/calendar/calendar.c?r1=1.41&r2=1.42&ty=u Index: php-src/ext/calendar/calendar.c diff -u php-src/ext/calendar/calendar.c:1.41 php-src/ext/calendar/calendar.c:1.42 --- php-src/ext/calendar/calendar.c:1.41 Mon Oct 11 02:39:41 2004 +++ php-src/ext/calendar/calendar.c Thu Apr 7 12:12:27 2005 @@ -18,7 +18,7 @@
   |          Wez Furlong               <wez@thebrainroom.com>            |
+----------------------------------------------------------------------+ */ -/* $Id: calendar.c,v 1.41 2004/10/11 06:39:41 iliaa Exp $ */ +/* $Id: calendar.c,v 1.42 2005/04/07 16:12:27 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -246,6 +246,11 @@ sdn_start = calendar->to_jd(year, month, 1); + if (sdn_start == 0) {
+        php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid date.");
+        RETURN_FALSE;
+ } + sdn_next = calendar->to_jd(year, 1 + month, 1); if (sdn_next == 0) {


« previous php.cvs (#31283) next »