richardphibel / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone

7a6603 Fix stack overflow in rpm2extents

Authored and Committed by Richard Phibel a year ago
    Fix stack overflow in rpm2extents
    
    Creation of array struct digestoffset offsets[rpmfiFC(fi)] caused a
    stack overflow because the total size is greater than 8M which is the
    stack size limit on Linux. To fix the issue, the array is allocated on
    the heap.
    
    I used AddressSanitizer to find the root cause of the issue. It found a
    number of memory leaks so I fixed them as well.
    
        
file modified
+5 -1