diff options
| author | Paul Eggert | 2011-03-27 01:29:39 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-27 01:29:39 -0700 |
| commit | a3eed4788d421bbb778a3832fe17d82cafe3ca41 (patch) | |
| tree | aed22ef79f0834ad353a21b68527723983a0cfbc | |
| parent | eb4d412de87ff7078f4c0923ea014db01b7ce551 (diff) | |
| download | emacs-a3eed4788d421bbb778a3832fe17d82cafe3ca41.tar.gz emacs-a3eed4788d421bbb778a3832fe17d82cafe3ca41.zip | |
* eval.c (Fbacktrace): Don't assume nargs fits in int.
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/eval.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8704ba4b904..57389f306be 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-03-27 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-03-27 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * eval.c (Fbacktrace): Don't assume nargs fits in int. | ||
| 4 | |||
| 3 | * syntax.c (scan_sexps_forward): Avoid pointer wraparound. | 5 | * syntax.c (scan_sexps_forward): Avoid pointer wraparound. |
| 4 | 6 | ||
| 5 | * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow | 7 | * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow |
diff --git a/src/eval.c b/src/eval.c index b9d9354f48a..b732cbc644a 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -3298,7 +3298,6 @@ Output stream used is value of `standard-output'. */) | |||
| 3298 | (void) | 3298 | (void) |
| 3299 | { | 3299 | { |
| 3300 | register struct backtrace *backlist = backtrace_list; | 3300 | register struct backtrace *backlist = backtrace_list; |
| 3301 | register int i; | ||
| 3302 | Lisp_Object tail; | 3301 | Lisp_Object tail; |
| 3303 | Lisp_Object tem; | 3302 | Lisp_Object tem; |
| 3304 | struct gcpro gcpro1; | 3303 | struct gcpro gcpro1; |
| @@ -3325,9 +3324,10 @@ Output stream used is value of `standard-output'. */) | |||
| 3325 | write_string ("(", -1); | 3324 | write_string ("(", -1); |
| 3326 | if (backlist->nargs == (size_t) MANY) | 3325 | if (backlist->nargs == (size_t) MANY) |
| 3327 | { | 3326 | { |
| 3327 | int i; | ||
| 3328 | for (tail = *backlist->args, i = 0; | 3328 | for (tail = *backlist->args, i = 0; |
| 3329 | !NILP (tail); | 3329 | !NILP (tail); |
| 3330 | tail = Fcdr (tail), i++) | 3330 | tail = Fcdr (tail), i = 1) |
| 3331 | { | 3331 | { |
| 3332 | if (i) write_string (" ", -1); | 3332 | if (i) write_string (" ", -1); |
| 3333 | Fprin1 (Fcar (tail), Qnil); | 3333 | Fprin1 (Fcar (tail), Qnil); |
| @@ -3335,6 +3335,7 @@ Output stream used is value of `standard-output'. */) | |||
| 3335 | } | 3335 | } |
| 3336 | else | 3336 | else |
| 3337 | { | 3337 | { |
| 3338 | size_t i; | ||
| 3338 | for (i = 0; i < backlist->nargs; i++) | 3339 | for (i = 0; i < backlist->nargs; i++) |
| 3339 | { | 3340 | { |
| 3340 | if (i) write_string (" ", -1); | 3341 | if (i) write_string (" ", -1); |