madler / zlib

A massively spiffy yet delicately unobtrusive compression library.
http://zlib.net/
Other
5.71k stars 2.45k forks source link

gzgets should take an unsigned integer, not a signed one #813

Closed AreaZR closed 1 year ago

AreaZR commented 1 year ago

Every usage of this function intends on passing an unsigned integer anyway, as they do in gzread or gzwrite.

I found bugs where to prevent overflow before calling this function, programmers checked for UINT_MAX, and not INT_MAX.

madler commented 1 year ago

This would break backward compatibility. It will remain an int.