summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2012-03-24 00:27:52 +0100
committerFather Chrysostomos <sprout@cpan.org>2012-05-21 17:51:53 -0700
commitfcb8da00bbf96c055c5bfb9ae7a8086051c6f3b0 (patch)
tree3e421dfcf21ae11f9cbec090dc0d29ee37974264 /doop.c
parent803e7e8145a1acab70f0b5356329b191cfc8ccd9 (diff)
downloadperl-fcb8da00bbf96c055c5bfb9ae7a8086051c6f3b0.tar.gz
[rt #111730] don't use I32 for offsets in vec()
do_vecset() do_vecget() used I32 for the offset, which meant that offsets outside the -2Gb - +2Gb offset were truncated, resulting in various misbehaviours.
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/doop.c b/doop.c
index f1304772c2..a562536bbb 100644
--- a/doop.c
+++ b/doop.c
@@ -760,7 +760,7 @@ Perl_do_sprintf(pTHX_ SV *sv, I32 len, SV **sarg)
/* currently converts input to bytes if possible, but doesn't sweat failure */
UV
-Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size)
+Perl_do_vecget(pTHX_ SV *sv, SSize_t offset, int size)
{
dVAR;
STRLEN srclen, len, uoffset, bitoffs = 0;
@@ -908,8 +908,8 @@ void
Perl_do_vecset(pTHX_ SV *sv)
{
dVAR;
- register I32 offset, bitoffs = 0;
- register I32 size;
+ register SSize_t offset, bitoffs = 0;
+ register int size;
register unsigned char *s;
register UV lval;
I32 mask;