kuba--/zip

Buffer overflow in zip.c

ka5p3rr opened this issue · 1 comments

Hi, I have noticed that in the zip.c file the condition of (i < entry_num) in the AND statements seems to be put into the wrong place resulting in a buffer overflow. It affects lines 695, 700, 709, 762, 768 and 776 as far as I can tell. The condition is checked after accessing the entry arrays, which means the last index is out-of-bounds.

I believe the AND condition should be flipped such that (i < entry_num) && ....

Thanks, should be fixed, now.