bugmake - Bugs: bug #43921, make does not check error result...


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

Submitted by:  Frank Heckenbach <frank>
Submitted on:  Sat 03 Jan 2015 08:39:03 AM UTC  
Severity:  3 - Normal Item Group:  Bug
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.1 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 12 Jul 2015 09:03:08 PM UTC, comment #1: 

This was fixed previously for bug #43434

Paul D. Smith <psmith>
Project Administrator
Sat 03 Jan 2015 08:39:03 AM UTC, original submission:  

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 ...

Frank Heckenbach <frank>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by frank (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-07-12 psmith StatusNone => Duplicate
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5