aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorPaul Eggert2011-06-12 17:36:03 -0700
committerPaul Eggert2011-06-12 17:36:03 -0700
commit13bdea59234b227bf8499a64352da3e5fd9e8c7b (patch)
treededdcce496ffa4fdb6d5ffd45ec8c2c7c5c49d0c /src/ChangeLog
parentd37ca62316e7526da7d75cc44c7a4cd8a6281bb5 (diff)
downloademacs-13bdea59234b227bf8499a64352da3e5fd9e8c7b.tar.gz
emacs-13bdea59234b227bf8499a64352da3e5fd9e8c7b.zip
Make sure a 64-bit char is never passed to CHAR_STRING.
Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform, by silently ignoring the top 32 bits, allowing some values that were far too large to be valid characters. * character.h: Include <verify.h>. (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character arguments are no wider than unsigned, as a compile-time check to prevent future regressions in this area. * data.c (Faset): * editfns.c (Fchar_to_string, general_insert_function, Finsert_char): (Fsubst_char_in_region): * fns.c (concat): * xdisp.c (decode_mode_spec_coding): Adjust to CHAR_STRING's new requirement. * editfns.c (Finsert_char, Fsubst_char_in_region): * fns.c (concat): Check that character args are actually characters. Without this test, these functions did the wrong thing with wildly out-of-range values on 64-bit hosts.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 921f976334a..f8a4abd9cce 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,25 @@
12011-06-13 Paul Eggert <eggert@cs.ucla.edu>
2
3
4 Make sure a 64-bit char is never passed to CHAR_STRING.
5 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
6 by silently ignoring the top 32 bits, allowing some values
7 that were far too large to be valid characters.
8 * character.h: Include <verify.h>.
9 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
10 arguments are no wider than unsigned, as a compile-time check
11 to prevent future regressions in this area.
12 * data.c (Faset):
13 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char):
14 (Fsubst_char_in_region):
15 * fns.c (concat):
16 * xdisp.c (decode_mode_spec_coding):
17 Adjust to CHAR_STRING's new requirement.
18 * editfns.c (Finsert_char, Fsubst_char_in_region):
19 * fns.c (concat): Check that character args are actually
20 characters. Without this test, these functions did the wrong
21 thing with wildly out-of-range values on 64-bit hosts.
22
12011-06-12 Paul Eggert <eggert@cs.ucla.edu> 232011-06-12 Paul Eggert <eggert@cs.ucla.edu>
2 24
3 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts. 25 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.