sas             Sun Jan 12 08:05:33 2003 EDT

  Modified files:              
    /php4/ext/session   mod_files.c 
  Log:
  handle ERANGE from strtol properly
  
  
Index: php4/ext/session/mod_files.c
diff -u php4/ext/session/mod_files.c:1.86 php4/ext/session/mod_files.c:1.87
--- php4/ext/session/mod_files.c:1.86   Fri Jan  3 09:24:07 2003
+++ php4/ext/session/mod_files.c        Sun Jan 12 08:05:32 2003
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mod_files.c,v 1.86 2003/01/03 14:24:07 hyanantha Exp $ */
+/* $Id: mod_files.c,v 1.87 2003/01/12 13:05:32 sas Exp $ */
 
 #include "php.h"
 
@@ -239,7 +239,12 @@
 
        data->fd = -1;
        if ((p = strchr(save_path, ';'))) {
+               errno = 0;
                data->dirdepth = (size_t) strtol(save_path, NULL, 10);
+               if (errno == ERANGE) {
+                       efree(data);
+                       return FAILURE;
+               }
                save_path = p + 1;
        }
        data->basedir_len = strlen(save_path);



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

Reply via email to