]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
source3/adouble: Assert fsp is not NULL in ad_fget()
authorAnoop C S <anoopcs@samba.org>
Wed, 13 May 2026 06:25:06 +0000 (11:55 +0530)
committerMartin Schwenke <martins@samba.org>
Thu, 21 May 2026 02:21:29 +0000 (02:21 +0000)
The DBG_DEBUG() in ad_open() dereferences smb_fname, which can be NULL
when ad_fget() calls ad_get_internal(). Add an SMB_ASSERT() guard in
ad_fget() to catch this early.

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
source3/lib/adouble.c

index 62e09587a458e5ed2edaff9ccddd7d682e6a1bae..5e445f0cdb85dedb026fec4b15c23724931b3c0a 100644 (file)
@@ -2662,6 +2662,7 @@ struct adouble *ad_get(TALLOC_CTX *ctx,
 struct adouble *ad_fget(TALLOC_CTX *ctx, vfs_handle_struct *handle,
                        files_struct *fsp, adouble_type_t type)
 {
+       SMB_ASSERT(fsp != NULL);
        return ad_get_internal(ctx, handle, fsp, NULL, type);
 }