summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-06-22 21:31:36 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2015-06-26 23:09:40 -0400
commit61f2771d8144caf40d927b8e1f74264974e31c7a (patch)
treeb3812ca562a74e2278fd167d9c186b19e83339ab /dist
parentdb1d297d079f1280523853b6e08ee57f6d836d9f (diff)
downloadperl-61f2771d8144caf40d927b8e1f74264974e31c7a.tar.gz
Possible NULL cxt derefs.
Coverity CIDs 104819, 104820, 104821, 104827, 104859, 104860 Using assert() instead of Storable ASSERT() because Coverity understands the first one.
Diffstat (limited to 'dist')
-rw-r--r--dist/Storable/Storable.xs7
1 files changed, 7 insertions, 0 deletions
diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs
index 39f35653a0..dbb80a9aaf 100644
--- a/dist/Storable/Storable.xs
+++ b/dist/Storable/Storable.xs
@@ -1716,6 +1716,7 @@ static int last_op_in_netorder(pTHX)
{
dSTCXT;
+ assert(cxt);
return cxt->netorder;
}
@@ -3845,6 +3846,7 @@ static int do_store(
* free up memory for them now.
*/
+ assert(cxt);
if (cxt->s_dirty)
clean_context(aTHX_ cxt);
@@ -3946,6 +3948,7 @@ static SV *mbuf2sv(pTHX)
{
dSTCXT;
+ assert(cxt);
return newSVpv(mbase, MBUF_SIZE());
}
@@ -6263,6 +6266,7 @@ static SV *do_retrieve(
* free up memory for them now.
*/
+ assert(cxt);
if (cxt->s_dirty)
clean_context(aTHX_ cxt);
@@ -6509,6 +6513,7 @@ static SV *dclone(pTHX_ SV *sv)
* free up memory for them now.
*/
+ assert(cxt);
if (cxt->s_dirty)
clean_context(aTHX_ cxt);
@@ -6546,6 +6551,7 @@ static SV *dclone(pTHX_ SV *sv)
* Now, 'cxt' may refer to a new context.
*/
+ assert(cxt);
ASSERT(!cxt->s_dirty, ("clean context"));
ASSERT(!cxt->entry, ("entry will not cause new context allocation"));
@@ -6708,6 +6714,7 @@ last_op_in_netorder()
if (ix) {
dSTCXT;
+ assert(cxt);
result = cxt->entry && (cxt->optype & ix) ? TRUE : FALSE;
} else {
result = !!last_op_in_netorder(aTHX);