Leif Hedstrom created TS-3696:
---------------------------------

             Summary: Bad range check in HdrHeap
                 Key: TS-3696
                 URL: https://issues.apache.org/jira/browse/TS-3696
             Project: Traffic Server
          Issue Type: Bug
          Components: HTTP
            Reporter: Leif Hedstrom


gcc 5.1 complains with

{code}
../../../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
{code}

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to