Commit 9a900ca9 authored by Paul Eggert's avatar Paul Eggert

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

This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
parent 41b7f8bc
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment