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 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 4.1Operating System: POSIX-Based
Fixed Release: NoneTriage 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 12 Jul 2015 09:03:08 PM UTCpsmithStatusNone=>Duplicate
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1