bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #43921] make does not check error result of ttyname()


From: Frank Heckenbach
Subject: [bug #43921] make does not check error result of ttyname()
Date: Sat, 03 Jan 2015 08:39:04 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.3.0

URL:
  <http://savannah.gnu.org/bugs/?43921>

                 Summary: make does not check error result of ttyname()
                 Project: make
            Submitted by: frank
            Submitted on: Sa 03 Jan 2015 08:39:03 GMT
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.1
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

make uses isatty() on stdout/stderr and if successful, calls
define_variable_cname() with the result of ttyname() without checking whether
it's NULL.

Of course, normally this won't happen after isatty() returns 1, but it may in
special circumstances, e.g. under GNU/Linux if it's a pty, but /dev/pts is not
readable. That's one way to reproduce it:

% sudo chmod 0 /dev/pts
% make 
Segmentation fault
% sudo chmod 755 /dev/pts

(What I'd actually done when I saw it was to run make in a chroot where I had
bind-mounted /dev, but forgotten about /dev/pts -- should have used --rbind.)

So you might say it's a case of don't-do-that, and it's not really important
to me, just wanted to let you know ...




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43921>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]