diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-09-15 01:09:10 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-09-27 03:07:10 +0900 |
commit | e879a76b11eb9f1df5d1080647c5a0383b3e5e80 (patch) | |
tree | b3ec991b588855ee5aca95983a5f636f05689beb /win32/configure.bat | |
parent | 205168429eee3f198994e49a3e36bef1ccfd7ca0 (diff) | |
download | ruby-wip-topic/pack-integer-overflow.tar.gz |
pack.c: avoid signed integer overflowwip-topic/pack-integer-overflow
* pack.c (pack_pack, pack_unpack): Use strtol() instead of strtoul(), as
the length must be in the range of long. This suppresses the implicit
type conversion and let it raise a better exception for too large
length.
* pack.c (pack_unpack): Fix 'b', 'B', 'h', 'H', 'u', 'm' format. Ensure
that multiplying does not cause integer overflow.
Diffstat (limited to 'win32/configure.bat')
0 files changed, 0 insertions, 0 deletions