Fix unsafe usage of string data on Android

* src/dired.c (open_directory): Reload name after calling
maybe_quit, which might invoke GC.
This commit is contained in:
Po Lu 2024-05-29 17:11:11 +08:00
parent 3480ca8351
commit b8d880e059

View file

@ -126,6 +126,10 @@ open_directory (Lisp_Object dirname, Lisp_Object encoded_dirname, int *fdp)
else if (errno == EINTR)
{
maybe_quit ();
/* Reload the address of DIRNAME's data, as it might have been
relocated by GC. */
name = SSDATA (dirname);
goto again;
}
#endif