bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Incorrect bounds check in wredrawln


From: Thomas Dickey
Subject: Re: [PATCH] Incorrect bounds check in wredrawln
Date: Thu, 29 Apr 2010 16:38:14 -0400 (EDT)

On Wed, 28 Apr 2010, David A Benjamin wrote:

The function wredrawln attempts to check for off-screen windows to avoid buffer overflow, however it fails to take window offset into account misses several problems.

Here are two sample programs that test this.

http://web.mit.edu/davidben/Public/curses_x.c
http://web.mit.edu/davidben/Public/curses_y.c

Not every stray write appears to result in a segfault. (On my machine, curses_y 1 manages, but curses_x seems to escape notice.) Valgrind can catch the stray writes more accurately.

Here is a patch that should apply to ncurses-5.7-20100424

thanks

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]