From: Volker Lendecke Date: Thu, 4 Sep 2025 14:48:07 +0000 (+0200) Subject: vfs: Protect against an empty stream prefix X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b709da701080552b9a7f288c34f66ace219e0c04;p=thirdparty%2Fsamba.git vfs: Protect against an empty stream prefix Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index dd5e6b8164d..7ea42220207 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -1107,6 +1107,12 @@ static int streams_xattr_connect(vfs_handle_struct *handle, config->prefix_len = strlen(config->prefix); DEBUG(10, ("streams_xattr using stream prefix: %s\n", config->prefix)); + if (config->prefix_len == 0) { + DBG_WARNING("Empty prefix not valid\n"); + errno = EINVAL; + return -1; + } + config->store_stream_type = lp_parm_bool(SNUM(handle->conn), "streams_xattr", "store_stream_type",