Mercurial > hg > xemacs-beta
changeset 5871:58e72e27fb81
Don't rely on zero termination for Vfixnum_to_char_map, thank you Vin.
lisp/ChangeLog addition:
(vars_of_data): Don't rely on zero termination here for
Vfixnum_to_char_map, give an explicit bytecount. Again, thank you
Vin!
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 17 Mar 2015 00:47:48 +0000 |
parents | df50aaeddca5 |
children | f9e59cd39a9a |
files | src/ChangeLog src/data.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Mar 17 00:29:39 2015 +0000 +++ b/src/ChangeLog Tue Mar 17 00:47:48 2015 +0000 @@ -6,6 +6,9 @@ standard. Thank you Vin Shelton for reporting the Linux segmentation violation this provokes, and happy St. Patrick's Day to everyone reading the XEmacs lists! + (vars_of_data): Don't rely on zero termination here for + Vfixnum_to_char_map, give an explicit bytecount. Again, thank you + Vin! 2015-03-08 Aidan Kehoe <kehoea@parhasard.net>
--- a/src/data.c Tue Mar 17 00:29:39 2015 +0000 +++ b/src/data.c Tue Mar 17 00:47:48 2015 +0000 @@ -4302,7 +4302,9 @@ /* Sigh, we can't call build_fixnum_to_char_map() on Vdigit_fixnum_map, this is too early in the boot sequence to map across a char table. Do it by hand. */ - Vfixnum_to_char_map = build_ascstring (fixnum_tab); + ASSERT_ASCTEXT_ASCII_LEN (fixnum_tab, 36 * MAX_ICHAR_LEN); + Vfixnum_to_char_map + = make_string ((const Ibyte*) fixnum_tab, 36 * MAX_ICHAR_LEN); staticpro (&Vfixnum_to_char_map); }