diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-28 14:31:33 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-28 14:31:33 -0700 |
| commit | ca9ce8f2cb9d3d70c4e7d9dc9299ea4d5d71dfbc (patch) | |
| tree | e4e42ca73a6f80d97ff9a3f1b224699e1336bc43 /src/ChangeLog | |
| parent | 7bd4252299e9ed464cac124ac1ff718c98396df2 (diff) | |
Integer and memory overflow fixes for display code.
* dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
* dispnew.c (adjust_glyph_matrix, realloc_glyph_pool, scrolling_window):
Check for overflow in size calculations.
(line_draw_cost, realloc_glyph_pool, add_row_entry):
Don't assume glyph table len fits in int.
(struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
(row_table_size): Now ptrdiff_t, not int.
(scrolling_window): Avoid overflow in size calculations.
Don't update size until allocation succeeds.
* fns.c (concat): Check for overflow in size calculations.
(next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
* lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
(NEXT_ALMOST_PRIME_LIMIT): New constant.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 78b3b97b2d7..d7d32e90089 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,20 @@ 2011-07-28 Paul Eggert <eggert@cs.ucla.edu> + Integer and memory overflow fixes for display code. + * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int. + * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool, scrolling_window): + Check for overflow in size calculations. + (line_draw_cost, realloc_glyph_pool, add_row_entry): + Don't assume glyph table len fits in int. + (struct row_entry.bucket, row_entry_pool_size, row_entry_idx) + (row_table_size): Now ptrdiff_t, not int. + (scrolling_window): Avoid overflow in size calculations. + Don't update size until allocation succeeds. + * fns.c (concat): Check for overflow in size calculations. + (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT. + * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros. + (NEXT_ALMOST_PRIME_LIMIT): New constant. + * composite.c: Integer overflow fixes. (get_composition_id): Check for overflow in glyph length calculations. |
