diff options
author | Tony Cook <tony@develop-help.com> | 2015-08-11 15:49:37 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-08-18 15:27:57 +1000 |
commit | a1e27170fc118bb226e97988b42fb9a970689740 (patch) | |
tree | b12eb96d0f7d82bd564b2940a01bc5a17c70d3b0 | |
parent | bf55d65d91cd95545972d61170706df20eba4db2 (diff) | |
download | perl-a1e27170fc118bb226e97988b42fb9a970689740.tar.gz |
[perl #125781] handle range overflow when Size_t is smaller than IV
-rw-r--r-- | pp_ctl.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1206,7 +1206,11 @@ PP(pp_flop) /* The wraparound of signed integers is undefined * behavior, but here we aim for count >=1, and * negative count is just wrong. */ - if (n < 1) + if (n < 1 +#if IVSIZE > Size_t_size + || n > SSize_t_MAX +#endif + ) overflow = TRUE; } if (overflow) |