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.c7
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;
}