summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorMike Guy <mjtg@cam.ac.uk>2000-08-23 19:38:46 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-23 17:52:00 +0000
commitfe58ced666d4d8b2252541f18d23bdd3e127c8f9 (patch)
tree54a0d396cf16a574cd4fffa6c1e8d7db063abc46 /doop.c
parent86d0a7b65418bdabaf45d7a881d3bde91d5f8bee (diff)
downloadperl-fe58ced666d4d8b2252541f18d23bdd3e127c8f9.tar.gz
Re: [ID 20000821.008] Negitive numbers with vec dumps core
Message-Id: <E13ReUA-0000vC-00@virgo.cus.cam.ac.uk> p4raw-id: //depot/perl@6790
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/doop.c b/doop.c
index 074be99e18..3c86690bfb 100644
--- a/doop.c
+++ b/doop.c
@@ -689,6 +689,8 @@ Perl_do_vecset(pTHX_ SV *sv)
(void)SvPOK_only(targ);
lval = SvUV(sv);
offset = LvTARGOFF(sv);
+ if (offset < 0)
+ Perl_croak(aTHX_ "Assigning to negative offset in vec");
size = LvTARGLEN(sv);
if (size < 1 || (size & (size-1))) /* size < 1 or not a power of two */
Perl_croak(aTHX_ "Illegal number of bits in vec");