This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
assert(perinterp_sv) before sv_setiv() derefs NULL.
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 25 Jun 2015 00:14:39 +0000 (20:14 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 27 Jun 2015 03:09:45 +0000 (23:09 -0400)
Coverity CID 104842.

dist/Storable/Storable.xs

index 1537697..e7d0329 100644 (file)
@@ -417,6 +417,7 @@ static MAGIC *THX_sv_magicext(pTHX_ SV *sv, SV *obj, int type,
 #define INIT_STCXT                                                     \
        dSTCXT;                                                                 \
        NEW_STORABLE_CXT_OBJ(cxt);                              \
+       assert(perinterp_sv);                                   \
        sv_setiv(perinterp_sv, PTR2IV(cxt->my_sv))
 
 #define SET_STCXT(x)                                                           \