diff options
author | Paulo Alcantara <pc@cjr.nz> | 2021-05-06 16:25:13 -0300 |
---|---|---|
committer | Pavel Shilovsky <pshilovsky@samba.org> | 2021-07-08 16:11:30 -0700 |
commit | 9ad46fc480818e48868ba841a8a1eed9a74e7294 (patch) | |
tree | d0f609d519c060ad437f2daf2b390c561d0bc4d4 /checkopts | |
parent | 7f9711dd902a239c499682015d708f73ec884af2 (diff) | |
download | cifs-utils-9ad46fc480818e48868ba841a8a1eed9a74e7294.tar.gz cifs-utils-9ad46fc480818e48868ba841a8a1eed9a74e7294.tar.bz2 cifs-utils-9ad46fc480818e48868ba841a8a1eed9a74e7294.zip |
mount.cifs: fix crash when mount point does not exist
@mountpointp is initially set to a statically allocated string in
main(), and if we fail to update it in acquire_mountpoint(), make sure
to set it to NULL and avoid freeing it at mount_exit.
This fixes the following crash
$ mount.cifs //srv/share /mnt/foo/bar -o ...
Couldn't chdir to /mnt/foo/bar: No such file or directory
munmap_chunk(): invalid pointer
Aborted
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Diffstat (limited to 'checkopts')
0 files changed, 0 insertions, 0 deletions