Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3696

Bad range check in HdrHeap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 4.2.4, 5.3.1, 6.0.0
    • HTTP
    • None

    Description

      gcc 5.1 complains with

      ../../../proxy/hdrs/HdrHeap.cc: In member function 'void HdrHeap::inherit_string_heaps(const HdrHeap*)':
      ../../../proxy/hdrs/HdrHeap.cc:978:23: error: array subscript is above array bounds [-Werror=array-bounds]
           if (m_ronly_heap[z].m_heap_start == h_start) {
                             ^
      cc1plus: all warnings being treated as errors
      Makefile:677: recipe for target 'HdrHeap.o' failed
      make[1]: *** [HdrHeap.o] Error 1
      

      There's a check in the code to make sure *index is within the boundaries, but it is done too late.

      Attachments

        Activity

          People

            zwoop Leif Hedstrom
            zwoop Leif Hedstrom
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: