Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2598

Coverity analysis defect 43915: Out-of-bounds read

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • 1.10.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Out-of-bounds read from a buffer

      Defect 43915 (STATIC_C)
      Checker OVERRUN (subcategory read)
      File: /src/bson/bson-timegm.c
      Function timesub
      /src/bson/bson-timegm.c, line: 349
      Checking "i == 0L" implies that "i" is 0 on the true branch.

                      hit = ((i == 0 && lp->ls_corr > 0) ||
      

      /src/bson/bson-timegm.c, line: 349
      Underrunning array "sp->lsis" at element index -1 (byte offset -16) using index "i - 1L" (which evaluates to -1).

                      hit = ((i == 0 && lp->ls_corr > 0) ||
      

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: