]> git.ipfire.org Git - thirdparty/samba.git/commit
vfs_streams_xattr: Fix segfault when running with log level 10
authorChristof Schmitt <cs@samba.org>
Wed, 13 Sep 2017 23:23:53 +0000 (16:23 -0700)
committerStefan Metzmacher <metze@samba.org>
Sat, 16 Sep 2017 07:35:25 +0000 (09:35 +0200)
commit9f768e26d40e22851c8a304f6915c127986cc189
treea3dc0e0cc1f5cb2a95c2391d5f5aaba03df29f93
parent5ad9d78a62d81146f4b8459d49c550ff0bfca7b7
vfs_streams_xattr: Fix segfault when running with log level 10

This happens when vfs_streams_xattr is loaded, log level is set to 10
and the default stream of a file or directory is accessed. In that case
streams_xattr_open does not allocate the stream_io fsp extension. The
DBG_DEBUG message in streams_xattr_fstat tries to access the stream_io
before checking for a NULL value, resulting in the crash. Fix this by
moving the debug message after the check for a NULL pointer.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13032

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Sep 14 10:58:12 CEST 2017 on sn-devel-144

(cherry picked from commit 1b6aa39fac0825b1f25fd62a6c67994b5c491170)
source3/modules/vfs_streams_xattr.c