znode expr_node, case_node;
zend_op *opline;
- uint32_t *jmpnz_opnums, opnum_default_jmp, opnum_switch;
+ uint32_t *jmpnz_opnums, opnum_default_jmp, opnum_switch = (uint32_t)-1;
zend_uchar jumptable_type;
HashTable *jumptable = NULL;
zend_update_jump_target_to_next(opnum_default_jmp);
if (jumptable) {
+ ZEND_ASSERT(opnum_switch != (uint32_t)-1);
opline = &CG(active_op_array)->opcodes[opnum_switch];
opline->extended_value = get_next_op_number();
}
zend_bool is_last_catch = (i + 1 == catches->children);
uint32_t *jmp_multicatch = safe_emalloc(sizeof(uint32_t), classes->children - 1, 0);
- uint32_t opnum_catch;
+ uint32_t opnum_catch = (uint32_t)-1;
CG(zend_lineno) = catch_ast->lineno;
for (j = 0; j < classes->children; j++) {
-
zend_ast *class_ast = classes->child[j];
zend_bool is_last_class = (j + 1 == classes->children);
jmp_opnums[i + 1] = zend_emit_jump(0);
}
+ ZEND_ASSERT(opnum_catch != (uint32_t)-1 && "Should have at least one class");
opline = &CG(active_op_array)->opcodes[opnum_catch];
if (!is_last_catch) {
opline->op2.opline_num = get_next_op_number();
{
char *str, *trimmarker = NULL;
zend_string *encoding = NULL;
- zend_long from, width, swidth;
+ zend_long from, width, swidth = 0;
size_t str_len, trimmarker_len;
mbfl_string string, result, marker, *ret;
/* Zero length blocks don't have a last instruction that would normally do this */
scdf_mark_edge_feasible(scdf, i, block->successors[0]);
} else {
- zend_op *opline;
+ zend_op *opline = NULL;
int j, end = block->start + block->len;
for (j = block->start; j < end; j++) {
opline = &scdf->op_array->opcodes[j];
if (block->successors_count == 1) {
scdf_mark_edge_feasible(scdf, i, block->successors[0]);
} else if (block->successors_count > 1) {
+ ZEND_ASSERT(opline && "Should have opline in non-empty block");
if (opline->opcode == ZEND_OP_DATA) {
opline--;
j--;
int i, j;
zend_op *opline, *end;
int *tmp = NULL;
- ALLOCA_FLAG(use_heap);
+ ALLOCA_FLAG(use_heap = 0);
// FIXME: Can we optimize this copying out in some cases?
if (blocks[n].next_child >= 0) {
{
zend_long how = PDO_FETCH_USE_DEFAULT;
zval data, *return_all;
- zval *arg2;
+ zval *arg2 = NULL;
zend_class_entry *old_ce;
zval old_ctor_args, *ctor_args = NULL;
int error = 0, flags, old_arg_count;
zval retval;
int ret;
+ // Exception occurred on previous callback. Don't attempt to call function.
+ if (EG(exception)) {
+ return 0;
+ }
+
collation->fci.fci.size = (sizeof(collation->fci.fci));
ZVAL_COPY_VALUE(&collation->fci.fci.function_name, &collation->cmp_func);
collation->fci.fci.object = NULL;
collation->fci.fci.params = zargs;
- if (!EG(exception)) {
- //Exception occurred on previous callback. Don't attempt to call function
- if ((ret = zend_call_function(&collation->fci.fci, &collation->fci.fcc)) == FAILURE) {
- php_error_docref(NULL, E_WARNING, "An error occurred while invoking the compare callback");
- }
- } else {
- ZVAL_UNDEF(&retval);
+ if ((ret = zend_call_function(&collation->fci.fci, &collation->fci.fcc)) == FAILURE) {
+ php_error_docref(NULL, E_WARNING, "An error occurred while invoking the compare callback");
}
zval_ptr_dtor(&zargs[0]);
zend_long cryptokind = 0;
zval *zstream, *zsessstream = NULL;
php_stream *stream, *sessstream = NULL;
- zend_bool enable, cryptokindnull;
+ zend_bool enable, cryptokindnull = 1;
int ret;
ZEND_PARSE_PARAMETERS_START(2, 4)
php_stream_from_zval(stream, zstream);
if (enable) {
- if (ZEND_NUM_ARGS() < 3 || cryptokindnull) {
+ if (cryptokindnull) {
zval *val;
if (!GET_CTX_OPT(stream, "ssl", "crypto_method", val)) {
uint8_t state = 0;
size_t pos;
char *allow_free = NULL;
- const char *allow_actual;
char is_xml = 0;
buf = estrndup(rbuf, len);
br = 0;
if (allow) {
allow_free = zend_str_tolower_dup_ex(allow, allow_len);
- allow_actual = allow_free ? allow_free : allow;
+ allow = allow_free ? allow_free : allow;
tbuf = emalloc(PHP_TAG_BUF_SIZE + 1);
tp = tbuf;
} else {
}
*(tp++) = '>';
*tp='\0';
- if (php_tag_find(tbuf, tp-tbuf, allow_actual)) {
+ if (php_tag_find(tbuf, tp-tbuf, allow)) {
memcpy(rp, tbuf, tp-tbuf);
rp += tp-tbuf;
}
*rp = '\0';
}
efree((void *)buf);
- if (allow) {
+ if (tbuf) {
efree(tbuf);
- if (allow_free) {
- efree(allow_free);
- }
+ }
+ if (allow_free) {
+ efree(allow_free);
}
if (stateptr)
*stateptr = state;