1. 28 Jul, 2011 10 commits
    • Paul Eggert's avatar
      * doc.c: Integer and memory overflow fixes. · 3d0c92a2
      Paul Eggert authored
      (get_doc_string_buffer_size): Now ptrdiff_t, not int.
      (get_doc_string): Check for size calculation overflow.
      Don't update size until allocation succeeds.
      (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
      EMACS_INT, where ptrdiff_t will do.
      (Fsubstitute_command_keys): Check for string overflow.
      3d0c92a2
    • Paul Eggert's avatar
      Integer and memory overflow fixes for display code. · ca9ce8f2
      Paul Eggert authored
      * 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.
      ca9ce8f2
    • Paul Eggert's avatar
      Fix typo in comment. · 7bd42522
      Paul Eggert authored
      7bd42522
    • Paul Eggert's avatar
      * composite.c: Integer overflow fixes. · d86d0d74
      Paul Eggert authored
      (get_composition_id): Check for overflow in glyph length calculations.
      d86d0d74
    • Paul Eggert's avatar
      * coding.c: Integer and memory overflow fixes. · 5d009b3a
      Paul Eggert authored
      (produce_chars): Redo buffer-overflow calculations to avoid
      unnecessary integer overflow.  Check for size overflow.
      (encode_coding_object): Don't update size until xmalloc succeeds.
      5d009b3a
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      * ccl.c: Integer and memory overflow fixes. · 69e8622f
      Paul Eggert authored
      (Fccl_execute_on_string): Check for memory overflow.
      Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
      Redo buffer-overflow calculations to avoid integer overflow.
      69e8622f
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      * buffer.c: Memory overflow fixes. · 6e1fc452
      Paul Eggert authored
      (overlays_at, overlays_in, record_overlay_string, overlay_strings):
      Don't update size of array until after memory allocation succeeds,
      because xmalloc/xrealloc may not return.
      6e1fc452
    • Paul Eggert's avatar
      * bidi.c: Integer overflow fix. · bc18e09d
      Paul Eggert authored
      (bidi_shelve_header_size): New constant.
      (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
      (bidi_cache_ensure_space): Avoid integer overflow when allocating.
      bc18e09d
  2. 20 Jul, 2011 1 commit
  3. 19 Jul, 2011 12 commits
  4. 18 Jul, 2011 10 commits
  5. 17 Jul, 2011 7 commits