diff options
author | Fabián Ezequiel Gallina <fgallina@gnu.org> | 2015-01-28 01:03:46 -0300 |
---|---|---|
committer | Fabián Ezequiel Gallina <fgallina@gnu.org> | 2015-01-28 01:03:46 -0300 |
commit | 33ab7ee0edcb3608e4a3d5deebc2b72c180dbfe4 (patch) | |
tree | 946ccc8bdc1f41a2c4066e6fcef4bfd04a9d693a /src | |
parent | 85ca47671ccbffe87d6ccad17039b49d6b676d61 (diff) | |
parent | 8ee825c35b62768e28fe825163dea90d3ab46022 (diff) | |
download | emacs-33ab7ee0edcb3608e4a3d5deebc2b72c180dbfe4.tar.gz |
Merge from origin/emacs-24
8ee825c doc/emacs/programs.texi (Custom C Indent): Fix a typo. (Bug#19647)
88ba49f Fix coding.c subscript error
3ea1b31 Prevent artist-mode from creating runaway timers (Bug#6130).
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/coding.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5ced4734bc9..d46e34c8525 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2015-01-21 Paul Eggert <eggert@cs.ucla.edu> + + Fix coding.c subscript error + * coding.c (CODING_ISO_INVOKED_CHARSET): + Avoid undefined behavior if CODING_ISO_INVOCATION returns negative. + 2015-01-17 Eli Zaretskii <eliz@gnu.org> * xdisp.c (produce_image_glyph): Fix display of images in R2L diff --git a/src/coding.c b/src/coding.c index 54811588c6a..a7128ee3e73 100644 --- a/src/coding.c +++ b/src/coding.c @@ -350,7 +350,8 @@ static Lisp_Object Vbig5_coding_system; #define CODING_ISO_BOL(coding) \ ((coding)->spec.iso_2022.bol) #define CODING_ISO_INVOKED_CHARSET(coding, plane) \ - CODING_ISO_DESIGNATION ((coding), CODING_ISO_INVOCATION ((coding), (plane))) + (CODING_ISO_INVOCATION (coding, plane) < 0 ? -1 \ + : CODING_ISO_DESIGNATION (coding, CODING_ISO_INVOCATION (coding, plane))) #define CODING_ISO_CMP_STATUS(coding) \ (&(coding)->spec.iso_2022.cmp_status) #define CODING_ISO_EXTSEGMENT_LEN(coding) \ |