This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
RE: Error in io\serial\current\src\common\tty.c
- To: Alexander Hering <Hering at esk dot fhg dot de>
- Subject: RE: [ECOS] Error in io\serial\current\src\common\tty.c
- From: Gary Thomas <gthomas at redhat dot com>
- Date: Fri, 28 Jan 2000 07:16:18 -0700 (MST)
- Cc: eCos Discussion <ecos-discuss at sourceware dot cygnus dot com>
A fix for this problem has already been installed.
We suggest that you use CVS to keep track of the [very] latest
eCos sources. See our web page (http://sourceware.cygnus.com/ecos)
for the details.
On 28-Jan-00 Alexander Hering wrote:
> Hello,
>
> we have found an error in the tty driver.
> When i press the backspace key, when no more characters are in the
> buffer, the last input is printed again.
>
> In function tty_read size is declared as unsigned int, and must not be
> tested against a value below zero.
>
> ====> cyg_uint32 size, clen;
>
> if ((c == '\b') || (c == 0x7F)) {
> size -= 2; // erase one character + 'backspace' char
> ====> if (size < 0) size = 0;
>
> Greetings
>
> Alex
>
> --
> Fraunhofer-Einrichtung
> Systeme der Kommunikationstechnik
>
> Alexander Hering Hansastraße 32
> Dipl.-Ing. D-80686 München
> Telefon: +49(0)89/547088-37
> E-Mail: Hering@esk.fhg.de Telefax: +49(0)89/547088-25