* 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:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user