* xterm.c (x_draw_underwave): Check for integer overflow.

This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
This commit is contained in:
Paul Eggert
2012-06-17 00:39:50 -07:00
parent 41b7f8bc6c
commit 9a900ca947
2 changed files with 8 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
* xterm.c (x_draw_underwave): Check for integer overflow.
This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't

View File

@@ -2710,6 +2710,9 @@ x_draw_underwave (struct glyph_string *s)
else
y2 += dy;
if (INT_MAX - dx < xmax)
abort ();
while (x1 <= xmax)
{
XDrawLine (s->display, s->window, s->gc, x1, y1, x2, y2);