]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
VFS: default: avoid a crash in vfswrap_getxattrat_do_sync()
authorRalph Boehme <slow@samba.org>
Mon, 24 Feb 2020 13:29:01 +0000 (14:29 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 25 Feb 2020 17:44:44 +0000 (17:44 +0000)
Must use tevent_req_data() to get our tevent_req state, talloc_get_type_abort()
will just crash as struct tevent_req != struct vfswrap_getxattrat_state.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_default.c

index b64071d6870c620fae219624bcd92db6aa57b19b..69a7eba5015d7c2d112aff6fa4e7cdb5aab1b3d3 100644 (file)
@@ -3325,7 +3325,7 @@ static struct tevent_req *vfswrap_getxattrat_send(
 
 static void vfswrap_getxattrat_do_sync(struct tevent_req *req)
 {
-       struct vfswrap_getxattrat_state *state = talloc_get_type_abort(
+       struct vfswrap_getxattrat_state *state = tevent_req_data(
                req, struct vfswrap_getxattrat_state);
        char *path = NULL;
        char *tofree = NULL;