s3: libsmb: Fix use-after-free when accessing pointer *p.
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Sat, 22 Jul 2017 16:36:18 +0000 (09:36 -0700)
committerJeremy Allison <jra@samba.org>
Sat, 22 Jul 2017 20:45:05 +0000 (22:45 +0200)
commit890137cffedcaf88a9ff808c01335ee14fcfd8da
tree6c514f83a543dc184f1c8fc0ed58ce35f769de4c
parent6c45db6779615f70eb2c81377685c9707d6b548d
s3: libsmb: Fix use-after-free when accessing pointer *p.

talloc_asprintf_append() might call realloc()
and therefore move the memory address of "path".

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

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jul 22 22:45:05 CEST 2017 on sn-devel-144
source3/libsmb/libsmb_dir.c