summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-08-08 15:35:28 -0700
committerJeremy Allison <jra@samba.org>2012-08-09 12:06:54 -0700
commit526e875cec15761099438e17df3f56bc2bd5b761 (patch)
tree8ad776c58b3a25b8739b03cdaf330c295bc570b7 /source3/modules
parente1ec86a49ce1d7c3ebe99fc175ffad70a03c4a0b (diff)
downloadsamba-526e875cec15761099438e17df3f56bc2bd5b761.tar.gz
samba-526e875cec15761099438e17df3f56bc2bd5b761.tar.bz2
samba-526e875cec15761099438e17df3f56bc2bd5b761.zip
Check error returns from strupper_m() (in all reasonable places).
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,