Commit d79fe1f7 authored by Eli Zaretskii's avatar Eli Zaretskii

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)
parent e555bca8
Pipeline #2205 failed with stage
in 90 minutes and 1 second
......@@ -1316,7 +1316,7 @@ the root directory. */)
/* Now concatenate the directory and name to new space in the stack frame. */
tlen = length + file_name_as_directory_slop + (nmlim - nm) + 1;
eassert (tlen > file_name_as_directory_slop + 1);
eassert (tlen >= file_name_as_directory_slop + 1);
#ifdef DOS_NT
/* Reserve space for drive specifier and escape prefix, since either
or both may need to be inserted. (The Microsoft x86 compiler
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment