Debian Bug report logs - #230335
Ncurses generates input

version graph

Package: libncurses5-dev; Maintainer for libncurses5-dev is Craig Small <csmall@debian.org>; Source for libncurses5-dev is src:ncurses.

Reported by: rzyjontko <rzyj@poczta.fm>

Date: Fri, 30 Jan 2004 10:33:01 UTC

Severity: serious

Found in version 5.3.20030719-5

Fixed in version ncurses/5.4-1

Done: Daniel Jacobowitz <dan@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#230335; Package libncurses5-dev. Full text and rfc822 format available.

Acknowledgement sent to rzyjontko <rzyj@poczta.fm>:
New Bug report received and forwarded. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: rzyjontko <rzyj@poczta.fm>
To: submit@bugs.debian.org
Subject: Ncurses generates input
Date: Fri, 30 Jan 2004 11:26:21 +0100
[Message part 1 (text/plain, inline)]
Package: libncurses5-dev
Version: 5.3.20030719-5
Severity: grave
Justification: makes programs linked against ncurses unusable

I attach a small program, that triggers the bug.  As you can see,
echoing two characters to the screen makes ncurses generate additional
input.  This is probably the only pair of characters, that causes this
unexpected behaviour.

Compilation:
  cc -O0 -ggdb -c -o curses.o curses.c
  cc -lncurses curses.o -o curses

Run:
  ./curses

The program will terminate echoing a character, although it should
wait for user's input.

