diff options
author | Hugo van der Sanden <hv@crypt.org> | 2002-08-23 12:23:31 +0000 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-08-23 12:23:31 +0000 |
commit | 1ecdd9a87cdfac3d4938733086a89d685b66dfb5 (patch) | |
tree | a33dee174f434858c6f553ca7eaa3ccc83e71cfa /op.c | |
parent | ba329e04450c9e718e3584348f2d0f15c4762fb6 (diff) | |
download | perl-1ecdd9a87cdfac3d4938733086a89d685b66dfb5.tar.gz |
#17747 caused bad free()s with PERL_DESTRUCT by calling newXS()
with a NULL subaddr. Fix that, and stop it happening again.
p4raw-id: //depot/perl@17763
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -5217,6 +5217,9 @@ Perl_newXS(pTHX_ char *name, XSUBADDR_t subaddr, char *filename) GV_ADDMULTI, SVt_PVCV); register CV *cv; + if (!subaddr) + Perl_croak(aTHX_ "panic: no address for '%s' in '%s'", name, filename); + if ((cv = (name ? GvCV(gv) : Nullcv))) { if (GvCVGEN(gv)) { /* just a cached method */ |