s3-vfs: Fix a null pointer deferference in vfs_media_harmony.
authorAndreas Schneider <asn@samba.org>
Mon, 17 Dec 2012 14:36:32 +0000 (15:36 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 21 Dec 2012 12:56:01 +0000 (13:56 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/modules/vfs_media_harmony.c

index bdbb750e9caa945bd85031177b6bada916e5709d..79b165c794f59803a468949522b8547a3c0f46f8 100644 (file)
@@ -1490,7 +1490,9 @@ static int mh_fstat(vfs_handle_struct *handle,
 out:
        DEBUG(MH_INFO_DEBUG, ("Leaving with fsp->fsp_name->st.st_ex_mtime "
                        "%s",
-                       ctime(&(fsp->fsp_name->st.st_ex_mtime.tv_sec))));
+                       fsp->fsp_name != NULL ?
+                               ctime(&(fsp->fsp_name->st.st_ex_mtime.tv_sec)) :
+                               "0"));
        return status;
 }