diff options
author | Salvador Ortiz Garcia <sog@msg.com.mx> | 2010-05-28 10:25:52 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-05-28 10:25:52 +0200 |
commit | dc1f0c2041dab5a98af69338d1fa501b5e90ac70 (patch) | |
tree | 1923718bfb935502ba9ddf73f2258ffae3a4e5cb | |
parent | 02927be17db68ef768a4a953e754b78a4350b226 (diff) | |
download | perl-dc1f0c2041dab5a98af69338d1fa501b5e90ac70.tar.gz |
Naif calls segfault T_PRTOBJ of the stock typemap
The T_PTROBJ INPUT in stock typemap only uses 'sv_derived_from' for
input validation, that cause a segfault when the argument passed match
the class name.
-rw-r--r-- | lib/ExtUtils/typemap | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ExtUtils/typemap b/lib/ExtUtils/typemap index 2c35437e34..f88858762d 100644 --- a/lib/ExtUtils/typemap +++ b/lib/ExtUtils/typemap @@ -149,7 +149,7 @@ T_REF_IV_PTR ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]}, \"$var\", \"$ntype\") T_PTROBJ - if (sv_derived_from($arg, \"${ntype}\")) { + if (SvROK($arg) && sv_derived_from($arg, \"${ntype}\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = INT2PTR($type,tmp); } |