aboutsummaryrefslogtreecommitdiffstats
path: root/.editorconfig
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-09-15 01:09:10 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-09-27 03:07:10 +0900
commite879a76b11eb9f1df5d1080647c5a0383b3e5e80 (patch)
treeb3ec991b588855ee5aca95983a5f636f05689beb /.editorconfig
parent205168429eee3f198994e49a3e36bef1ccfd7ca0 (diff)
downloadruby-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 '.editorconfig')
0 files changed, 0 insertions, 0 deletions