diff options
| author | Eli Zaretskii | 2019-06-22 11:59:16 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-06-22 11:59:16 +0300 |
| commit | d79fe1f7772a3ea6f998aeab10fe845f14493084 (patch) | |
| tree | db377a1e06a4f0e80a24f1879a634b16432542fb | |
| parent | e555bca80d615646ea2c435a4f5fcc675e88d59c (diff) | |
| download | emacs-d79fe1f7772a3ea6f998aeab10fe845f14493084.tar.gz emacs-d79fe1f7772a3ea6f998aeab10fe845f14493084.zip | |
Fix an off-by-one error in assertion
* src/fileio.c (Fexpand_file_name): Fix off-by-one error in an
assertion. This avoids assertion violations when the home
directory is an empty string for some reason. (Bug#36363)
| -rw-r--r-- | src/fileio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index b141f568d70..5dd14daacb4 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1316,7 +1316,7 @@ the root directory. */) | |||
| 1316 | 1316 | ||
| 1317 | /* Now concatenate the directory and name to new space in the stack frame. */ | 1317 | /* Now concatenate the directory and name to new space in the stack frame. */ |
| 1318 | tlen = length + file_name_as_directory_slop + (nmlim - nm) + 1; | 1318 | tlen = length + file_name_as_directory_slop + (nmlim - nm) + 1; |
| 1319 | eassert (tlen > file_name_as_directory_slop + 1); | 1319 | eassert (tlen >= file_name_as_directory_slop + 1); |
| 1320 | #ifdef DOS_NT | 1320 | #ifdef DOS_NT |
| 1321 | /* Reserve space for drive specifier and escape prefix, since either | 1321 | /* Reserve space for drive specifier and escape prefix, since either |
| 1322 | or both may need to be inserted. (The Microsoft x86 compiler | 1322 | or both may need to be inserted. (The Microsoft x86 compiler |