diff options
author | ken <ken@FreeBSD.org> | 1998-10-12 16:32:32 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 1998-10-12 16:32:32 +0000 |
commit | 02334afb1233c9696efc4df755561d86ae8048e4 (patch) | |
tree | 8e0abe1ecf8ff7b7320e792ae87c609c53c41a4b /lib/libcurses | |
parent | d6be4d69fc1c31cb24d317e961044864c6ba3d96 (diff) | |
download | FreeBSD-src-02334afb1233c9696efc4df755561d86ae8048e4.zip FreeBSD-src-02334afb1233c9696efc4df755561d86ae8048e4.tar.gz |
Fix a curses bug exposed by the ":numbers" display of systat -iostat.
This bug showed up when you had more than 3 devices displayed. (thus
requiring a second line of display)
Here's a quote From the PR:
When wrefresh() is called with a subwindow as argument, __set_subwin
might be called with reversed arguments if wrefresh() decides to calls
quickch(). This may cause use of negative array indexes, with a
resulting segfault.
Since quickch() manipulates the line structures belonging to curscr,
it looks like all subwindows of curscr should be updated.
PR: bin/8086
Submitted by: Tor Egge <Tor.Egge@fast.no>
Diffstat (limited to 'lib/libcurses')
-rw-r--r-- | lib/libcurses/refresh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcurses/refresh.c b/lib/libcurses/refresh.c index 1719454..14e2aca 100644 --- a/lib/libcurses/refresh.c +++ b/lib/libcurses/refresh.c @@ -682,8 +682,8 @@ quickch(win) * Need to repoint any subwindow lines to the rotated * line structured. */ - for (wp = win->nextp; wp != win; wp = wp->nextp) - __set_subwin(win, wp); + for (wp = curscr->nextp; wp != curscr; wp = wp->nextp) + __set_subwin(wp->orig, wp); } } |