CID 1416477: possibly dereferencing NULL in fruit_pwrite_meta
authorSwen Schillig <swen@vnet.ibm.com>
Fri, 25 May 2018 09:39:50 +0000 (11:39 +0200)
committerRalph 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

index 956739dd5af8d4540baf8470bb5d4daac3e5a4c0..ec49e24817dbc1f1c80523f533b95ac1f6dbd0d7 100644 (file)
@@ -4328,6 +4328,11 @@ static ssize_t fruit_pwrite_meta(vfs_handle_struct *handle,
                return -1;
        }
 
+       if (fio == NULL) {
+               DBG_ERR("Failed to fetch fsp extension");
+               return -1;
+       }
+
        switch (fio->config->meta) {
        case FRUIT_META_STREAM:
                nwritten = fruit_pwrite_meta_stream(handle, fsp, data,