diff options
author | Sascha Schumann <sas@php.net> | 2003-01-12 13:05:32 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2003-01-12 13:05:32 +0000 |
commit | 0b8401bf271eb02f4741064df55ee853edeb2594 (patch) | |
tree | d44e2b1c35211fa1fb30f4064798ee6ed8eb7071 | |
parent | 814045bba640146ef48c497886399318ce629435 (diff) | |
download | php-git-0b8401bf271eb02f4741064df55ee853edeb2594.tar.gz |
handle ERANGE from strtol properly
-rw-r--r-- | ext/session/mod_files.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index af6c1dbf1d..011ec1f770 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -239,7 +239,12 @@ PS_OPEN_FUNC(files) 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); |