----                                ----
rzyjontko              <rzyj@plusnet.pl>
http://www.student.ii.uni.wroc.pl/~rzyj/
----                                ----
[curses.c (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#230335; Package libncurses5-dev. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #10 received at 230335@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: rzyjontko <rzyj@poczta.fm>, 230335@bugs.debian.org
Subject: Re: Bug#230335: Ncurses generates input
Date: Fri, 30 Jan 2004 06:47:29 -0500 (EST)
On Fri, 30 Jan 2004, rzyjontko wrote:

> Package: libncurses5-dev
> Version: 5.3.20030719-5
> Severity: grave
> Justification: makes programs linked against ncurses unusable

The problem is this chunk in lib_addch.c (which I noticed on Sunday,
and was still reconsidering):

    if ((AttrOf(ch) & A_ALTCHARSET)
	|| ((t = CharOf(ch)) > 127)		<<--- oops
	|| ((s = unctrl(t))[1] == 0))
	return waddch_literal(win, ch);

>
> I attach a small program, that triggers the bug.  As you can see,
> echoing two characters to the screen makes ncurses generate additional
> input.  This is probably the only pair of characters, that causes this
> unexpected behaviour.
>
> Compilation:
>   cc -O0 -ggdb -c -o curses.o curses.c
>   cc -lncurses curses.o -o curses
>
> Run:
>   ./curses
>
> The program will terminate echoing a character, although it should
> wait for user's input.
>
> ----                                ----
> rzyjontko              <rzyj@plusnet.pl>
> http://www.student.ii.uni.wroc.pl/~rzyj/
> ----                                ----
>

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



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#230335; Package libncurses5-dev. Full text and rfc822 format available.

Acknowledgement sent to dickey@his.com (Thomas Dickey):
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #15 received at 230335@bugs.debian.org (full text, mbox):

From: dickey@his.com (Thomas Dickey)
To: 230335@bugs.debian.org
Cc: dickey@his.com (Thomas Dickey)
Subject: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230335
Date: Fri, 30 Jan 2004 20:57:01 -0500
>                       Debian Bug report logs - #230335
>                            Ncurses generates input

I've made a fix for this which will be in tomorrow's patch.
-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#230335; Package libncurses5-dev. Full text and rfc822 format available.

Acknowledgement sent to Göran Weinholt <weinholt@debian.org>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #20 received at 230335@bugs.debian.org (full text, mbox):

From: Göran Weinholt <weinholt@debian.org>
To: 230335@bugs.debian.org
Cc: control@bugs.debian.org, rzyj@poczta.fm
Subject: this bug in not grave
Date: Sat, 21 Feb 2004 23:47:40 +0100
severity 230335 important
thanks

The test program submitted outputs "CSI c", in other words the control
code that makes the terminal echo back the terminal ID. I don't see
how anything related to this makes ncurses programs unusable.

Regards,

-- 
Göran Weinholt <weinholt@debian.org> - student/sysadm/Debian developer
GPG: 1024D/4A8854E6 EC27 7F6A DFA9 CBBD 9EE3  F07A 8DF5 8BB6 4A88 54E6
"Science does not remove the terror of the Gods."  -- J.R. "Bob" Dobbs



Severity set to `important'. Request was from Göran Weinholt <weinholt@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#230335; Package libncurses5-dev. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #27 received at 230335@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: Göran Weinholt <weinholt@debian.org>, 230335@bugs.debian.org
Subject: Re: Bug#230335: this bug in not grave
Date: Sat, 21 Feb 2004 18:44:24 -0500 (EST)
On Sat, 21 Feb 2004, [iso-8859-1] Göran Weinholt wrote:

> severity 230335 important
> thanks
>
> The test program submitted outputs "CSI c", in other words the control
> code that makes the terminal echo back the terminal ID. I don't see
> how anything related to this makes ncurses programs unusable.

It didn't make them unusable (that was unnecessary amplification).

But it did get me to reexamine that area and note that the documentation
says that it should behave as if an addch() were done, and that in turn
said that control characters should be displayed in printable form except
for the handful of formatting controls.  Comparing to Solaris curses, I
could see that it rendered those using unctrl() - as if it were a 7-bit
character - so I adapted that (ncurses' unctrl() is for 8-bit characters),
and ironed out the various inconsistencies that cropped up.

The stable version of all that is in ncurses 5.4

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



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#230335; Package libncurses5-dev. Full text and rfc822 format available.

Acknowledgement sent to rzyjontko <rzyj@poczta.fm>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #32 received at 230335@bugs.debian.org (full text, mbox):

From: rzyjontko <rzyj@poczta.fm>
To: Thomas Dickey <dickey@his.com>, 230335@bugs.debian.org, control@bugs.debian.org
Subject: Re: Bug#230335: this bug in not grave
Date: Sun, 22 Feb 2004 11:33:28 +0100
severity 230335 serious
thanks

Thomas Dickey wrote:
> 
> It didn't make them unusable (that was unnecessary amplification).

Of course id did!  There are ROUTINES for examining terminal ID, and
ncurses library should provide a layer on top of this functionality.
This behaviour is HIGHLY unexpected, not documented, and DOES make all
programs that try to echo something on the screen unusable.

My mail client hung after trying to display these characters on
the screen - they came with an email.  Do you think that I should have
an explicit case for this pair of characters?  And what should I do
with them, not display at all?

> The stable version of all that is in ncurses 5.4

Does it mean, that it is fixed in 5.4?

----                                ----
rzyjontko              <rzyj@plusnet.pl>
http://www.student.ii.uni.wroc.pl/~rzyj/
----                                ----





Severity set to `serious'. Request was from rzyjontko <rzyj@poczta.fm> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#230335; Package libncurses5-dev. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #39 received at 230335@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: rzyjontko <rzyj@poczta.fm>
Cc: 230335@bugs.debian.org
Subject: Re: Bug#230335: this bug in not grave
Date: Sun, 22 Feb 2004 06:16:28 -0500 (EST)
On Sun, 22 Feb 2004, rzyjontko wrote:

> severity 230335 serious
> thanks
>
> Thomas Dickey wrote:
> >
> > It didn't make them unusable (that was unnecessary amplification).
>
> Of course id did!  There are ROUTINES for examining terminal ID, and
> ncurses library should provide a layer on top of this functionality.
> This behaviour is HIGHLY unexpected, not documented, and DOES make all
> programs that try to echo something on the screen unusable.

You should read the changelog (NEWS) before making comments.

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



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#230335; Package libncurses5-dev. Full text and rfc822 format available.

Acknowledgement sent to dickey@his.com:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #44 received at 230335@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: rzyjontko <rzyj@poczta.fm>
Cc: 230335@bugs.debian.org
Subject: Re: Bug#230335: this bug in not grave
Date: Sun, 22 Feb 2004 14:32:24 -0500
[Message part 1 (text/plain, inline)]
On Sun, Feb 22, 2004 at 11:33:28AM +0100, rzyjontko wrote:
 
> My mail client hung after trying to display these characters on
> the screen - they came with an email.  Do you think that I should have
> an explicit case for this pair of characters?  And what should I do
> with them, not display at all?
> 
> > The stable version of all that is in ncurses 5.4
> 
> Does it mean, that it is fixed in 5.4?

yes (the actual bug is fixed)

but:  the likely cause of your problem will not be addressed simply by fixing
ncurses.  The offending character was probably emitted on the basis of an
incorrect match of locale to terminal.  If your locale says 0x9b is printable
and the terminal is setup to respond with the device identification, it will
still look/behave the same.

Codes in the range 128-159 are treated by a vt220 (xterm for example) as
control characters.  Some character sets such as KOI8-R use those as printable.

"xterm -k8" modifies that aspect, making it possible to display codes in the
range 128-159.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[Message part 2 (application/pgp-signature, inline)]

Reply sent to Daniel Jacobowitz <dan@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to rzyjontko <rzyj@poczta.fm>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #49 received at 230335-close@bugs.debian.org (full text, mbox):

From: Daniel Jacobowitz <dan@debian.org>
To: 230335-close@bugs.debian.org
Subject: Bug#230335: fixed in ncurses 5.4-1
Date: Wed, 10 Mar 2004 15:32:51 -0500
Source: ncurses
Source-Version: 5.4-1

We believe that the bug you reported is fixed in the latest version of
ncurses, which is due to be installed in the Debian FTP archive:

libncurses5-dbg_5.4-1_i386.deb
  to pool/main/n/ncurses/libncurses5-dbg_5.4-1_i386.deb
libncurses5-dev_5.4-1_i386.deb
  to pool/main/n/ncurses/libncurses5-dev_5.4-1_i386.deb
libncurses5_5.4-1_i386.deb
  to pool/main/n/ncurses/libncurses5_5.4-1_i386.deb
libncursesw5-dbg_5.4-1_i386.deb
  to pool/main/n/ncurses/libncursesw5-dbg_5.4-1_i386.deb
libncursesw5-dev_5.4-1_i386.deb
  to pool/main/n/ncurses/libncursesw5-dev_5.4-1_i386.deb
libncursesw5_5.4-1_i386.deb
  to pool/main/n/ncurses/libncursesw5_5.4-1_i386.deb
ncurses-base_5.4-1_all.deb
  to pool/main/n/ncurses/ncurses-base_5.4-1_all.deb
ncurses-bin_5.4-1_i386.deb
  to pool/main/n/ncurses/ncurses-bin_5.4-1_i386.deb
ncurses-term_5.4-1_all.deb
  to pool/main/n/ncurses/ncurses-term_5.4-1_all.deb
ncurses_5.4-1.dsc
  to pool/main/n/ncurses/ncurses_5.4-1.dsc
ncurses_5.4-1.tar.gz
  to pool/main/n/ncurses/ncurses_5.4-1.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 230335@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Jacobowitz <dan@debian.org> (supplier of updated ncurses package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 10 Mar 2004 13:52:53 -0500
Source: ncurses
Binary: ncurses-base lib64ncurses5 libncursesw5-dev libncursesw5-dbg ncurses-bin libncurses5 libncursesw5 libncurses5-dev ncurses-term libncurses5-dbg lib64ncurses5-dev
Architecture: source i386 all
Version: 5.4-1
Distribution: unstable
Urgency: low
Maintainer: Daniel Jacobowitz <ncurses-maint@debian.org>
Changed-By: Daniel Jacobowitz <dan@debian.org>
Description: 
 libncurses5 - Shared libraries for terminal handling
 libncurses5-dbg - Debugging/profiling libraries for ncurses
 libncurses5-dev - Developer's libraries and docs for ncurses
 libncursesw5 - Shared libraries for terminal handling (wide character support)
 libncursesw5-dbg - Debugging/profiling libraries for ncurses
 libncursesw5-dev - Developer's libraries for ncursesw
 ncurses-base - Descriptions of common terminal types
 ncurses-bin - Terminal-related programs and man pages
 ncurses-term - Additional terminal type definitions
Closes: 230335 236957
Changes: 
 ncurses (5.4-1) unstable; urgency=low
 .
   * New upstream release (Closes: #230335, #236957).
   * Update to policy 3.6.1.0 (no changes required).
Files: 
 1b00316b8e625e3500ac064b8b299272 742 libs standard ncurses_5.4-1.dsc
 3eca4da2d5828ea2c14e9cc8fb33a3a1 2157717 libs standard ncurses_5.4-1.tar.gz
 c1c8860cab04d78dabc5c56c59a768d3 274386 base required libncurses5_5.4-1_i386.deb
 6112631f0b7623ce6163b90eda008090 1038290 libdevel optional libncurses5-dev_5.4-1_i386.deb
 347a9730c44a86f3a9a3054de2365ff8 3970470 libdevel extra libncurses5-dbg_5.4-1_i386.deb
 0769fbef85233a23e3cb6912e2e539e1 286396 libs standard libncursesw5_5.4-1_i386.deb
 b86b146a6a177f0ffb3e2fe10a494342 396184 libdevel optional libncursesw5-dev_5.4-1_i386.deb
 3c518e69c12b48c4e43935d75af7785b 4437814 libdevel extra libncursesw5-dbg_5.4-1_i386.deb
 7a3f239da59a487e06c6d9cd9e59b786 205204 base required ncurses-bin_5.4-1_i386.deb
 fc1c33f43425b305c089e385e5ccad52 11080 base required ncurses-base_5.4-1_all.deb
 1f2686f63879cc4781f215485081706b 279452 admin standard ncurses-term_5.4-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAT3AgbgOPXuCjg3cRAvqDAJ0fz5QIqGnXi9mfLFyWYAurM2XOlgCfX33i
q0inRD1mpPoB/McduQ1DKGE=
=wacD
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 15:39:44 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.