From: Anoop C S Date: Wed, 13 May 2026 06:25:06 +0000 (+0530) Subject: source3/adouble: Assert fsp is not NULL in ad_fget() X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=234df17bc44b39c91db1f90dca048486e31d8b98;p=thirdparty%2Fsamba.git source3/adouble: Assert fsp is not NULL in ad_fget() 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 Reviewed-by: Martin Schwenke --- diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index 62e09587a45..5e445f0cdb8 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -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); }