1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

CID 1416476: possibly dereferencing NULL in fruit_ftruncate_rsrc

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Swen Schillig 2018-05-25 12:43:42 +02:00 committed by Ralph Boehme
parent 808b7e2b03
commit 9715e55e65

View File

@ -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);