summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/ccvs/ccvs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/ccvs/ccvs.c b/ext/ccvs/ccvs.c
index 891a349fbf..9e72e1382c 100644
--- a/ext/ccvs/ccvs.c
+++ b/ext/ccvs/ccvs.c
@@ -193,6 +193,11 @@ PHP_FUNCTION(ccvs_new) /* cv_new() */
}
convert_to_string_ex(psess);
+ if (!Z_STRVAL_PP(psess)) {
+ php_error(E_WARNING, "Invalid session to ccvs_new()");
+ RETURN_FALSE;
+ }
+
sess = hks_ptr_stringtoptr((*psess)->value.str.val);
convert_to_string_ex(pinvoice);