]> git.eshelyaron.com Git - emacs.git/commit
Check for null bytes in filenames in 'expand-file-name' (bug#49723)
authorFederico Tedin <federicotedin@gmail.com>
Tue, 14 Sep 2021 22:15:16 +0000 (00:15 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 18 Sep 2021 06:36:26 +0000 (09:36 +0300)
commit4e21c5f451a18f96172e63dbe8a3ceef780758bb
treeeb8e8408ac1db13a0892eb20818189e3f3f086fd
parent62e870691d2192e7848e047734556dec21797a7b
Check for null bytes in filenames in 'expand-file-name' (bug#49723)

* src/fileio.c (expand-file-name): Check for null bytes for both
NAME and DEFAULT-DIRECTORY arguments.  Also check for null bytes
in buffer-local default-directory, assuming it is used.
* src/coding.c (encode_file_name): Use CHECK_STRING_NULL_BYTES.
* src/lisp.h (CHECK_STRING_NULL_BYTES): Add function for checking
for null bytes in Lisp strings.
* test/src/fileio-tests.el (fileio-test--expand-file-name-null-bytes):
Add test for new changes to expand-file-name.
* etc/NEWS: Announce changes.
etc/NEWS
src/coding.c
src/fileio.c
src/lisp.h
test/src/fileio-tests.el