scsh-hackers
[Top] [All Lists]

[Scsh-hackers] [ scsh-Bugs-577473 ] uninitialized var in scsh/tty1.c

To: noreply@sourceforge.net
Subject: [Scsh-hackers] [ scsh-Bugs-577473 ] uninitialized var in scsh/tty1.c
From: noreply@sourceforge.net
Date: Thu Jul 4 09:21:06 2002
List-id: Discussion among the implementors <scsh-hackers.lists.sourceforge.net>
Sender: scsh-hackers-admin@lists.sourceforge.net
Bugs item #577473, was opened at 2002-07-04 18:08
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110493&aid=577473&group_id=10493

Category: run-time
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Martin Gasbichler (mainzelm)
Summary: uninitialized var in scsh/tty1.c

Initial Comment:
In scheme_tcsetattr, what I understand of the following
code:
  struct termios t;

  memcpy(t.c_cc, control_chars, NCCS);

  /* This first clause of this conditional test will
hopefully
  ** resolve the branch at compile time. However, since
VMIN/VEOF
  ** and VTIME/VEOL are allowed by POSIX to colllide,
we have to check.
  ** If they do collide, we set EOF & EOL in canonical
mode, and MIN & TIME
  ** in raw mode. Ah, Unix.
  */

  if( (VMIN != VEOF && VTIME != VEOL) || !(t.c_lflag &
ICANON) ) {
      t.c_cc[VMIN] = min;
      t.c_cc[VTIME] = time;
      }

  t.c_iflag = (iflag_hi8 << 24) | iflag_lo24;
  t.c_oflag = (oflag_hi8 << 24) | oflag_lo24;
  t.c_cflag = (cflag_hi8 << 24) | cflag_lo24;
  t.c_lflag = (lflag_hi8 << 24) | lflag_lo24;

is that the test !(t.c_lflag & ICANON) is pretty much
undefined, because t.c_lflag is not yet initialized.

----------------------------------------------------------------------

>Comment By: Martin Gasbichler (mainzelm)
Date: 2002-07-04 18:20

Message:
Logged In: YES 
user_id=17553

The quoted code if part of the obsolete 0.5.X series.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110493&aid=577473&group_id=10493


<Prev in Thread] Current Thread [Next in Thread>