diff options
| author | Pierre Joye <pajoye@php.net> | 2010-11-18 15:22:22 +0000 |
|---|---|---|
| committer | Pierre Joye <pajoye@php.net> | 2010-11-18 15:22:22 +0000 |
| commit | ce96fd6b0761d98353761bf78d5bfb55291179fd (patch) | |
| tree | 0b66c858477f5ac7472bf35b842f89cdf4dce151 /ext/com_dotnet/com_persist.c | |
| parent | 75631ab8ac231f141286428fd871ad31f2d71588 (diff) | |
| download | php-git-ce96fd6b0761d98353761bf78d5bfb55291179fd.tar.gz | |
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
Diffstat (limited to 'ext/com_dotnet/com_persist.c')
| -rwxr-xr-x | ext/com_dotnet/com_persist.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c index 9df476dc04..41bcc71333 100755 --- a/ext/com_dotnet/com_persist.c +++ b/ext/com_dotnet/com_persist.c @@ -389,6 +389,9 @@ CPH_METHOD(SaveToFile) } if (filename) { + if (strlen(filename) != filename_len) { + RETURN_FALSE; + } fullpath = expand_filepath(filename, NULL TSRMLS_CC); if (!fullpath) { RETURN_FALSE; @@ -453,6 +456,10 @@ CPH_METHOD(LoadFromFile) return; } + if (strlen(filename) != filename_len) { + RETURN_FALSE; + } + if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) { RETURN_FALSE; } |
