Subject: bug#56443: 28.1; Mac segmentation fault with ffap

From: Mattias Engdegård <[email-masked]>
Date: Fri, 8 Jul 2022 11:35:27 +0200

The call to file_name_directory returns nil (the argument being "mailto:[email-masked]"). What about:

@@ -2603,7 +2603,7 @@ DEFUN ("file-name-case-insensitive-p", Ffile_name_case_insensitive_p,
       Lisp_Object parent = file_name_directory (filename);
       /* Avoid infinite loop if the root has trouble
         (impossible?).  */
-      if (!NILP (Fstring_equal (parent, filename)))
+      if (!STRINGP (parent) || !NILP (Fstring_equal (parent, filename)))
        return Qnil;
       filename = parent;
     }