# HG changeset patch # User Aidan Kehoe # Date 1426552179 0 # Node ID df50aaeddca5679fba85dc8b1ebc8fd708c02028 # Parent 04b8549344077926229ea11d7f5d96967d03441c Don't tickle an unreasonable but standard C lib limitation, thank you Vin! src/ChangeLog addition: 2015-03-17 Aidan Kehoe * data.c (fill_ichar_array): Be a bit more careful never to supply the C library's isupper() with a value outside of that range specified by the C 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! diff -r 04b854934407 -r df50aaeddca5 src/ChangeLog --- a/src/ChangeLog Mon Mar 16 09:03:22 2015 +0000 +++ b/src/ChangeLog Tue Mar 17 00:29:39 2015 +0000 @@ -1,3 +1,12 @@ +2015-03-17 Aidan Kehoe + + * data.c (fill_ichar_array): + Be a bit more careful never to supply the C library's isupper() + with a value outside of that range specified by the C + 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! + 2015-03-08 Aidan Kehoe * data.c (Fparse_integer): diff -r 04b854934407 -r df50aaeddca5 src/data.c --- a/src/data.c Mon Mar 16 09:03:22 2015 +0000 +++ b/src/data.c Tue Mar 17 00:29:39 2015 +0000 @@ -1484,9 +1484,15 @@ } /* Maybe our own case infrastructure is not available yet. Use the C library's. */ - else if (isupper (range->ch) && !isupper (cctable[valint])) + else if (current_buffer == NULL) { - cctable[valint] = range->ch; + /* The C library can't necessarily handle values outside of + the range EOF to CHAR_MAX, inclusive. */ + assert (range->ch == EOF || range->ch <= CHAR_MAX); + if (isupper (range->ch) && !isupper (cctable[valint])) + { + cctable[valint] = range->ch; + } } /* Otherwise, save it if this character has a numerically lower value (preferring ASCII over fullwidth Chinese and so on). */