summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/com_persist.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/com_dotnet/com_persist.c')
-rwxr-xr-xext/com_dotnet/com_persist.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c
index 7bfc341e7..cdbcf6884 100755
--- a/ext/com_dotnet/com_persist.c
+++ b/ext/com_dotnet/com_persist.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_persist.c 293036 2010-01-03 09:23:27Z sebastian $ */
+/* $Id: com_persist.c 305507 2010-11-18 15:22:22Z pajoye $ */
/* Infrastructure for working with persistent COM objects.
* Implements: IStream* wrapper for PHP streams.
@@ -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;
}