diff options
| author | Paul Eggert | 2011-06-22 09:15:41 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-22 09:15:41 -0700 |
| commit | 31fd4b3280acee4030efde84a0e23ae2b006ee31 (patch) | |
| tree | 0b2245daf7e6f772cbaabf8916faeb34683bb390 /src/editfns.c | |
| parent | ddb7ffeeb8ace6501eb453f50f0f9f6852eda21f (diff) | |
| parent | 510005210ac9f4d813c4a2cc99b2c3c11e57c055 (diff) | |
| download | emacs-31fd4b3280acee4030efde84a0e23ae2b006ee31.tar.gz emacs-31fd4b3280acee4030efde84a0e23ae2b006ee31.zip | |
Merge: Integer overflow and signedness fixes (Bug#8873).
A few related buffer overrun fixes, too.
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/editfns.c b/src/editfns.c index 2d736bbc7e2..c0c0e530265 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -86,21 +86,7 @@ extern Lisp_Object w32_get_internal_run_time (void); | |||
| 86 | 86 | ||
| 87 | static void time_overflow (void) NO_RETURN; | 87 | static void time_overflow (void) NO_RETURN; |
| 88 | static int tm_diff (struct tm *, struct tm *); | 88 | static int tm_diff (struct tm *, struct tm *); |
| 89 | static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, | ||
| 90 | EMACS_INT *, Lisp_Object, EMACS_INT *); | ||
| 91 | static void update_buffer_properties (EMACS_INT, EMACS_INT); | 89 | static void update_buffer_properties (EMACS_INT, EMACS_INT); |
| 92 | static Lisp_Object region_limit (int); | ||
| 93 | static size_t emacs_nmemftime (char *, size_t, const char *, | ||
| 94 | size_t, const struct tm *, int, int); | ||
| 95 | static void general_insert_function (void (*) (const char *, EMACS_INT), | ||
| 96 | void (*) (Lisp_Object, EMACS_INT, | ||
| 97 | EMACS_INT, EMACS_INT, | ||
| 98 | EMACS_INT, int), | ||
| 99 | int, ptrdiff_t, Lisp_Object *); | ||
| 100 | static Lisp_Object subst_char_in_region_unwind (Lisp_Object); | ||
| 101 | static Lisp_Object subst_char_in_region_unwind_1 (Lisp_Object); | ||
| 102 | static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, | ||
| 103 | EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); | ||
| 104 | 90 | ||
| 105 | static Lisp_Object Qbuffer_access_fontify_functions; | 91 | static Lisp_Object Qbuffer_access_fontify_functions; |
| 106 | static Lisp_Object Fuser_full_name (Lisp_Object); | 92 | static Lisp_Object Fuser_full_name (Lisp_Object); |
| @@ -345,13 +331,13 @@ If you set the marker not to point anywhere, the buffer will have no mark. */) | |||
| 345 | Return the number found, and store them in a vector in VEC | 331 | Return the number found, and store them in a vector in VEC |
| 346 | of length LEN. */ | 332 | of length LEN. */ |
| 347 | 333 | ||
| 348 | static int | 334 | static ptrdiff_t |
| 349 | overlays_around (EMACS_INT pos, Lisp_Object *vec, int len) | 335 | overlays_around (EMACS_INT pos, Lisp_Object *vec, ptrdiff_t len) |
| 350 | { | 336 | { |
| 351 | Lisp_Object overlay, start, end; | 337 | Lisp_Object overlay, start, end; |
| 352 | struct Lisp_Overlay *tail; | 338 | struct Lisp_Overlay *tail; |
| 353 | EMACS_INT startpos, endpos; | 339 | EMACS_INT startpos, endpos; |
| 354 | int idx = 0; | 340 | ptrdiff_t idx = 0; |
| 355 | 341 | ||
| 356 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) | 342 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) |
| 357 | { | 343 | { |
| @@ -419,7 +405,7 @@ get_pos_property (Lisp_Object position, register Lisp_Object prop, Lisp_Object o | |||
| 419 | else | 405 | else |
| 420 | { | 406 | { |
| 421 | EMACS_INT posn = XINT (position); | 407 | EMACS_INT posn = XINT (position); |
| 422 | int noverlays; | 408 | ptrdiff_t noverlays; |
| 423 | Lisp_Object *overlay_vec, tem; | 409 | Lisp_Object *overlay_vec, tem; |
| 424 | struct buffer *obuf = current_buffer; | 410 | struct buffer *obuf = current_buffer; |
| 425 | 411 | ||