From: Volker Lendecke Date: Tue, 10 Apr 2018 19:05:09 +0000 (+0200) Subject: vfs_fruit: Fix CID 1416474 Dereference null return value X-Git-Tag: ldb-1.4.0~652 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37b094c3387310fc66eb523b4ccda4b587cf5e95;p=thirdparty%2Fsamba.git vfs_fruit: Fix CID 1416474 Dereference null return value Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 4299583b21b..0a8141a9e51 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -4065,6 +4065,11 @@ static ssize_t fruit_pread_rsrc(vfs_handle_struct *handle, struct fio *fio = (struct fio *)VFS_FETCH_FSP_EXTENSION(handle, fsp); ssize_t nread; + if (fio == NULL) { + errno = EINVAL; + return -1; + } + switch (fio->config->rsrc) { case FRUIT_RSRC_STREAM: nread = fruit_pread_rsrc_stream(handle, fsp, data, n, offset);