diff options
| author | Paul Eggert | 2011-07-14 14:57:00 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-14 14:57:00 -0700 |
| commit | 39e378da07fe365c6442dc95b937539eb31fe8ef (patch) | |
| tree | 10c7326987b394c895bf792a67abefc133be36ab /src/ChangeLog | |
| parent | 3f86c085fa6eb34547ac04cf2be31f6cc3681e48 (diff) | |
| download | emacs-39e378da07fe365c6442dc95b937539eb31fe8ef.tar.gz emacs-39e378da07fe365c6442dc95b937539eb31fe8ef.zip | |
* bidi.c: Integer size and overflow fixes.
(bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
(bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
(bidi_cache_find_level_change, bidi_cache_ensure_space)
(bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
(bidi_find_other_level_edge):
Use ptrdiff_t instead of EMACS_INT where either will do.
This works better on 32-bit hosts configured --with-wide-int.
(bidi_cache_ensure_space): Check for size-calculation overflow.
Use % rather than repeated addition, for better worst-case speed.
Don't set bidi_cache_size until after xrealloc returns, because it
might not return.
(bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b683a7f55cd..c19786fb72c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -2,6 +2,20 @@ | |||
| 2 | 2 | ||
| 3 | Integer signedness and overflow and related fixes. (Bug#9079) | 3 | Integer signedness and overflow and related fixes. (Bug#9079) |
| 4 | 4 | ||
| 5 | * bidi.c: Integer size and overflow fixes. | ||
| 6 | (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx) | ||
| 7 | (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search) | ||
| 8 | (bidi_cache_find_level_change, bidi_cache_ensure_space) | ||
| 9 | (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack) | ||
| 10 | (bidi_find_other_level_edge): | ||
| 11 | Use ptrdiff_t instead of EMACS_INT where either will do. | ||
| 12 | This works better on 32-bit hosts configured --with-wide-int. | ||
| 13 | (bidi_cache_ensure_space): Check for size-calculation overflow. | ||
| 14 | Use % rather than repeated addition, for better worst-case speed. | ||
| 15 | Don't set bidi_cache_size until after xrealloc returns, because it | ||
| 16 | might not return. | ||
| 17 | (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow. | ||
| 18 | |||
| 5 | * alloc.c (__malloc_size_t): Remove. | 19 | * alloc.c (__malloc_size_t): Remove. |
| 6 | All uses replaced by size_t. See Andreas Schwab's note | 20 | All uses replaced by size_t. See Andreas Schwab's note |
| 7 | <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>. | 21 | <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>. |