Bug#617210: libncurses5: ncurses-5.8 newwin() violates documented API
Quoting Sven Joachim : severity 617210 serious thanks On 2011-03-07 12:41 +0100, Thomas Dickey wrote: On Mon, 7 Mar 2011, Jon wrote: Package: libncurses5 Version: 5.8-1 Severity: important The API for newwin() is documented as: Calling newwin creates and returns a pointer to a new window with the given number of lines and columns. The upper left-hand corner of the window is at line begin_y, column begin_x. If either nlines or ncols is zero, they default to LINES - begin_y and COLS - begin_x. A new full-screen win‐ dow is created by calling newwin(0,0,0,0). But starting with ncurses 5.8, ncurses/base/lib_newwin.c has the following code on line 144: if (begy < 0 || begx < 0 || num_lines <= 0 || num_columns <= 0) returnWin(0); This causes a call of newwin(0,0,0,0) to return an error. yes... I made the change because of a core dump (as called from dialog, which assumed the window had rows/columns). Which applications are making newwin(0,0,0,0) calls? Newsbeuter does (via libstfl), segfaulting in the process because stfl does not expect this to return a null pointer: http://bugs.debian.org/616711. I see (now). I'll revert that. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#617210: libncurses5: ncurses-5.8 newwin() violates documented API
severity 617210 serious thanks On 2011-03-07 12:41 +0100, Thomas Dickey wrote: > On Mon, 7 Mar 2011, Jon wrote: > >> Package: libncurses5 >> Version: 5.8-1 >> Severity: important >> >> >> The API for newwin() is documented as: >> >> Calling newwin creates and returns a pointer to a new window with the >> given number of lines and columns. The upper left-hand corner of the window >> is at line begin_y, column begin_x. If either nlines or ncols is >> zero, they default to LINES - begin_y and COLS - begin_x. A new full-screen >> win‐ >> dow is created by calling newwin(0,0,0,0). >> >> But starting with ncurses 5.8, ncurses/base/lib_newwin.c has the following >> code on line 144: >> >>if (begy < 0 || begx < 0 || num_lines <= 0 || num_columns <= 0) >>returnWin(0); >> >> This causes a call of newwin(0,0,0,0) to return an error. > > yes... I made the change because of a core dump (as called from > dialog, which assumed the window had rows/columns). > > Which applications are making newwin(0,0,0,0) calls? Newsbeuter does (via libstfl), segfaulting in the process because stfl does not expect this to return a null pointer: http://bugs.debian.org/616711. Sven -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#617210: libncurses5: ncurses-5.8 newwin() violates documented API
On Mon, Mar 07, 2011 at 06:41:00 -0500, Thomas Dickey wrote: > On Mon, 7 Mar 2011, Jon wrote: > > >Package: libncurses5 > >Version: 5.8-1 > >Severity: important > > > > > >The API for newwin() is documented as: > > > > Calling newwin creates and returns a pointer to a new window with the > > given number of lines and columns. The upper left-hand corner of the window > > is at line begin_y, column begin_x. If either nlines or ncols is > > zero, they default to LINES - begin_y and COLS - begin_x. A new > > full-screen win‐ > > dow is created by calling newwin(0,0,0,0). > > > >But starting with ncurses 5.8, ncurses/base/lib_newwin.c has the following > >code on line 144: > > > > if (begy < 0 || begx < 0 || num_lines <= 0 || num_columns <= 0) > > returnWin(0); > > > >This causes a call of newwin(0,0,0,0) to return an error. > > yes... I made the change because of a core dump (as called from > dialog, which assumed the window had rows/columns). > > Which applications are making newwin(0,0,0,0) calls? > rtorrent is the one I've found so far, but I'd be shocked if its the only one. I haven't done much testing. Irssi and mutt don't die. -- Jon X(7): A program for managing terminal windows. See also screen(1). signature.asc Description: Digital signature
Bug#617210: libncurses5: ncurses-5.8 newwin() violates documented API
On Mon, 7 Mar 2011, Jon wrote: Package: libncurses5 Version: 5.8-1 Severity: important The API for newwin() is documented as: Calling newwin creates and returns a pointer to a new window with the given number of lines and columns. The upper left-hand corner of the window is at line begin_y, column begin_x. If either nlines or ncols is zero, they default to LINES - begin_y and COLS - begin_x. A new full-screen win‐ dow is created by calling newwin(0,0,0,0). But starting with ncurses 5.8, ncurses/base/lib_newwin.c has the following code on line 144: if (begy < 0 || begx < 0 || num_lines <= 0 || num_columns <= 0) returnWin(0); This causes a call of newwin(0,0,0,0) to return an error. yes... I made the change because of a core dump (as called from dialog, which assumed the window had rows/columns). Which applications are making newwin(0,0,0,0) calls? -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
Bug#617210: libncurses5: ncurses-5.8 newwin() violates documented API
Package: libncurses5 Version: 5.8-1 Severity: important The API for newwin() is documented as: Calling newwin creates and returns a pointer to a new window with the given number of lines and columns. The upper left-hand corner of the window is at line begin_y, column begin_x. If either nlines or ncols is zero, they default to LINES - begin_y and COLS - begin_x. A new full-screen win‐ dow is created by calling newwin(0,0,0,0). But starting with ncurses 5.8, ncurses/base/lib_newwin.c has the following code on line 144: if (begy < 0 || begx < 0 || num_lines <= 0 || num_columns <= 0) returnWin(0); This causes a call of newwin(0,0,0,0) to return an error. Previous versions of ncurses contained this instead which permitted the all zeroes call: if (begy < 0 || begx < 0 || num_lines < 0 || num_columns < 0) returnWin(0); Now to go file some bugs against programs which aren't checking return codes properly... -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.37-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libncurses5 depends on: ii libc6 2.11.2-13 Embedded GNU C Library: Shared lib Versions of packages libncurses5 recommends: ii libgpm2 1.20.4-3.3 General Purpose Mouse - shared lib libncurses5 suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org