summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_streams_depot.c5
-rw-r--r--source3/modules/vfs_streams_xattr.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c
index f984f75e9f..a3ce8c1cc5 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -345,7 +345,10 @@ static NTSTATUS stream_smb_fname(vfs_handle_struct *handle,
}
} else {
/* Normalize the stream type to upercase. */
- strupper_m(strrchr_m(stream_fname, ':') + 1);
+ if (!strupper_m(strrchr_m(stream_fname, ':') + 1)) {
+ status = NT_STATUS_INVALID_PARAMETER;
+ goto fail;
+ }
}
DEBUG(10, ("stream filename = %s\n", stream_fname));
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index 291531e59a..dd1135d77c 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -119,7 +119,9 @@ static NTSTATUS streams_xattr_get_name(TALLOC_CTX *ctx,
}
} else {
/* Normalize the stream type to upercase. */
- strupper_m(strrchr_m(*xattr_name, ':') + 1);
+ if (!strupper_m(strrchr_m(*xattr_name, ':') + 1)) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
}
DEBUG(10, ("xattr_name: %s, stream_name: %s\n", *xattr_name,