diff options
| author | Philipp Stephani | 2020-12-23 12:00:46 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2020-12-23 12:00:46 +0100 |
| commit | 3cbd4169d6dd370b4fa8180fc2adfbf426f57837 (patch) | |
| tree | 11b24ad133c4f24f9e8d8798f4fb482944de15ab /lib/malloc/scratch_buffer_set_array_size.c | |
| parent | 3edc4fd53ff9e1355da2371400aac4d5897ca190 (diff) | |
| download | emacs-3cbd4169d6dd370b4fa8180fc2adfbf426f57837.tar.gz emacs-3cbd4169d6dd370b4fa8180fc2adfbf426f57837.zip | |
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.
Diffstat (limited to 'lib/malloc/scratch_buffer_set_array_size.c')
0 files changed, 0 insertions, 0 deletions