mustangostang / spyc

A simple YAML loader/dumper class for PHP
MIT License
701 stars 207 forks source link

Spyc.php fails to account for negative PHP_INT_MAX #37

Closed entendu closed 7 years ago

entendu commented 9 years ago

While detecting the int type, spyc properly checks if the numerical value exceeds PHP_INT_MAX. However, it fails to account for the negative limit, so numbers less than (for example) the 64-bit limit of -9223372036854775808 get clobbered into the limit.