diff options
| author | Paul Eggert | 2011-09-04 16:58:01 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-09-04 16:58:01 -0700 |
| commit | 1c262cae409ec55a234c89b3b74a13a77c7f595a (patch) | |
| tree | 2780610d6227a3b1f64aa9398f21501ce3de774e /src/ChangeLog | |
| parent | 7f59d9c856de33b97bc3f2708dcc8dadf24ee040 (diff) | |
| parent | 052bd38a56ad14a7f311677051e778de6c4bdc1c (diff) | |
| download | emacs-1c262cae409ec55a234c89b3b74a13a77c7f595a.tar.gz emacs-1c262cae409ec55a234c89b3b74a13a77c7f595a.zip | |
Merge from trunk.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 147 |
1 files changed, 143 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f3953630803..e730c79f65b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,146 @@ | |||
| 1 | 2011-09-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169). | ||
| 4 | |||
| 5 | 2011-09-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 6 | |||
| 7 | sprintf-related integer and memory overflow issues (Bug#9412). | ||
| 8 | |||
| 9 | * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values. | ||
| 10 | (esprintf, exprintf, evxprintf): New functions. | ||
| 11 | * keyboard.c (command_loop_level): Now EMACS_INT, not int. | ||
| 12 | (cmd_error): kbd macro iterations count is now EMACS_INT, not int. | ||
| 13 | (modify_event_symbol): Do not assume that the length of | ||
| 14 | name_alist_or_stem is safe to alloca and fits in int. | ||
| 15 | (Fexecute_extended_command): Likewise for function name and binding. | ||
| 16 | (Frecursion_depth): Wrap around reliably on integer overflow. | ||
| 17 | * keymap.c (push_key_description): First arg is now EMACS_INT, not int, | ||
| 18 | since some callers pass EMACS_INT values. | ||
| 19 | (Fsingle_key_description): Don't crash if symbol name contains more | ||
| 20 | than MAX_ALLOCA bytes. | ||
| 21 | * minibuf.c (minibuf_level): Now EMACS_INT, not int. | ||
| 22 | (get_minibuffer): Arg is now EMACS_INT, not int. | ||
| 23 | * lisp.h (get_minibuffer, push_key_description): Reflect API changes. | ||
| 24 | (esprintf, exprintf, evxprintf): New decls. | ||
| 25 | * window.h (command_loop_level, minibuf_level): Reflect API changes. | ||
| 26 | |||
| 27 | * dbusbind.c (signature_cat): New function. | ||
| 28 | (xd_signature, Fdbus_register_signal): | ||
| 29 | Do not overrun buffer; instead, report string overflow. | ||
| 30 | |||
| 31 | * dispnew.c (add_window_display_history): Don't overrun buffer. | ||
| 32 | Truncate instead; this is OK since it's just a log. | ||
| 33 | |||
| 34 | * editfns.c (Fcurrent_time_zone): Don't overrun buffer | ||
| 35 | even if the time zone offset is outlandishly large. | ||
| 36 | Don't mishandle offset == INT_MIN. | ||
| 37 | |||
| 38 | * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer | ||
| 39 | when creating daemon; the previous buffer-overflow check was incorrect. | ||
| 40 | |||
| 41 | * eval.c (verror): Simplify by rewriting in terms of evxprintf, | ||
| 42 | which has the guts of the old verror function. | ||
| 43 | |||
| 44 | * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name; | ||
| 45 | use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues. | ||
| 46 | |||
| 47 | * font.c: Include <float.h>, for DBL_MAX_10_EXP. | ||
| 48 | (font_unparse_xlfd): Don't blindly alloca long strings. | ||
| 49 | Don't assume XINT result fits in int, or that XFLOAT_DATA * 10 | ||
| 50 | fits in int, when using sprintf. Use single snprintf to count | ||
| 51 | length of string rather than counting it via multiple sprintfs; | ||
| 52 | that's simpler and more reliable. | ||
| 53 | (font_unparse_fcname): Use it to avoid sprintf buffer overrun. | ||
| 54 | (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not | ||
| 55 | sprintf, in case result does not fit in int. | ||
| 56 | |||
| 57 | * fontset.c (num_auto_fontsets): Now printmax_t, not int. | ||
| 58 | (fontset_from_font): Print it. | ||
| 59 | |||
| 60 | * frame.c (tty_frame_count): Now printmax_t, not int. | ||
| 61 | (make_terminal_frame, set_term_frame_name): Print it. | ||
| 62 | (x_report_frame_params): In X, window IDs are unsigned long, | ||
| 63 | not signed long, so print them as unsigned. | ||
| 64 | (validate_x_resource_name): Check for implausibly long names, | ||
| 65 | and don't assume name length fits in 'int'. | ||
| 66 | (x_get_resource_string): Don't blindly alloca invocation name; | ||
| 67 | use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does | ||
| 68 | not fit in int. | ||
| 69 | |||
| 70 | * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP. | ||
| 71 | (xg_check_special_colors, xg_set_geometry): | ||
| 72 | Make sprintf buffers a bit bigger, to avoid potential buffer overrun. | ||
| 73 | |||
| 74 | * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA. | ||
| 75 | Use esprintf, not sprintf, in case result does not fit in int. | ||
| 76 | |||
| 77 | * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int. | ||
| 78 | (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating | ||
| 79 | it as a large positive number. | ||
| 80 | (Fexecute_kbd_macro): Don't assume repeat count fits in int. | ||
| 81 | * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int. | ||
| 82 | |||
| 83 | * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf, | ||
| 84 | in case result does not fit in int. | ||
| 85 | |||
| 86 | * print.c (float_to_string): Detect width overflow more reliably. | ||
| 87 | (print_object): Make sprintf buffer a bit bigger, to avoid potential | ||
| 88 | buffer overrun. Don't assume list length fits in 'int'. Treat | ||
| 89 | print length of 0 as 0, not as infinity; to be consistent with other | ||
| 90 | uses of print length in this function. Don't overflow print length | ||
| 91 | index. Don't assume hash table size fits in 'long', or that | ||
| 92 | vectorlike size fits in 'unsigned long'. | ||
| 93 | |||
| 94 | * process.c (make_process): Use printmax_t, not int, to format | ||
| 95 | process-name gensyms. | ||
| 96 | |||
| 97 | * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function. | ||
| 98 | |||
| 99 | * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger | ||
| 100 | to avoid potential buffer overrun. | ||
| 101 | |||
| 102 | * xfaces.c (x_update_menu_appearance): Don't overrun buffer | ||
| 103 | if X resource line is longer than 512 bytes. | ||
| 104 | |||
| 105 | * xfns.c (x_window): Make sprintf buffer a bit bigger | ||
| 106 | to avoid potential buffer overrun. | ||
| 107 | |||
| 108 | * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer. | ||
| 109 | |||
| 110 | * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF. | ||
| 111 | |||
| 112 | 2011-09-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 113 | |||
| 114 | Integer overflow fixes for scrolling, etc. | ||
| 115 | Without these, Emacs silently mishandles large integers sometimes. | ||
| 116 | For example, "C-u 4294967297 M-x recenter" was treated as if | ||
| 117 | it were "C-u 1 M-x recenter" on a typical 64-bit host. | ||
| 118 | |||
| 119 | * xdisp.c (try_window_id): Check Emacs fixnum range before | ||
| 120 | converting to 'int'. | ||
| 121 | |||
| 122 | * window.c (window_scroll_line_based, Frecenter): | ||
| 123 | Check that an Emacs fixnum is in range before assigning it to 'int'. | ||
| 124 | (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for | ||
| 125 | values converted from Emacs fixnums. | ||
| 126 | (Frecenter): Don't wrap around a line count if it is out of 'int' | ||
| 127 | range; instead, treat it as an extreme value. | ||
| 128 | (Fset_window_configuration, compare_window_configurations): | ||
| 129 | Use ptrdiff_t, not int, for index that might exceed 2 GiB. | ||
| 130 | |||
| 131 | * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes | ||
| 132 | that can exceed INT_MAX. Check that EMACS_INT value is in range | ||
| 133 | before assigning it to the (possibly-narrower) index. | ||
| 134 | (match_limit): Don't assume that a fixnum can fit in 'int'. | ||
| 135 | |||
| 136 | * print.c (print_object): Use ptrdiff_t, not int, for index that can | ||
| 137 | exceed INT_MAX. | ||
| 138 | |||
| 139 | * indent.c (position_indentation): Now takes ptrdiff_t, not int. | ||
| 140 | (Fvertical_motion): Don't wrap around LINES values that don't fit | ||
| 141 | in 'int'. Instead, treat them as extreme values. This is good | ||
| 142 | enough for windows, which can't have more than INT_MAX lines anyway. | ||
| 143 | |||
| 1 | 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org> | 144 | 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 145 | ||
| 3 | * Require libxml/parser.h to avoid compilation warning. | 146 | * Require libxml/parser.h to avoid compilation warning. |
| @@ -913,10 +1056,6 @@ | |||
| 913 | (re_exec): Fix return type. | 1056 | (re_exec): Fix return type. |
| 914 | (regexec): Fix type of `ret'. (Bug#9203) | 1057 | (regexec): Fix type of `ret'. (Bug#9203) |
| 915 | 1058 | ||
| 916 | 2011-07-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 917 | |||
| 918 | * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169). | ||
| 919 | |||
| 920 | 2011-07-28 Paul Eggert <eggert@cs.ucla.edu> | 1059 | 2011-07-28 Paul Eggert <eggert@cs.ucla.edu> |
| 921 | 1060 | ||
| 922 | * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189). | 1061 | * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189). |