[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 272ca09: Avoid crashes in coding_inherit_eol_type
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 272ca09: Avoid crashes in coding_inherit_eol_type |
Date: |
Sat, 03 Oct 2015 12:40:22 +0000 |
branch: master
commit 272ca096356e30c67ce337855da7531994040255
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid crashes in coding_inherit_eol_type
* src/coding.c (coding_inherit_eol_type): Check the validity of
the arguments. Suggested by Andreas Schwab <address@hidden>.
(Bug#21602)
---
src/coding.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/coding.c b/src/coding.c
index 3fc6fb6..d265531 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -6004,6 +6004,7 @@ coding_inherit_eol_type (Lisp_Object coding_system,
Lisp_Object parent)
if (NILP (coding_system))
coding_system = Qraw_text;
+ CHECK_CODING_SYSTEM (coding_system);
spec = CODING_SYSTEM_SPEC (coding_system);
eol_type = AREF (spec, 2);
if (VECTORP (eol_type))
@@ -6014,6 +6015,7 @@ coding_inherit_eol_type (Lisp_Object coding_system,
Lisp_Object parent)
{
Lisp_Object parent_spec;
+ CHECK_CODING_SYSTEM (parent);
parent_spec = CODING_SYSTEM_SPEC (parent);
parent_eol_type = AREF (parent_spec, 2);
if (VECTORP (parent_eol_type))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 272ca09: Avoid crashes in coding_inherit_eol_type,
Eli Zaretskii <=