This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf55d65
)
[perl #125781] handle range overflow when Size_t is smaller than IV
author
Tony Cook
<tony@develop-help.com>
Tue, 11 Aug 2015 05:49:37 +0000
(15:49 +1000)
committer
Tony Cook
<tony@develop-help.com>
Tue, 18 Aug 2015 05:27:57 +0000
(15:27 +1000)
pp_ctl.c
patch
|
blob
|
blame
|
history
diff --git
a/pp_ctl.c
b/pp_ctl.c
index
5b58f47
..
50db9a8
100644
(file)
--- a/
pp_ctl.c
+++ b/
pp_ctl.c
@@
-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)