bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21602: 25.0.50; coding system seg fault


From: Andreas Schwab
Subject: bug#21602: 25.0.50; coding system seg fault
Date: Sat, 03 Oct 2015 13:30:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> @@ -4526,6 +4529,7 @@ choose_write_coding_system (Lisp_Object start, 
> Lisp_Object end, Lisp_Object file
>    else if (!NILP (Vcoding_system_for_write))
>      {
>        val = Vcoding_system_for_write;
> +      CHECK_CODING_SYSTEM (val);
>        if (coding_system_require_warning
>         && !NILP (Ffboundp (Vselect_safe_coding_system_function)))
>       /* Confirm that VAL can surely encode the current region.  */
> @@ -4574,6 +4578,9 @@ choose_write_coding_system (Lisp_Object start, 
> Lisp_Object end, Lisp_Object file
>         using_default_coding = 1;
>       }
>  
> +      if (!NILP (val))
> +     CHECK_CODING_SYSTEM (val);
> +
>        if (! NILP (val) && ! force_raw_text)
>       {
>         Lisp_Object spec, attrs;

I think you also have to recheck val after calling
select-safe-coding-system, and default-buffer-file-coding-system.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]