diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-05-26 15:27:21 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-05-26 15:27:21 -0700 |
commit | c1892f1145dd05df037fc580acc5616f6d164238 (patch) | |
tree | f56ded1081fc8c09076df37b41e7abe844380410 /lib | |
parent | 38264cc938d9f2fb63f1697b4ec3dc9b86640e5f (diff) |
Fix coding-related core dumps with gcc -ftrapv.
The code was computing A - B, where A and B are pointers, and B is
random garbage. This can lead to core dumps on platforms that
have special pointer registers, and it also leads to core dumps on
x86-64 when compiled with gcc -ftrapv. The fix is to compute
A - B only when B is initialized properly.
* coding.c (coding_set_source, coding_set_destination): Return void.
(coding_change_source, coding_change_destinations): New functions,
with the old behaviors of coding_set_source and coding_set_destination.
All callers that need an offset changed to use these new functions.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions