git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
808b7e2
)
CID 1416476: possibly dereferencing NULL in fruit_ftruncate_rsrc
author
Swen Schillig
<swen@vnet.ibm.com>
Fri, 25 May 2018 10:43:42 +0000
(12:43 +0200)
committer
Ralph Boehme
<slow@samba.org>
Wed, 13 Jun 2018 11:41:45 +0000
(13:41 +0200)
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_fruit.c
patch
|
blob
|
history
diff --git
a/source3/modules/vfs_fruit.c
b/source3/modules/vfs_fruit.c
index ec49e24817dbc1f1c80523f533b95ac1f6dbd0d7..b1384c478505f82cb6c9522e9ce3b7eb21170996 100644
(file)
--- a/
source3/modules/vfs_fruit.c
+++ b/
source3/modules/vfs_fruit.c
@@
-5501,6
+5501,11
@@
static int fruit_ftruncate_rsrc(struct vfs_handle_struct *handle,
struct fio *fio = (struct fio *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
int ret;
+ if (fio == NULL) {
+ DBG_ERR("Failed to fetch fsp extension");
+ return -1;
+ }
+
switch (fio->config->rsrc) {
case FRUIT_RSRC_XATTR:
ret = fruit_ftruncate_rsrc_xattr(handle, fsp, offset);