[llvm-bugs] [Bug 31387] New: basic_regex::__parse_decimal_escape doesn't check if __first reaches __last

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 15 01:48:21 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=31387

            Bug ID: 31387
           Summary: basic_regex::__parse_decimal_escape doesn't check if
                    __first reaches __last
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: karen at codesynthesis.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

The basic_regex::__parse_decimal_escape() function implementation (svn repo
revision 289795) has the following cycle:

for (++__first; '0' <= *__first && *__first <= '9'; ++__first)
  __v = 10 * __v + *__first - '0';

Note that it increments and dereferences the __first iterator not checking if
it has already reached the __last iterator value.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161215/5f28f867/attachment.html>


More information about the llvm-bugs mailing list