[Bug stdio/22673] New: The limit of examining characters in mode of fdopen is hardcoded to 7.

kshitijwarungase at gmail dot com sourceware-bugzilla@sourceware.org
Thu Jan 4 16:06:00 GMT 2018


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

            Bug ID: 22673
           Summary: The limit of examining characters in mode of fdopen
                    is hardcoded to 7.
           Product: glibc
           Version: 2.26
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: kshitijwarungase at gmail dot com
                CC: kshitijwarungase at gmail dot com
  Target Milestone: ---

When  parsing  for  individual flag characters in mode (i.e., the characters
preceding the "ccs" specification), the  glibc implementation  of fopen() and
freopen() limits the number of characters examined in mode  to  7  (or,  in 
glibc  versions before  2.14,  to 6, which was not enough to include possible
specifications such as "rb+cmxe").  The  current  implementation of fdopen()
parses at most 5 characters in mode.

We can make the examination of charactrs in mode generic with conditional loop
instead of fix iteration.

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


More information about the Glibc-bugs mailing list