Commit 73055685 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix bug #11288 with overrunning array limits.

 src/dispnew.c (swap_glyph_pointers, copy_row_except_pointers): Don't
 overrun array limits of glyph row's used[] array.
parent 9ee9f470
2012-04-20 Eli Zaretskii <eliz@gnu.org>
* dispnew.c (swap_glyph_pointers, copy_row_except_pointers): Don't
overrun array limits of glyph row's used[] array. (Bug#11288)
2012-04-20 Chong Yidong <cyd@gnu.org>
* process.c (wait_reading_process_output): If EIO occurs on a pty,
......
......@@ -1085,12 +1085,16 @@ swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b)
for (i = 0; i < LAST_AREA + 1; ++i)
{
struct glyph *temp = a->glyphs[i];
short used_tem = a->used[i];
a->glyphs[i] = b->glyphs[i];
b->glyphs[i] = temp;
a->used[i] = b->used[i];
b->used[i] = used_tem;
if (i < LAST_AREA)
{
short used_tem = a->used[i];
a->used[i] = b->used[i];
b->used[i] = used_tem;
}
}
a->hash = b->hash;
b->hash = hash_tem;
......@@ -1105,7 +1109,7 @@ static inline void
copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
{
struct glyph *pointers[1 + LAST_AREA];
short used[1 + LAST_AREA];
short used[LAST_AREA];
unsigned hashval;
/* Save glyph pointers of TO. */
......
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