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 regex/1227] New: regexec portability bug: code assumes reg_errcode_t is signed


There's a portability bug in sift_states_bkref.  The code assumes that
reg_errcode_t is a signed type that can represent -1, but this is not
necessarily true if _XOPEN_SOURCE is not defined, because in that case
reg_errcode_t is an enumerated type containing only nonnegative values,
and the C standard allows such types to be unsigned.

This problem was reported by Sam Steingold in
<http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.

I'll attach a patch.

-- 
           Summary: regexec portability bug: code assumes reg_errcode_t is
                    signed
           Product: glibc
           Version: 2.3.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: regex
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: eggert at gnu dot org
                CC: glibc-bugs-regex at sources dot redhat dot com,glibc-
                    bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1227

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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