emacs/test/src
Philipp Stephani 3cbd4169d6 Reject filenames containing NUL bytes.
Such filenames are dangerous, as Emacs would silently only use the
part up to the first NUL byte.  Reject them explicitly instead.

* src/coding.c (encode_file_name_1): New helper function.
(encode_file_name): Check that encoded filename doesn't contain a
NUL byte.
(syms_of_coding): Define 'filenamep' symbol.

* test/src/fileio-tests.el (fileio-tests/null-character): New unit
test.

* etc/NEWS: Document change.
2020-12-23 12:00:46 +01:00
..
emacs-module-resources Document and enforce some properties for strings created by modules. 2020-12-12 23:28:22 +01:00
lread-resources Move some test data to follow our conventions 2020-10-23 16:29:46 +02:00
regex-resources ; Fix more typos 2020-10-03 12:53:51 +02:00
syntax-resources Enhance syntax-tests.el to test nestable comments (Lisp style) 2020-11-17 16:51:49 +00:00
alloc-tests.el Fix crash when sending Gnus message (Bug#39207) 2020-01-22 23:44:34 -08:00
buffer-tests.el Inhibit buffer hooks in temporary buffers 2020-12-20 17:32:24 +00:00
callint-tests.el Adapt some tests for Emacs's excitingly variable quoting format 2020-09-12 11:57:42 -07:00
callproc-tests.el Fix error in 'call-process-region' when START is nil (Bug#40576) 2020-04-12 19:04:11 +02:00
casefiddle-tests.el Fupcase no longer maps ?ß to itself (bug#11309) 2020-12-10 11:02:27 +01:00
charset-tests.el ; Fix license statements. 2020-08-27 02:53:25 +02:00
chartab-tests.el ; Fix license statements. 2020-08-27 02:53:25 +02:00
cmds-tests.el ; Fix license statements. 2020-08-27 02:53:25 +02:00
coding-tests.el Merge from origin/emacs-27 2020-10-02 09:38:24 -07:00
data-tests.el Prefer setq-local in tests 2020-12-08 08:57:22 +01:00
decompress-tests.el Use lexical-binding in most src tests 2020-04-24 18:25:13 +02:00
editfns-tests.el Use lexical-binding in more tests 2020-08-29 22:41:51 +02:00
emacs-module-tests.el Document and enforce some properties for strings created by modules. 2020-12-12 23:28:22 +01:00
eval-tests.el Add new variable to selectively suppress backtraces in batch mode. 2020-12-07 11:59:06 +01:00
fileio-tests.el Reject filenames containing NUL bytes. 2020-12-23 12:00:46 +01:00
floatfns-tests.el Use lexical-binding in most src tests 2020-04-24 18:25:13 +02:00
fns-tests.el Fix object-interval tests 2020-12-11 15:21:44 +01:00
font-tests.el Use lexical-binding in most src tests 2020-04-24 18:25:13 +02:00
indent-tests.el Fix 'move-to-column' when invisible text follows a TAB 2020-09-30 17:33:58 +03:00
inotify-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
json-tests.el Fix undefined behavior in json.c (Bug#42113) 2020-06-29 12:32:56 +02:00
keyboard-tests.el Give Lisp control on the lossage size 2020-09-17 16:32:18 +02:00
keymap-tests.el Convert apropos-internal from C to Lisp (Bug#44529) 2020-12-19 19:54:46 +01:00
lcms-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
lread-tests.el Move some test data to follow our conventions 2020-10-23 16:29:46 +02:00
marker-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
minibuf-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
print-tests.el Reduce integer-output-format to print-integers-as-characters 2020-11-06 13:55:32 +01:00
process-tests.el ; Fix license statements. 2020-08-27 02:53:25 +02:00
regex-emacs-tests.el Recognise ß properly as a lower-case letter (bug#11309) 2020-12-09 15:29:48 +01:00
syntax-tests.el Enhance syntax-tests.el to test nestable comments (Lisp style) 2020-11-17 16:51:49 +00:00
textprop-tests.el Use lexical-binding in most src tests 2020-04-24 18:25:13 +02:00
thread-tests.el Use lexical-binding in most src tests 2020-04-24 18:25:13 +02:00
timefns-tests.el ; Fix license statements. 2020-08-27 02:53:25 +02:00
undo-tests.el ; Fix license statement in several files 2020-10-28 03:41:55 +01:00
xdisp-tests.el ; Silence byte-compiler warning in xdisp-tests.el 2020-11-05 15:44:17 +01:00
xfaces-tests.el Minor improvements as followup to recent RGB string-parsing change 2020-06-22 18:32:01 +03:00
xml-tests.el Repurpose libxml test for obsolete argument 2020-09-26 11:48:09 +02:00