Closed zmodem closed 7 months ago
unzGetCurrentFileInfo64 does not null terminate the szFileName if it's longer or equal to fileNameBufferSize.
unzGetCurrentFileInfo64
szFileName
fileNameBufferSize
To ensure the strings are null terminated in the calling code, increase the buffer size by one and initialize with zeros.
Fixes #869
@madler, @gvollant: Can you look this PR?
Linked to:
I fixed it by making the buffers 65537 bytes. The zip file format limits file names to 65536 bytes.
I fixed it by making the buffers 65537 bytes.
Clever :-)
unzGetCurrentFileInfo64
does not null terminate theszFileName
if it's longer or equal tofileNameBufferSize
.To ensure the strings are null terminated in the calling code, increase the buffer size by one and initialize with zeros.
Fixes #869