]> git.eshelyaron.com Git - emacs.git/commit
Fixed ctags local command execute vulnerability
authorlu4nx <lx@shellcodes.org>
Fri, 25 Nov 2022 06:38:29 +0000 (14:38 +0800)
committerStefan Kangas <stefankangas@gmail.com>
Fri, 17 Feb 2023 10:20:42 +0000 (11:20 +0100)
commit5d05ea803e9996c4c1edbe0fa0f6f5b05d2ffc87
treebe0fad63b9df6d2dbbefd8d1e787fb00304bda3c
parent22fb5ff5126dc8bb01edaa0252829d853afb284f
Fixed ctags local command execute vulnerability

* lib-src/etags.c:

(clean_matched_file_tag): New function
(do_move_file): New function
(readline_internal):
Add `leave_cr` parameter, if true, include the \r character

* test/manual/etags/CTAGS.good_crlf: New file
* test/manual/etags/CTAGS.good_update: New file
* test/manual/etags/crlf: New file
* test/manual/etags/Makefile: Add `ctags -u` test cases

(cherry picked from commit d48bb4874bc6cd3e69c7a15fc3c91cc141025c51)
lib-src/etags.c
test/manual/etags/CTAGS.good_crlf [new file with mode: 0644]
test/manual/etags/CTAGS.good_update [new file with mode: 0644]
test/manual/etags/Makefile
test/manual/etags/crlf [new file with mode: 0644]