We are handing down an out of scope buffer.
Found by AddressSanitizer.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14627
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Feb 1 22:55:10 UTC 2021 on sn-devel-184
TALLOC_CTX *frame;
struct smb_acl_wrapper acl_wrapper = { 0 };
int fd = fsp_get_pathref_fd(fsp);
+ char buf[PATH_MAX] = {0};
struct smb_filename fname;
int ret;
if (fsp->fsp_flags.have_proc_fds) {
const char *proc_fd_path = NULL;
- char buf[PATH_MAX];
proc_fd_path = sys_proc_fd_path(fd, buf, sizeof(buf));
if (proc_fd_path == NULL) {