This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/21393] New: Missing dup3 error check in freopen, freopen64


https://sourceware.org/bugzilla/show_bug.cgi?id=21393

            Bug ID: 21393
           Summary: Missing dup3 error check in freopen, freopen64
           Product: glibc
           Version: 2.25
            Status: NEW
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---

The code has this:

          __dup3 (_IO_fileno (result), fd,
                  (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0
                  ? O_CLOEXEC : 0);

That is, there is no error checking for dup3 failure.  We should add error
checking here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]