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/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to