idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
3,500
PHP_METHOD(PharFileInfo, isCRCChecked) { PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_BOOL(entry_obj->ent.entry->is_crc_checked); }
DoS
0
PHP_METHOD(PharFileInfo, isCRCChecked) { PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_BOOL(entry_obj->ent.entry->is_crc_checked); }
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,501
PHP_METHOD(PharFileInfo, getPharFlags) { PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_LONG(entry_obj->ent.entry->flags & ~(PHAR_ENT_PERM_MASK|PHAR_ENT_COMPRESSION_MASK)); }
DoS
0
PHP_METHOD(PharFileInfo, getPharFlags) { PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_LONG(entry_obj->ent.entry->flags & ~(PHAR_ENT_PERM_MASK|PHAR_ENT_COMPRESSION_MASK)); }
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,502
PHP_METHOD(PharFileInfo, chmod) { char *error; long perms; PHAR_ENTRY_OBJECT(); if (entry_obj->ent.entry->is_temp_dir) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, \ "Phar entry \"%s\" is a temporary directory (not an actual entry in the archive), cannot chmod", entry_obj->ent.entry->...
DoS
0
PHP_METHOD(PharFileInfo, chmod) { char *error; long perms; PHAR_ENTRY_OBJECT(); if (entry_obj->ent.entry->is_temp_dir) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, \ "Phar entry \"%s\" is a temporary directory (not an actual entry in the archive), cannot chmod", entry_obj->ent.entry->...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,503
PHP_METHOD(PharFileInfo, hasMetadata) { PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_BOOL(entry_obj->ent.entry->metadata != NULL); }
DoS
0
PHP_METHOD(PharFileInfo, hasMetadata) { PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_BOOL(entry_obj->ent.entry->metadata != NULL); }
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,504
PHP_METHOD(PharFileInfo, getMetadata) { PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } if (entry_obj->ent.entry->metadata) { if (entry_obj->ent.entry->is_persistent) { zval *ret; char *buf = estrndup((char *) entry_obj->ent.entry->metadata, entry_obj->ent.entry->metadata_...
DoS
0
PHP_METHOD(PharFileInfo, getMetadata) { PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } if (entry_obj->ent.entry->metadata) { if (entry_obj->ent.entry->is_persistent) { zval *ret; char *buf = estrndup((char *) entry_obj->ent.entry->metadata, entry_obj->ent.entry->metadata_...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,505
PHP_METHOD(PharFileInfo, setMetadata) { char *error; zval *metadata; PHAR_ENTRY_OBJECT(); if (PHAR_G(readonly) && !entry_obj->ent.entry->phar->is_data) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly"); return; } if (entr...
DoS
0
PHP_METHOD(PharFileInfo, setMetadata) { char *error; zval *metadata; PHAR_ENTRY_OBJECT(); if (PHAR_G(readonly) && !entry_obj->ent.entry->phar->is_data) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly"); return; } if (entr...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,506
PHP_METHOD(PharFileInfo, delMetadata) { char *error; PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } if (PHAR_G(readonly) && !entry_obj->ent.entry->phar->is_data) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini se...
DoS
0
PHP_METHOD(PharFileInfo, delMetadata) { char *error; PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } if (PHAR_G(readonly) && !entry_obj->ent.entry->phar->is_data) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini se...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,507
PHP_METHOD(PharFileInfo, getContent) { char *error; php_stream *fp; phar_entry_info *link; PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } if (entry_obj->ent.entry->is_dir) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Phar error: Cannot retrieve ...
DoS
0
PHP_METHOD(PharFileInfo, getContent) { char *error; php_stream *fp; phar_entry_info *link; PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } if (entry_obj->ent.entry->is_dir) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Phar error: Cannot retrieve ...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,508
PHP_METHOD(PharFileInfo, compress) { long method; char *error; PHAR_ENTRY_OBJECT(); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &method) == FAILURE) { return; } if (entry_obj->ent.entry->is_tar) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Cannot compress with Gzip...
DoS
0
PHP_METHOD(PharFileInfo, compress) { long method; char *error; PHAR_ENTRY_OBJECT(); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &method) == FAILURE) { return; } if (entry_obj->ent.entry->is_tar) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Cannot compress with Gzip...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,509
PHP_METHOD(PharFileInfo, decompress) { char *error; PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } if (entry_obj->ent.entry->is_dir) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, \ "Phar entry is a directory, cannot set compression"); \ return; } ...
DoS
0
PHP_METHOD(PharFileInfo, decompress) { char *error; PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } if (entry_obj->ent.entry->is_dir) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, \ "Phar entry is a directory, cannot set compression"); \ return; } ...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,510
static void phar_add_file(phar_archive_data **pphar, char *filename, int filename_len, char *cont_str, int cont_len, zval *zresource TSRMLS_DC) { char *error; size_t contents_len; phar_entry_data *data; php_stream *contents_file; if (filename_len >= sizeof(".phar")-1 && !memcmp(filename, ".phar", sizeof(".phar")-...
DoS
0
static void phar_add_file(phar_archive_data **pphar, char *filename, int filename_len, char *cont_str, int cont_len, zval *zresource TSRMLS_DC) { char *error; size_t contents_len; phar_entry_data *data; php_stream *contents_file; if (filename_len >= sizeof(".phar")-1 && !memcmp(filename, ".phar", sizeof(".phar")-...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,511
static int phar_build(zend_object_iterator *iter, void *puser TSRMLS_DC) /* {{{ */ { zval **value; zend_bool close_fp = 1; struct _phar_t *p_obj = (struct _phar_t*) puser; uint str_key_len, base_len = p_obj->l, fname_len; phar_entry_data *data; php_stream *fp; size_t contents_len; char *fname, *error = NULL, *b...
DoS
0
static int phar_build(zend_object_iterator *iter, void *puser TSRMLS_DC) /* {{{ */ { zval **value; zend_bool close_fp = 1; struct _phar_t *p_obj = (struct _phar_t*) puser; uint str_key_len, base_len = p_obj->l, fname_len; phar_entry_data *data; php_stream *fp; size_t contents_len; char *fname, *error = NULL, *b...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,512
static zval *phar_convert_to_other(phar_archive_data *source, int convert, char *ext, php_uint32 flags TSRMLS_DC) /* {{{ */ { phar_archive_data *phar; phar_entry_info *entry, newentry; zval *ret; /* invalidate phar cache */ PHAR_G(last_phar) = NULL; PHAR_G(last_phar_name) = PHAR_G(last_alias) = NULL; phar = (p...
DoS
0
static zval *phar_convert_to_other(phar_archive_data *source, int convert, char *ext, php_uint32 flags TSRMLS_DC) /* {{{ */ { phar_archive_data *phar; phar_entry_info *entry, newentry; zval *ret; /* invalidate phar cache */ PHAR_G(last_phar) = NULL; PHAR_G(last_phar_name) = PHAR_G(last_alias) = NULL; phar = (p...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,513
static int phar_copy_file_contents(phar_entry_info *entry, php_stream *fp TSRMLS_DC) /* {{{ */ { char *error; off_t offset; phar_entry_info *link; if (FAILURE == phar_open_entry_fp(entry, &error, 1 TSRMLS_CC)) { if (error) { zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Cannot con...
DoS
0
static int phar_copy_file_contents(phar_entry_info *entry, php_stream *fp TSRMLS_DC) /* {{{ */ { char *error; off_t offset; phar_entry_info *link; if (FAILURE == phar_open_entry_fp(entry, &error, 1 TSRMLS_CC)) { if (error) { zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Cannot con...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,514
static int phar_file_action(phar_archive_data *phar, phar_entry_info *info, char *mime_type, int code, char *entry, int entry_len, char *arch, char *basename, char *ru, int ru_len TSRMLS_DC) /* {{{ */ { char *name = NULL, buf[8192]; const char *cwd; zend_syntax_highlighter_ini syntax_highlighter_ini; sapi_header_li...
DoS
0
static int phar_file_action(phar_archive_data *phar, phar_entry_info *info, char *mime_type, int code, char *entry, int entry_len, char *arch, char *basename, char *ru, int ru_len TSRMLS_DC) /* {{{ */ { char *name = NULL, buf[8192]; const char *cwd; zend_syntax_highlighter_ini syntax_highlighter_ini; sapi_header_li...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,515
static int phar_file_type(HashTable *mimes, char *file, char **mime_type TSRMLS_DC) /* {{{ */ { char *ext; phar_mime_type *mime; ext = strrchr(file, '.'); if (!ext) { *mime_type = "text/plain"; /* no file extension = assume text/plain */ return PHAR_MIME_OTHER; } ++ext; if (SUCCESS != zend_hash_find(mimes,...
DoS
0
static int phar_file_type(HashTable *mimes, char *file, char **mime_type TSRMLS_DC) /* {{{ */ { char *ext; phar_mime_type *mime; ext = strrchr(file, '.'); if (!ext) { *mime_type = "text/plain"; /* no file extension = assume text/plain */ return PHAR_MIME_OTHER; } ++ext; if (SUCCESS != zend_hash_find(mimes,...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,516
static void phar_mkdir(phar_archive_data **pphar, char *dirname, int dirname_len TSRMLS_DC) { char *error; phar_entry_data *data; if (!(data = phar_get_or_create_entry_data((*pphar)->fname, (*pphar)->fname_len, dirname, dirname_len, "w+b", 2, &error, 1 TSRMLS_CC))) { if (error) { zend_throw_exception_ex(spl_ce...
DoS
0
static void phar_mkdir(phar_archive_data **pphar, char *dirname, int dirname_len TSRMLS_DC) { char *error; phar_entry_data *data; if (!(data = phar_get_or_create_entry_data((*pphar)->fname, (*pphar)->fname_len, dirname, dirname_len, "w+b", 2, &error, 1 TSRMLS_CC))) { if (error) { zend_throw_exception_ex(spl_ce...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,517
static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char *basename, int request_uri_len TSRMLS_DC) /* {{{ */ { HashTable *_SERVER; zval **stuff; char *path_info; int basename_len = strlen(basename); int code; zval *temp; /* "tweak" $_SERVER variables requested in earlier call to Phar::mun...
DoS
0
static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char *basename, int request_uri_len TSRMLS_DC) /* {{{ */ { HashTable *_SERVER; zval **stuff; char *path_info; int basename_len = strlen(basename); int code; zval *temp; /* "tweak" $_SERVER variables requested in earlier call to Phar::mun...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,518
void phar_object_init(TSRMLS_D) /* {{{ */ { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "PharException", phar_exception_methods); phar_ce_PharException = zend_register_internal_class_ex(&ce, phar_exception_get_default(), NULL TSRMLS_CC); #if HAVE_SPL INIT_CLASS_ENTRY(ce, "Phar", php_archive_methods); phar_ce_arch...
DoS
0
void phar_object_init(TSRMLS_D) /* {{{ */ { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "PharException", phar_exception_methods); phar_ce_PharException = zend_register_internal_class_ex(&ce, phar_exception_get_default(), NULL TSRMLS_CC); #if HAVE_SPL INIT_CLASS_ENTRY(ce, "Phar", php_archive_methods); phar_ce_arch...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,519
static void phar_postprocess_ru_web(char *fname, int fname_len, char **entry, int *entry_len, char **ru, int *ru_len TSRMLS_DC) /* {{{ */ { char *e = *entry + 1, *u = NULL, *u1 = NULL, *saveu = NULL; int e_len = *entry_len - 1, u_len = 0; phar_archive_data **pphar = NULL; /* we already know we can retrieve the pha...
DoS
0
static void phar_postprocess_ru_web(char *fname, int fname_len, char **entry, int *entry_len, char **ru, int *ru_len TSRMLS_DC) /* {{{ */ { char *e = *entry + 1, *u = NULL, *u1 = NULL, *saveu = NULL; int e_len = *entry_len - 1, u_len = 0; phar_archive_data **pphar = NULL; /* we already know we can retrieve the pha...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,520
static int phar_set_compression(void *pDest, void *argument TSRMLS_DC) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)pDest; php_uint32 compress = *(php_uint32 *)argument; if (entry->is_deleted) { return ZEND_HASH_APPLY_KEEP; } entry->old_flags = entry->flags; entry->flags &= ~PHAR_ENT_COMPRESSION_MA...
DoS
0
static int phar_set_compression(void *pDest, void *argument TSRMLS_DC) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)pDest; php_uint32 compress = *(php_uint32 *)argument; if (entry->is_deleted) { return ZEND_HASH_APPLY_KEEP; } entry->old_flags = entry->flags; entry->flags &= ~PHAR_ENT_COMPRESSION_MA...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,521
static void phar_spl_foreign_clone(spl_filesystem_object *src, spl_filesystem_object *dst TSRMLS_DC) /* {{{ */ { phar_archive_data *phar_data = (phar_archive_data *) dst->oth; if (!phar_data->is_persistent) { ++(phar_data->refcount); } } /* }}} */
DoS
0
static void phar_spl_foreign_clone(spl_filesystem_object *src, spl_filesystem_object *dst TSRMLS_DC) /* {{{ */ { phar_archive_data *phar_data = (phar_archive_data *) dst->oth; if (!phar_data->is_persistent) { ++(phar_data->refcount); } } /* }}} */
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,522
static void phar_spl_foreign_dtor(spl_filesystem_object *object TSRMLS_DC) /* {{{ */ { phar_archive_data *phar = (phar_archive_data *) object->oth; if (!phar->is_persistent) { phar_archive_delref(phar TSRMLS_CC); } object->oth = NULL; } /* }}} */
DoS
0
static void phar_spl_foreign_dtor(spl_filesystem_object *object TSRMLS_DC) /* {{{ */ { phar_archive_data *phar = (phar_archive_data *) object->oth; if (!phar->is_persistent) { phar_archive_delref(phar TSRMLS_CC); } object->oth = NULL; } /* }}} */
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,523
static int phar_test_compression(void *pDest, void *argument TSRMLS_DC) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)pDest; if (entry->is_deleted) { return ZEND_HASH_APPLY_KEEP; } if (!PHAR_G(has_bz2)) { if (entry->flags & PHAR_ENT_COMPRESSED_BZ2) { *(int *) argument = 0; } } if (!PHAR_G(ha...
DoS
0
static int phar_test_compression(void *pDest, void *argument TSRMLS_DC) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)pDest; if (entry->is_deleted) { return ZEND_HASH_APPLY_KEEP; } if (!PHAR_G(has_bz2)) { if (entry->flags & PHAR_ENT_COMPRESSED_BZ2) { *(int *) argument = 0; } } if (!PHAR_G(ha...
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,524
static int pharobj_cancompress(HashTable *manifest TSRMLS_DC) /* {{{ */ { int test; test = 1; zend_hash_apply_with_argument(manifest, phar_test_compression, &test TSRMLS_CC); return test; } /* }}} */
DoS
0
static int pharobj_cancompress(HashTable *manifest TSRMLS_DC) /* {{{ */ { int test; test = 1; zend_hash_apply_with_argument(manifest, phar_test_compression, &test TSRMLS_CC); return test; } /* }}} */
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,525
static void pharobj_set_compression(HashTable *manifest, php_uint32 compress TSRMLS_DC) /* {{{ */ { zend_hash_apply_with_argument(manifest, phar_set_compression, &compress TSRMLS_CC); } /* }}} */
DoS
0
static void pharobj_set_compression(HashTable *manifest, php_uint32 compress TSRMLS_DC) /* {{{ */ { zend_hash_apply_with_argument(manifest, phar_set_compression, &compress TSRMLS_CC); } /* }}} */
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c } its_ok: if (SUCCESS == php_stream_stat_path(newpath, &ssb)) { - efree(oldpath); zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists ...
null
null
null
3,526
gst_tag_from_vorbis_tag (const gchar * vorbis_tag) { int i = 0; gchar *real_vorbis_tag; g_return_val_if_fail (vorbis_tag != NULL, NULL); gst_tag_register_musicbrainz_tags (); real_vorbis_tag = g_ascii_strup (vorbis_tag, -1); while (tag_matches[i].gstreamer_tag != NULL) { if (strcmp (real_vorbis_tag, ...
Exec Code Overflow
0
gst_tag_from_vorbis_tag (const gchar * vorbis_tag) { int i = 0; gchar *real_vorbis_tag; g_return_val_if_fail (vorbis_tag != NULL, NULL); gst_tag_register_musicbrainz_tags (); real_vorbis_tag = g_ascii_strup (vorbis_tag, -1); while (tag_matches[i].gstreamer_tag != NULL) { if (strcmp (real_vorbis_tag, ...
@@ -305,30 +305,32 @@ gst_vorbis_tag_add (GstTagList * list, const gchar * tag, const gchar * value) } static void -gst_vorbis_tag_add_coverart (GstTagList * tags, const gchar * img_data_base64, +gst_vorbis_tag_add_coverart (GstTagList * tags, gchar * img_data_base64, gint base64_len) { GstBuffer *img; - ...
CWE-189
null
null
3,527
gst_tag_to_vorbis_tag (const gchar * gst_tag) { int i = 0; g_return_val_if_fail (gst_tag != NULL, NULL); gst_tag_register_musicbrainz_tags (); while (tag_matches[i].gstreamer_tag != NULL) { if (strcmp (gst_tag, tag_matches[i].gstreamer_tag) == 0) { return tag_matches[i].original_tag; } i++;...
Exec Code Overflow
0
gst_tag_to_vorbis_tag (const gchar * gst_tag) { int i = 0; g_return_val_if_fail (gst_tag != NULL, NULL); gst_tag_register_musicbrainz_tags (); while (tag_matches[i].gstreamer_tag != NULL) { if (strcmp (gst_tag, tag_matches[i].gstreamer_tag) == 0) { return tag_matches[i].original_tag; } i++;...
@@ -305,30 +305,32 @@ gst_vorbis_tag_add (GstTagList * list, const gchar * tag, const gchar * value) } static void -gst_vorbis_tag_add_coverart (GstTagList * tags, const gchar * img_data_base64, +gst_vorbis_tag_add_coverart (GstTagList * tags, gchar * img_data_base64, gint base64_len) { GstBuffer *img; - ...
CWE-189
null
null
3,528
PHP_GINIT_FUNCTION(phar) /* {{{ */ { phar_mime_type mime; memset(phar_globals, 0, sizeof(zend_phar_globals)); phar_globals->readonly = 1; zend_hash_init(&phar_globals->mime_types, 0, NULL, NULL, 1); #define PHAR_SET_MIME(mimetype, ret, fileext) \ mime.mime = mimetype; \ mime.len = sizeof((mimetype))+1; \ m...
null
0
PHP_GINIT_FUNCTION(phar) /* {{{ */ { phar_mime_type mime; memset(phar_globals, 0, sizeof(zend_phar_globals)); phar_globals->readonly = 1; zend_hash_init(&phar_globals->mime_types, 0, NULL, NULL, 1); #define PHAR_SET_MIME(mimetype, ret, fileext) \ mime.mime = mimetype; \ mime.len = sizeof((mimetype))+1; \ m...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,529
PHP_GSHUTDOWN_FUNCTION(phar) /* {{{ */ { zend_hash_destroy(&phar_globals->mime_types); } /* }}} */
null
0
PHP_GSHUTDOWN_FUNCTION(phar) /* {{{ */ { zend_hash_destroy(&phar_globals->mime_types); } /* }}} */
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,530
PHP_MINFO_FUNCTION(phar) /* {{{ */ { phar_request_initialize(TSRMLS_C); php_info_print_table_start(); php_info_print_table_header(2, "Phar: PHP Archive support", "enabled"); php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION); php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION); ph...
null
0
PHP_MINFO_FUNCTION(phar) /* {{{ */ { phar_request_initialize(TSRMLS_C); php_info_print_table_start(); php_info_print_table_header(2, "Phar: PHP Archive support", "enabled"); php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION); php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION); ph...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,531
PHP_MSHUTDOWN_FUNCTION(phar) /* {{{ */ { php_unregister_url_stream_wrapper("phar" TSRMLS_CC); phar_intercept_functions_shutdown(TSRMLS_C); if (zend_compile_file == phar_compile_file) { zend_compile_file = phar_orig_compile_file; } if (PHAR_G(manifest_cached)) { zend_hash_destroy(&(cached_phars)); zend_has...
null
0
PHP_MSHUTDOWN_FUNCTION(phar) /* {{{ */ { php_unregister_url_stream_wrapper("phar" TSRMLS_CC); phar_intercept_functions_shutdown(TSRMLS_C); if (zend_compile_file == phar_compile_file) { zend_compile_file = phar_orig_compile_file; } if (PHAR_G(manifest_cached)) { zend_hash_destroy(&(cached_phars)); zend_has...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,532
PHP_RSHUTDOWN_FUNCTION(phar) /* {{{ */ { int i; PHAR_GLOBALS->request_ends = 1; if (PHAR_GLOBALS->request_init) { phar_release_functions(TSRMLS_C); zend_hash_destroy(&(PHAR_GLOBALS->phar_alias_map)); PHAR_GLOBALS->phar_alias_map.arBuckets = NULL; zend_hash_destroy(&(PHAR_GLOBALS->phar_fname_map)); PHAR_...
null
0
PHP_RSHUTDOWN_FUNCTION(phar) /* {{{ */ { int i; PHAR_GLOBALS->request_ends = 1; if (PHAR_GLOBALS->request_init) { phar_release_functions(TSRMLS_C); zend_hash_destroy(&(PHAR_GLOBALS->phar_alias_map)); PHAR_GLOBALS->phar_alias_map.arBuckets = NULL; zend_hash_destroy(&(PHAR_GLOBALS->phar_fname_map)); PHAR_...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,533
ZEND_INI_MH(phar_ini_modify_handler) /* {{{ */ { zend_bool old, ini; if (entry->name_length == 14) { old = PHAR_G(readonly_orig); } else { old = PHAR_G(require_hash_orig); } if (new_value_length == 2 && !strcasecmp("on", new_value)) { ini = (zend_bool) 1; } else if (new_value_length == 3 && !strcasecmp("...
null
0
ZEND_INI_MH(phar_ini_modify_handler) /* {{{ */ { zend_bool old, ini; if (entry->name_length == 14) { old = PHAR_G(readonly_orig); } else { old = PHAR_G(require_hash_orig); } if (new_value_length == 2 && !strcasecmp("on", new_value)) { ini = (zend_bool) 1; } else if (new_value_length == 3 && !strcasecmp("...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,534
static void destroy_phar_data(void *pDest) /* {{{ */ { phar_archive_data *phar_data = *(phar_archive_data **) pDest; TSRMLS_FETCH(); if (PHAR_GLOBALS->request_ends) { /* first, iterate over the manifest and close all PHAR_TMP entry fp handles, this prevents unnecessary unfreed stream resources */ zend_hash_ap...
null
0
static void destroy_phar_data(void *pDest) /* {{{ */ { phar_archive_data *phar_data = *(phar_archive_data **) pDest; TSRMLS_FETCH(); if (PHAR_GLOBALS->request_ends) { /* first, iterate over the manifest and close all PHAR_TMP entry fp handles, this prevents unnecessary unfreed stream resources */ zend_hash_ap...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,535
static void destroy_phar_data_only(void *pDest) /* {{{ */ { phar_archive_data *phar_data = *(phar_archive_data **) pDest; TSRMLS_FETCH(); if (EG(exception) || --phar_data->refcount < 0) { phar_destroy_phar_data(phar_data TSRMLS_CC); } } /* }}}*/
null
0
static void destroy_phar_data_only(void *pDest) /* {{{ */ { phar_archive_data *phar_data = *(phar_archive_data **) pDest; TSRMLS_FETCH(); if (EG(exception) || --phar_data->refcount < 0) { phar_destroy_phar_data(phar_data TSRMLS_CC); } } /* }}}*/
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,536
void destroy_phar_manifest_entry(void *pDest) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)pDest; TSRMLS_FETCH(); if (entry->cfp) { php_stream_close(entry->cfp); entry->cfp = 0; } if (entry->fp) { php_stream_close(entry->fp); entry->fp = 0; } if (entry->metadata) { if (entry->is_persisten...
null
0
void destroy_phar_manifest_entry(void *pDest) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)pDest; TSRMLS_FETCH(); if (entry->cfp) { php_stream_close(entry->cfp); entry->cfp = 0; } if (entry->fp) { php_stream_close(entry->fp); entry->fp = 0; } if (entry->metadata) { if (entry->is_persisten...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,537
static int phar_analyze_path(const char *fname, const char *ext, int ext_len, int for_create TSRMLS_DC) /* {{{ */ { php_stream_statbuf ssb; char *realpath; char *filename = estrndup(fname, (ext - fname) + ext_len); if ((realpath = expand_filepath(filename, NULL TSRMLS_CC))) { #ifdef PHP_WIN32 phar_unixify_path_s...
null
0
static int phar_analyze_path(const char *fname, const char *ext, int ext_len, int for_create TSRMLS_DC) /* {{{ */ { php_stream_statbuf ssb; char *realpath; char *filename = estrndup(fname, (ext - fname) + ext_len); if ((realpath = expand_filepath(filename, NULL TSRMLS_CC))) { #ifdef PHP_WIN32 phar_unixify_path_s...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,538
int phar_archive_delref(phar_archive_data *phar TSRMLS_DC) /* {{{ */ { if (phar->is_persistent) { return 0; } if (--phar->refcount < 0) { if (PHAR_GLOBALS->request_done || zend_hash_del(&(PHAR_GLOBALS->phar_fname_map), phar->fname, phar->fname_len) != SUCCESS) { phar_destroy_phar_data(phar TSRMLS_CC); } ...
null
0
int phar_archive_delref(phar_archive_data *phar TSRMLS_DC) /* {{{ */ { if (phar->is_persistent) { return 0; } if (--phar->refcount < 0) { if (PHAR_GLOBALS->request_done || zend_hash_del(&(PHAR_GLOBALS->phar_fname_map), phar->fname, phar->fname_len) != SUCCESS) { phar_destroy_phar_data(phar TSRMLS_CC); } ...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,539
static int phar_check_str(const char *fname, const char *ext_str, int ext_len, int executable, int for_create TSRMLS_DC) /* {{{ */ { char test[51]; const char *pos; if (ext_len >= 50) { return FAILURE; } if (executable == 1) { /* copy "." as well */ memcpy(test, ext_str - 1, ext_len + 1); test[ext_len + ...
null
0
static int phar_check_str(const char *fname, const char *ext_str, int ext_len, int executable, int for_create TSRMLS_DC) /* {{{ */ { char test[51]; const char *pos; if (ext_len >= 50) { return FAILURE; } if (executable == 1) { /* copy "." as well */ memcpy(test, ext_str - 1, ext_len + 1); test[ext_len + ...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,540
static zend_op_array *phar_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC) /* {{{ */ { zend_op_array *res; char *name = NULL; int failed; phar_archive_data *phar; if (!file_handle || !file_handle->filename) { return phar_orig_compile_file(file_handle, type TSRMLS_CC); } if (strstr(file_handle-...
null
0
static zend_op_array *phar_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC) /* {{{ */ { zend_op_array *res; char *name = NULL; int failed; phar_archive_data *phar; if (!file_handle || !file_handle->filename) { return phar_orig_compile_file(file_handle, type TSRMLS_CC); } if (strstr(file_handle-...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,541
char *phar_create_default_stub(const char *index_php, const char *web_index, size_t *len, char **error TSRMLS_DC) /* {{{ */ { char *stub = NULL; int index_len, web_len; size_t dummy; if (!len) { len = &dummy; } if (error) { *error = NULL; } if (!index_php) { index_php = "index.php"; } if (!web_index...
null
0
char *phar_create_default_stub(const char *index_php, const char *web_index, size_t *len, char **error TSRMLS_DC) /* {{{ */ { char *stub = NULL; int index_len, web_len; size_t dummy; if (!len) { len = &dummy; } if (error) { *error = NULL; } if (!index_php) { index_php = "index.php"; } if (!web_index...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,542
int phar_create_or_parse_filename(char *fname, int fname_len, char *alias, int alias_len, int is_data, int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */ { phar_archive_data *mydata; php_stream *fp; char *actual = NULL, *p; if (!pphar) { pphar = &mydata; } #if PHP_API_VERSION < 20100412 ...
null
0
int phar_create_or_parse_filename(char *fname, int fname_len, char *alias, int alias_len, int is_data, int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */ { phar_archive_data *mydata; php_stream *fp; char *actual = NULL, *p; if (!pphar) { pphar = &mydata; } #if PHP_API_VERSION < 20100412 ...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,543
void phar_destroy_phar_data(phar_archive_data *phar TSRMLS_DC) /* {{{ */ { if (phar->alias && phar->alias != phar->fname) { pefree(phar->alias, phar->is_persistent); phar->alias = NULL; } if (phar->fname) { pefree(phar->fname, phar->is_persistent); phar->fname = NULL; } if (phar->signature) { pefree(ph...
null
0
void phar_destroy_phar_data(phar_archive_data *phar TSRMLS_DC) /* {{{ */ { if (phar->alias && phar->alias != phar->fname) { pefree(phar->alias, phar->is_persistent); phar->alias = NULL; } if (phar->fname) { pefree(phar->fname, phar->is_persistent); phar->fname = NULL; } if (phar->signature) { pefree(ph...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,544
int phar_detect_phar_fname_ext(const char *filename, int filename_len, const char **ext_str, int *ext_len, int executable, int for_create, int is_complete TSRMLS_DC) /* {{{ */ { const char *pos, *slash; *ext_str = NULL; *ext_len = 0; if (!filename_len || filename_len == 1) { return FAILURE; } phar_request_in...
null
0
int phar_detect_phar_fname_ext(const char *filename, int filename_len, const char **ext_str, int *ext_len, int executable, int for_create, int is_complete TSRMLS_DC) /* {{{ */ { const char *pos, *slash; *ext_str = NULL; *ext_len = 0; if (!filename_len || filename_len == 1) { return FAILURE; } phar_request_in...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,545
int phar_entry_delref(phar_entry_data *idata TSRMLS_DC) /* {{{ */ { int ret = 0; if (idata->internal_file && !idata->internal_file->is_persistent) { if (--idata->internal_file->fp_refcount < 0) { idata->internal_file->fp_refcount = 0; } if (idata->fp && idata->fp != idata->phar->fp && idata->fp != idata->p...
null
0
int phar_entry_delref(phar_entry_data *idata TSRMLS_DC) /* {{{ */ { int ret = 0; if (idata->internal_file && !idata->internal_file->is_persistent) { if (--idata->internal_file->fp_refcount < 0) { idata->internal_file->fp_refcount = 0; } if (idata->fp && idata->fp != idata->phar->fp && idata->fp != idata->p...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,546
void phar_entry_remove(phar_entry_data *idata, char **error TSRMLS_DC) /* {{{ */ { phar_archive_data *phar; phar = idata->phar; if (idata->internal_file->fp_refcount < 2) { if (idata->fp && idata->fp != idata->phar->fp && idata->fp != idata->phar->ufp && idata->fp != idata->internal_file->fp) { php_stream_clo...
null
0
void phar_entry_remove(phar_entry_data *idata, char **error TSRMLS_DC) /* {{{ */ { phar_archive_data *phar; phar = idata->phar; if (idata->internal_file->fp_refcount < 2) { if (idata->fp && idata->fp != idata->phar->fp && idata->fp != idata->phar->ufp && idata->fp != idata->internal_file->fp) { php_stream_clo...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,547
char *phar_fix_filepath(char *path, int *new_len, int use_cwd TSRMLS_DC) /* {{{ */ { char *newpath; int newpath_len; char *ptr; char *tok; int ptr_length, path_length = *new_len; if (PHAR_G(cwd_len) && use_cwd && path_length > 2 && path[0] == '.' && path[1] == '/') { newpath_len = PHAR_G(cwd_len); newpath = ...
null
0
char *phar_fix_filepath(char *path, int *new_len, int use_cwd TSRMLS_DC) /* {{{ */ { char *newpath; int newpath_len; char *ptr; char *tok; int ptr_length, path_length = *new_len; if (PHAR_G(cwd_len) && use_cwd && path_length > 2 && path[0] == '.' && path[1] == '/') { newpath_len = PHAR_G(cwd_len); newpath = ...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,548
int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert, char **error TSRMLS_DC) /* {{{ */ { char halt_stub[] = "__HALT_COMPILER();"; char *newstub, *tmp; phar_entry_info *entry, *newentry; int halt_offset, restore_alias_len, global_flags = 0, closeoldfile; char *pos, has_dirs = 0; char man...
null
0
int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert, char **error TSRMLS_DC) /* {{{ */ { char halt_stub[] = "__HALT_COMPILER();"; char *newstub, *tmp; phar_entry_info *entry, *newentry; int halt_offset, restore_alias_len, global_flags = 0, closeoldfile; char *pos, has_dirs = 0; char man...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,549
static int phar_flush_clean_deleted_apply(void *data TSRMLS_DC) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)data; if (entry->fp_refcount <= 0 && entry->is_deleted) { return ZEND_HASH_APPLY_REMOVE; } else { return ZEND_HASH_APPLY_KEEP; } } /* }}} */
null
0
static int phar_flush_clean_deleted_apply(void *data TSRMLS_DC) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)data; if (entry->fp_refcount <= 0 && entry->is_deleted) { return ZEND_HASH_APPLY_REMOVE; } else { return ZEND_HASH_APPLY_KEEP; } } /* }}} */
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,550
int phar_open_from_filename(char *fname, int fname_len, char *alias, int alias_len, int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */ { php_stream *fp; char *actual; int ret, is_data = 0; if (error) { *error = NULL; } if (!strstr(fname, ".phar")) { is_data = 1; } if (phar_open_par...
null
0
int phar_open_from_filename(char *fname, int fname_len, char *alias, int alias_len, int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */ { php_stream *fp; char *actual; int ret, is_data = 0; if (error) { *error = NULL; } if (!strstr(fname, ".phar")) { is_data = 1; } if (phar_open_par...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,551
static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, int options, phar_archive_data** pphar, int is_data, char **error TSRMLS_DC) /* {{{ */ { const char token[] = "__HALT_COMPILER();"; const char zip_magic[] = "PK\x03\x04"; const char gz_magic[] = "\x1f\x8b\x08"; cons...
null
0
static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, int options, phar_archive_data** pphar, int is_data, char **error TSRMLS_DC) /* {{{ */ { const char token[] = "__HALT_COMPILER();"; const char zip_magic[] = "PK\x03\x04"; const char gz_magic[] = "\x1f\x8b\x08"; cons...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,552
int phar_open_or_create_filename(char *fname, int fname_len, char *alias, int alias_len, int is_data, int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */ { const char *ext_str, *z; char *my_error; int ext_len; phar_archive_data **test, *unused = NULL; test = &unused; if (error) { *error ...
null
0
int phar_open_or_create_filename(char *fname, int fname_len, char *alias, int alias_len, int is_data, int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */ { const char *ext_str, *z; char *my_error; int ext_len; phar_archive_data **test, *unused = NULL; test = &unused; if (error) { *error ...
@@ -1054,7 +1054,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.is_persistent = mydata->is_persistent; for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) { - if (buffer + 24 > endbuffer) { + if (buffer + 2...
CWE-125
null
null
3,553
static const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1) { return M_ASN1_STRING_data(asn1); }
null
0
static const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1) { return M_ASN1_STRING_data(asn1); }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,554
static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) { *pub_key = dh->pub_key; *priv_key = dh->priv_key; }
null
0
static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) { *pub_key = dh->pub_key; *priv_key = dh->priv_key; }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,555
static int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { dh->pub_key = pub_key; dh->priv_key = priv_key; return 1; }
null
0
static int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { dh->pub_key = pub_key; dh->priv_key = priv_key; return 1; }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,556
static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) { dh->p = p; dh->q = q; dh->g = g; return 1; }
null
0
static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) { dh->p = p; dh->q = q; dh->g = g; return 1; }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,557
static void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) { *pub_key = d->pub_key; *priv_key = d->priv_key; }
null
0
static void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) { *pub_key = d->pub_key; *priv_key = d->priv_key; }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,558
static void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) { *p = d->p; *q = d->q; *g = d->g; }
null
0
static void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) { *p = d->p; *q = d->q; *g = d->g; }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,559
int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) { d->pub_key = pub_key; d->priv_key = priv_key; return 1; }
null
0
int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) { d->pub_key = pub_key; d->priv_key = priv_key; return 1; }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,560
int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) { d->p = p; d->q = q; d->g = g; return 1; }
null
0
int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) { d->p = p; d->q = q; d->g = g; return 1; }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,561
int EVP_PKEY_base_id(const EVP_PKEY *pkey) { return EVP_PKEY_type(pkey->type); }
null
0
int EVP_PKEY_base_id(const EVP_PKEY *pkey) { return EVP_PKEY_type(pkey->type); }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,562
PHP_FUNCTION(openssl_x509_export_to_file) { X509 * cert; zval * zcert; zend_bool notext = 1; BIO * bio_out; zend_resource *certresource; char * filename; size_t filename_len; if (zend_parse_parameters(ZEND_NUM_ARGS(), "zp|b", &zcert, &filename, &filename_len, &notext) == FAILURE) { return; } RETVAL_FALSE; ...
null
0
PHP_FUNCTION(openssl_x509_export_to_file) { X509 * cert; zval * zcert; zend_bool notext = 1; BIO * bio_out; zend_resource *certresource; char * filename; size_t filename_len; if (zend_parse_parameters(ZEND_NUM_ARGS(), "zp|b", &zcert, &filename, &filename_len, &notext) == FAILURE) { return; } RETVAL_FALSE; ...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,563
PHP_FUNCTION(openssl_spki_new) { size_t challenge_len; char * challenge = NULL, * spkstr = NULL; zend_string * s = NULL; zend_resource *keyresource = NULL; const char *spkac = "SPKAC="; zend_long algo = OPENSSL_ALGO_MD5; zval *method = NULL; zval * zpkey = NULL; EVP_PKEY * pkey = NULL; NETSCAPE_SPKI *spki=NU...
null
0
PHP_FUNCTION(openssl_spki_new) { size_t challenge_len; char * challenge = NULL, * spkstr = NULL; zend_string * s = NULL; zend_resource *keyresource = NULL; const char *spkac = "SPKAC="; zend_long algo = OPENSSL_ALGO_MD5; zval *method = NULL; zval * zpkey = NULL; EVP_PKEY * pkey = NULL; NETSCAPE_SPKI *spki=NU...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,564
PHP_FUNCTION(openssl_spki_export_challenge) { size_t spkstr_len; char *spkstr = NULL, * spkstr_cleaned = NULL; int spkstr_cleaned_len; NETSCAPE_SPKI *spki = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &spkstr, &spkstr_len) == FAILURE) { return; } RETVAL_FALSE; if (spkstr == NULL) { php_error_do...
null
0
PHP_FUNCTION(openssl_spki_export_challenge) { size_t spkstr_len; char *spkstr = NULL, * spkstr_cleaned = NULL; int spkstr_cleaned_len; NETSCAPE_SPKI *spki = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &spkstr, &spkstr_len) == FAILURE) { return; } RETVAL_FALSE; if (spkstr == NULL) { php_error_do...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,565
PHP_FUNCTION(openssl_x509_fingerprint) { X509 *cert; zval *zcert; zend_resource *certresource; zend_bool raw_output = 0; char *method = "sha1"; size_t method_len; zend_string *fingerprint; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|sb", &zcert, &method, &method_len, &raw_output) == FAILURE) { return; } ...
null
0
PHP_FUNCTION(openssl_x509_fingerprint) { X509 *cert; zval *zcert; zend_resource *certresource; zend_bool raw_output = 0; char *method = "sha1"; size_t method_len; zend_string *fingerprint; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|sb", &zcert, &method, &method_len, &raw_output) == FAILURE) { return; } ...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,566
PHP_FUNCTION(openssl_x509_check_private_key) { zval * zcert, *zkey; X509 * cert = NULL; EVP_PKEY * key = NULL; zend_resource *certresource = NULL, *keyresource = NULL; RETVAL_FALSE; if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &zcert, &zkey) == FAILURE) { return; } cert = php_openssl_x509_from_zval(zcer...
null
0
PHP_FUNCTION(openssl_x509_check_private_key) { zval * zcert, *zkey; X509 * cert = NULL; EVP_PKEY * key = NULL; zend_resource *certresource = NULL, *keyresource = NULL; RETVAL_FALSE; if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &zcert, &zkey) == FAILURE) { return; } cert = php_openssl_x509_from_zval(zcer...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,567
PHP_FUNCTION(openssl_x509_parse) { zval * zcert; X509 * cert = NULL; zend_resource *certresource = NULL; int i, sig_nid; zend_bool useshortnames = 1; char * tmpstr; zval subitem; X509_EXTENSION *extension; X509_NAME *subject_name; char *cert_name; char *extname; BIO *bio_out; BUF_MEM *bio_buf; ASN1_INTEGE...
null
0
PHP_FUNCTION(openssl_x509_parse) { zval * zcert; X509 * cert = NULL; zend_resource *certresource = NULL; int i, sig_nid; zend_bool useshortnames = 1; char * tmpstr; zval subitem; X509_EXTENSION *extension; X509_NAME *subject_name; char *cert_name; char *extname; BIO *bio_out; BUF_MEM *bio_buf; ASN1_INTEGE...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,568
PHP_FUNCTION(openssl_x509_read) { zval *cert; X509 *x509; zend_resource *res; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &cert) == FAILURE) { return; } x509 = php_openssl_x509_from_zval(cert, 1, &res); ZVAL_RES(return_value, res); if (x509 == NULL) { php_error_docref(NULL, E_WARNING, "supplied parame...
null
0
PHP_FUNCTION(openssl_x509_read) { zval *cert; X509 *x509; zend_resource *res; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &cert) == FAILURE) { return; } x509 = php_openssl_x509_from_zval(cert, 1, &res); ZVAL_RES(return_value, res); if (x509 == NULL) { php_error_docref(NULL, E_WARNING, "supplied parame...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,569
PHP_FUNCTION(openssl_x509_free) { zval *x509; X509 *cert; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &x509) == FAILURE) { return; } if ((cert = (X509 *)zend_fetch_resource(Z_RES_P(x509), "OpenSSL X.509", le_x509)) == NULL) { RETURN_FALSE; } zend_list_close(Z_RES_P(x509)); }
null
0
PHP_FUNCTION(openssl_x509_free) { zval *x509; X509 *cert; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &x509) == FAILURE) { return; } if ((cert = (X509 *)zend_fetch_resource(Z_RES_P(x509), "OpenSSL X.509", le_x509)) == NULL) { RETURN_FALSE; } zend_list_close(Z_RES_P(x509)); }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,570
PHP_FUNCTION(openssl_pkcs12_export_to_file) { X509 * cert = NULL; BIO * bio_out = NULL; PKCS12 * p12 = NULL; char * filename; char * friendly_name = NULL; size_t filename_len; char * pass; size_t pass_len; zval *zcert = NULL, *zpkey = NULL, *args = NULL; EVP_PKEY *priv_key = NULL; zend_resource *certresource...
null
0
PHP_FUNCTION(openssl_pkcs12_export_to_file) { X509 * cert = NULL; BIO * bio_out = NULL; PKCS12 * p12 = NULL; char * filename; char * friendly_name = NULL; size_t filename_len; char * pass; size_t pass_len; zval *zcert = NULL, *zpkey = NULL, *args = NULL; EVP_PKEY *priv_key = NULL; zend_resource *certresource...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,571
PHP_FUNCTION(openssl_pkcs12_read) { zval *zout = NULL, zextracerts, zcert, zpkey; char *pass, *zp12; size_t pass_len, zp12_len; PKCS12 * p12 = NULL; EVP_PKEY * pkey = NULL; X509 * cert = NULL; STACK_OF(X509) * ca = NULL; BIO * bio_in = NULL; int i; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/s", &zp12, &z...
null
0
PHP_FUNCTION(openssl_pkcs12_read) { zval *zout = NULL, zextracerts, zcert, zpkey; char *pass, *zp12; size_t pass_len, zp12_len; PKCS12 * p12 = NULL; EVP_PKEY * pkey = NULL; X509 * cert = NULL; STACK_OF(X509) * ca = NULL; BIO * bio_in = NULL; int i; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/s", &zp12, &z...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,572
PHP_FUNCTION(openssl_csr_sign) { zval * zcert = NULL, *zcsr, *zpkey, *args = NULL; zend_long num_days; zend_long serial = Z_L(0); X509 * cert = NULL, *new_cert = NULL; X509_REQ * csr; EVP_PKEY * key = NULL, *priv_key = NULL; zend_resource *csr_resource, *certresource = NULL, *keyresource = NULL; int i; struct ...
null
0
PHP_FUNCTION(openssl_csr_sign) { zval * zcert = NULL, *zcsr, *zpkey, *args = NULL; zend_long num_days; zend_long serial = Z_L(0); X509 * cert = NULL, *new_cert = NULL; X509_REQ * csr; EVP_PKEY * key = NULL, *priv_key = NULL; zend_resource *csr_resource, *certresource = NULL, *keyresource = NULL; int i; struct ...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,573
PHP_FUNCTION(openssl_csr_new) { struct php_x509_request req; zval * args = NULL, * dn, *attribs = NULL; zval * out_pkey; X509_REQ * csr = NULL; int we_made_the_key = 1; zend_resource *key_resource; if (zend_parse_parameters(ZEND_NUM_ARGS(), "az/|a!a!", &dn, &out_pkey, &args, &attribs) == FAILURE) { return; }...
null
0
PHP_FUNCTION(openssl_csr_new) { struct php_x509_request req; zval * args = NULL, * dn, *attribs = NULL; zval * out_pkey; X509_REQ * csr = NULL; int we_made_the_key = 1; zend_resource *key_resource; if (zend_parse_parameters(ZEND_NUM_ARGS(), "az/|a!a!", &dn, &out_pkey, &args, &attribs) == FAILURE) { return; }...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,574
PHP_FUNCTION(openssl_csr_get_public_key) { zval * zcsr; zend_bool use_shortnames = 1; zend_resource *csr_resource; X509_REQ * csr; EVP_PKEY *tpubkey; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &zcsr, &use_shortnames) == FAILURE) { return; } csr = php_openssl_csr_from_zval(zcsr, 0, &csr_resource); ...
null
0
PHP_FUNCTION(openssl_csr_get_public_key) { zval * zcsr; zend_bool use_shortnames = 1; zend_resource *csr_resource; X509_REQ * csr; EVP_PKEY *tpubkey; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &zcsr, &use_shortnames) == FAILURE) { return; } csr = php_openssl_csr_from_zval(zcsr, 0, &csr_resource); ...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,575
PHP_FUNCTION(openssl_pkey_new) { struct php_x509_request req; zval * args = NULL; zval *data; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|a!", &args) == FAILURE) { return; } RETVAL_FALSE; if (args && Z_TYPE_P(args) == IS_ARRAY) { EVP_PKEY *pkey; if ((data = zend_hash_str_find(Z_ARRVAL_P(args), "rsa", s...
null
0
PHP_FUNCTION(openssl_pkey_new) { struct php_x509_request req; zval * args = NULL; zval *data; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|a!", &args) == FAILURE) { return; } RETVAL_FALSE; if (args && Z_TYPE_P(args) == IS_ARRAY) { EVP_PKEY *pkey; if ((data = zend_hash_str_find(Z_ARRVAL_P(args), "rsa", s...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,576
PHP_FUNCTION(openssl_pkey_export_to_file) { struct php_x509_request req; zval * zpkey, * args = NULL; char * passphrase = NULL; size_t passphrase_len = 0; char * filename = NULL; size_t filename_len = 0; zend_resource *key_resource = NULL; int pem_write = 0; EVP_PKEY * key; BIO * bio_out = NULL; const EVP_CI...
null
0
PHP_FUNCTION(openssl_pkey_export_to_file) { struct php_x509_request req; zval * zpkey, * args = NULL; char * passphrase = NULL; size_t passphrase_len = 0; char * filename = NULL; size_t filename_len = 0; zend_resource *key_resource = NULL; int pem_write = 0; EVP_PKEY * key; BIO * bio_out = NULL; const EVP_CI...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,577
PHP_FUNCTION(openssl_pkey_export) { struct php_x509_request req; zval * zpkey, * args = NULL, *out; char * passphrase = NULL; size_t passphrase_len = 0; int pem_write = 0; zend_resource *key_resource = NULL; EVP_PKEY * key; BIO * bio_out = NULL; const EVP_CIPHER * cipher; if (zend_parse_parameters(ZEND_NUM_AR...
null
0
PHP_FUNCTION(openssl_pkey_export) { struct php_x509_request req; zval * zpkey, * args = NULL, *out; char * passphrase = NULL; size_t passphrase_len = 0; int pem_write = 0; zend_resource *key_resource = NULL; EVP_PKEY * key; BIO * bio_out = NULL; const EVP_CIPHER * cipher; if (zend_parse_parameters(ZEND_NUM_AR...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,578
PHP_FUNCTION(openssl_pkey_free) { zval *key; EVP_PKEY *pkey; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &key) == FAILURE) { return; } if ((pkey = (EVP_PKEY *)zend_fetch_resource(Z_RES_P(key), "OpenSSL key", le_key)) == NULL) { RETURN_FALSE; } zend_list_close(Z_RES_P(key)); }
null
0
PHP_FUNCTION(openssl_pkey_free) { zval *key; EVP_PKEY *pkey; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &key) == FAILURE) { return; } if ((pkey = (EVP_PKEY *)zend_fetch_resource(Z_RES_P(key), "OpenSSL key", le_key)) == NULL) { RETURN_FALSE; } zend_list_close(Z_RES_P(key)); }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,579
PHP_FUNCTION(openssl_pkey_get_private) { zval *cert; EVP_PKEY *pkey; char * passphrase = ""; size_t passphrase_len = sizeof("")-1; zend_resource *res; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|s", &cert, &passphrase, &passphrase_len) == FAILURE) { return; } PHP_OPENSSL_CHECK_SIZE_T_TO_INT(passphrase_len...
null
0
PHP_FUNCTION(openssl_pkey_get_private) { zval *cert; EVP_PKEY *pkey; char * passphrase = ""; size_t passphrase_len = sizeof("")-1; zend_resource *res; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|s", &cert, &passphrase, &passphrase_len) == FAILURE) { return; } PHP_OPENSSL_CHECK_SIZE_T_TO_INT(passphrase_len...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,580
PHP_FUNCTION(openssl_pkey_get_details) { zval *key; EVP_PKEY *pkey; BIO *out; unsigned int pbio_len; char *pbio; zend_long ktype; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &key) == FAILURE) { return; } if ((pkey = (EVP_PKEY *)zend_fetch_resource(Z_RES_P(key), "OpenSSL key", le_key)) == NULL) { RETUR...
null
0
PHP_FUNCTION(openssl_pkey_get_details) { zval *key; EVP_PKEY *pkey; BIO *out; unsigned int pbio_len; char *pbio; zend_long ktype; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &key) == FAILURE) { return; } if ((pkey = (EVP_PKEY *)zend_fetch_resource(Z_RES_P(key), "OpenSSL key", le_key)) == NULL) { RETUR...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,581
PHP_FUNCTION(openssl_pbkdf2) { zend_long key_length = 0, iterations = 0; char *password; size_t password_len; char *salt; size_t salt_len; char *method; size_t method_len = 0; zend_string *out_buffer; const EVP_MD *digest; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssll|s", &password, &password_len, ...
null
0
PHP_FUNCTION(openssl_pbkdf2) { zend_long key_length = 0, iterations = 0; char *password; size_t password_len; char *salt; size_t salt_len; char *method; size_t method_len = 0; zend_string *out_buffer; const EVP_MD *digest; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssll|s", &password, &password_len, ...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,582
PHP_FUNCTION(openssl_pkcs7_encrypt) { zval * zrecipcerts, * zheaders = NULL; STACK_OF(X509) * recipcerts = NULL; BIO * infile = NULL, * outfile = NULL; zend_long flags = 0; PKCS7 * p7 = NULL; zval * zcertval; X509 * cert; const EVP_CIPHER *cipher = NULL; zend_long cipherid = PHP_OPENSSL_CIPHER_DEFAULT; zend_s...
null
0
PHP_FUNCTION(openssl_pkcs7_encrypt) { zval * zrecipcerts, * zheaders = NULL; STACK_OF(X509) * recipcerts = NULL; BIO * infile = NULL, * outfile = NULL; zend_long flags = 0; PKCS7 * p7 = NULL; zval * zcertval; X509 * cert; const EVP_CIPHER *cipher = NULL; zend_long cipherid = PHP_OPENSSL_CIPHER_DEFAULT; zend_s...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,583
PHP_FUNCTION(openssl_pkcs7_sign) { zval * zcert, * zprivkey, * zheaders; zval * hval; X509 * cert = NULL; EVP_PKEY * privkey = NULL; zend_long flags = PKCS7_DETACHED; PKCS7 * p7 = NULL; BIO * infile = NULL, * outfile = NULL; STACK_OF(X509) *others = NULL; zend_resource *certresource = NULL, *keyresource = NULL...
null
0
PHP_FUNCTION(openssl_pkcs7_sign) { zval * zcert, * zprivkey, * zheaders; zval * hval; X509 * cert = NULL; EVP_PKEY * privkey = NULL; zend_long flags = PKCS7_DETACHED; PKCS7 * p7 = NULL; BIO * infile = NULL, * outfile = NULL; STACK_OF(X509) *others = NULL; zend_resource *certresource = NULL, *keyresource = NULL...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,584
PHP_FUNCTION(openssl_pkcs7_decrypt) { zval * recipcert, * recipkey = NULL; X509 * cert = NULL; EVP_PKEY * key = NULL; zend_resource *certresval, *keyresval; BIO * in = NULL, * out = NULL, * datain = NULL; PKCS7 * p7 = NULL; char * infilename; size_t infilename_len; char * outfilename; size_t outfilename_len; ...
null
0
PHP_FUNCTION(openssl_pkcs7_decrypt) { zval * recipcert, * recipkey = NULL; X509 * cert = NULL; EVP_PKEY * key = NULL; zend_resource *certresval, *keyresval; BIO * in = NULL, * out = NULL, * datain = NULL; PKCS7 * p7 = NULL; char * infilename; size_t infilename_len; char * outfilename; size_t outfilename_len; ...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,585
PHP_FUNCTION(openssl_private_encrypt) { zval *key, *crypted; EVP_PKEY *pkey; int cryptedlen; zend_string *cryptedbuf = NULL; int successful = 0; zend_resource *keyresource = NULL; char * data; size_t data_len; zend_long padding = RSA_PKCS1_PADDING; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/z|l", &data, ...
null
0
PHP_FUNCTION(openssl_private_encrypt) { zval *key, *crypted; EVP_PKEY *pkey; int cryptedlen; zend_string *cryptedbuf = NULL; int successful = 0; zend_resource *keyresource = NULL; char * data; size_t data_len; zend_long padding = RSA_PKCS1_PADDING; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/z|l", &data, ...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,586
PHP_FUNCTION(openssl_private_decrypt) { zval *key, *crypted; EVP_PKEY *pkey; int cryptedlen; zend_string *cryptedbuf = NULL; unsigned char *crypttemp; int successful = 0; zend_long padding = RSA_PKCS1_PADDING; zend_resource *keyresource = NULL; char * data; size_t data_len; if (zend_parse_parameters(ZEND_NU...
null
0
PHP_FUNCTION(openssl_private_decrypt) { zval *key, *crypted; EVP_PKEY *pkey; int cryptedlen; zend_string *cryptedbuf = NULL; unsigned char *crypttemp; int successful = 0; zend_long padding = RSA_PKCS1_PADDING; zend_resource *keyresource = NULL; char * data; size_t data_len; if (zend_parse_parameters(ZEND_NU...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,587
PHP_FUNCTION(openssl_public_encrypt) { zval *key, *crypted; EVP_PKEY *pkey; int cryptedlen; zend_string *cryptedbuf; int successful = 0; zend_resource *keyresource = NULL; zend_long padding = RSA_PKCS1_PADDING; char * data; size_t data_len; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/z|l", &data, &data_le...
null
0
PHP_FUNCTION(openssl_public_encrypt) { zval *key, *crypted; EVP_PKEY *pkey; int cryptedlen; zend_string *cryptedbuf; int successful = 0; zend_resource *keyresource = NULL; zend_long padding = RSA_PKCS1_PADDING; char * data; size_t data_len; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/z|l", &data, &data_le...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,588
PHP_FUNCTION(openssl_public_decrypt) { zval *key, *crypted; EVP_PKEY *pkey; int cryptedlen; zend_string *cryptedbuf = NULL; unsigned char *crypttemp; int successful = 0; zend_resource *keyresource = NULL; zend_long padding = RSA_PKCS1_PADDING; char * data; size_t data_len; if (zend_parse_parameters(ZEND_NUM...
null
0
PHP_FUNCTION(openssl_public_decrypt) { zval *key, *crypted; EVP_PKEY *pkey; int cryptedlen; zend_string *cryptedbuf = NULL; unsigned char *crypttemp; int successful = 0; zend_resource *keyresource = NULL; zend_long padding = RSA_PKCS1_PADDING; char * data; size_t data_len; if (zend_parse_parameters(ZEND_NUM...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,589
PHP_FUNCTION(openssl_error_string) { char buf[512]; unsigned long val; if (zend_parse_parameters_none() == FAILURE) { return; } val = ERR_get_error(); if (val) { RETURN_STRING(ERR_error_string(val, buf)); } else { RETURN_FALSE; } }
null
0
PHP_FUNCTION(openssl_error_string) { char buf[512]; unsigned long val; if (zend_parse_parameters_none() == FAILURE) { return; } val = ERR_get_error(); if (val) { RETURN_STRING(ERR_error_string(val, buf)); } else { RETURN_FALSE; } }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,590
PHP_FUNCTION(openssl_open) { zval *privkey, *opendata; EVP_PKEY *pkey; int len1, len2, cipher_iv_len; unsigned char *buf, *iv_buf; zend_resource *keyresource = NULL; EVP_CIPHER_CTX *ctx; char * data; size_t data_len; char * ekey; size_t ekey_len; char *method = NULL, *iv = NULL; size_t method_len = 0, iv_le...
null
0
PHP_FUNCTION(openssl_open) { zval *privkey, *opendata; EVP_PKEY *pkey; int len1, len2, cipher_iv_len; unsigned char *buf, *iv_buf; zend_resource *keyresource = NULL; EVP_CIPHER_CTX *ctx; char * data; size_t data_len; char * ekey; size_t ekey_len; char *method = NULL, *iv = NULL; size_t method_len = 0, iv_le...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,591
PHP_FUNCTION(openssl_get_cipher_methods) { zend_bool aliases = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &aliases) == FAILURE) { return; } array_init(return_value); OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, aliases ? openssl_add_method_or_alias: openssl_add_method, return_value); }
null
0
PHP_FUNCTION(openssl_get_cipher_methods) { zend_bool aliases = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &aliases) == FAILURE) { return; } array_init(return_value); OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, aliases ? openssl_add_method_or_alias: openssl_add_method, return_value); }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,592
PHP_FUNCTION(openssl_digest) { zend_bool raw_output = 0; char *data, *method; size_t data_len, method_len; const EVP_MD *mdtype; EVP_MD_CTX *md_ctx; unsigned int siglen; zend_string *sigbuf; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &data, &data_len, &method, &method_len, &raw_output) == FAILURE) { ...
null
0
PHP_FUNCTION(openssl_digest) { zend_bool raw_output = 0; char *data, *method; size_t data_len, method_len; const EVP_MD *mdtype; EVP_MD_CTX *md_ctx; unsigned int siglen; zend_string *sigbuf; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &data, &data_len, &method, &method_len, &raw_output) == FAILURE) { ...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,593
PHP_FUNCTION(openssl_encrypt) { zend_long options = 0; char *data, *method, *password, *iv = ""; size_t data_len, method_len, password_len, iv_len = 0, max_iv_len; const EVP_CIPHER *cipher_type; EVP_CIPHER_CTX *cipher_ctx; int i=0, keylen; size_t outlen; zend_string *outbuf; unsigned char *key; zend_bool free...
null
0
PHP_FUNCTION(openssl_encrypt) { zend_long options = 0; char *data, *method, *password, *iv = ""; size_t data_len, method_len, password_len, iv_len = 0, max_iv_len; const EVP_CIPHER *cipher_type; EVP_CIPHER_CTX *cipher_ctx; int i=0, keylen; size_t outlen; zend_string *outbuf; unsigned char *key; zend_bool free...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,594
PHP_FUNCTION(openssl_cipher_iv_length) { char *method; size_t method_len; const EVP_CIPHER *cipher_type; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &method, &method_len) == FAILURE) { return; } if (!method_len) { php_error_docref(NULL, E_WARNING, "Unknown cipher algorithm"); RETURN_FALSE; } cipher...
null
0
PHP_FUNCTION(openssl_cipher_iv_length) { char *method; size_t method_len; const EVP_CIPHER *cipher_type; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &method, &method_len) == FAILURE) { return; } if (!method_len) { php_error_docref(NULL, E_WARNING, "Unknown cipher algorithm"); RETURN_FALSE; } cipher...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,595
PHP_FUNCTION(openssl_dh_compute_key) { zval *key; char *pub_str; size_t pub_len; DH *dh; EVP_PKEY *pkey; BIGNUM *pub; zend_string *data; int len; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sr", &pub_str, &pub_len, &key) == FAILURE) { return; } if ((pkey = (EVP_PKEY *)zend_fetch_resource(Z_RES_P(key), "Op...
null
0
PHP_FUNCTION(openssl_dh_compute_key) { zval *key; char *pub_str; size_t pub_len; DH *dh; EVP_PKEY *pkey; BIGNUM *pub; zend_string *data; int len; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sr", &pub_str, &pub_len, &key) == FAILURE) { return; } if ((pkey = (EVP_PKEY *)zend_fetch_resource(Z_RES_P(key), "Op...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,596
PHP_FUNCTION(openssl_random_pseudo_bytes) { zend_long buffer_length; zend_string *buffer = NULL; zval *zstrong_result_returned = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|z/", &buffer_length, &zstrong_result_returned) == FAILURE) { return; } if (zstrong_result_returned) { zval_dtor(zstrong_result_...
null
0
PHP_FUNCTION(openssl_random_pseudo_bytes) { zend_long buffer_length; zend_string *buffer = NULL; zval *zstrong_result_returned = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|z/", &buffer_length, &zstrong_result_returned) == FAILURE) { return; } if (zstrong_result_returned) { zval_dtor(zstrong_result_...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,597
PHP_MINFO_FUNCTION(openssl) { php_info_print_table_start(); php_info_print_table_row(2, "OpenSSL support", "enabled"); php_info_print_table_row(2, "OpenSSL Library Version", SSLeay_version(SSLEAY_VERSION)); php_info_print_table_row(2, "OpenSSL Header Version", OPENSSL_VERSION_TEXT); php_info_print_table_row(2, "Op...
null
0
PHP_MINFO_FUNCTION(openssl) { php_info_print_table_start(); php_info_print_table_row(2, "OpenSSL support", "enabled"); php_info_print_table_row(2, "OpenSSL Library Version", SSLeay_version(SSLEAY_VERSION)); php_info_print_table_row(2, "OpenSSL Header Version", OPENSSL_VERSION_TEXT); php_info_print_table_row(2, "Op...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,598
PHP_MINIT_FUNCTION(openssl) { char * config_filename; le_key = zend_register_list_destructors_ex(php_pkey_free, NULL, "OpenSSL key", module_number); le_x509 = zend_register_list_destructors_ex(php_x509_free, NULL, "OpenSSL X.509", module_number); le_csr = zend_register_list_destructors_ex(php_csr_free, NULL, "Open...
null
0
PHP_MINIT_FUNCTION(openssl) { char * config_filename; le_key = zend_register_list_destructors_ex(php_pkey_free, NULL, "OpenSSL key", module_number); le_x509 = zend_register_list_destructors_ex(php_x509_free, NULL, "OpenSSL X.509", module_number); le_csr = zend_register_list_destructors_ex(php_csr_free, NULL, "Open...
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null
3,599
static void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp) { *dmp1 = r->dmp1; *dmq1 = r->dmq1; *iqmp = r->iqmp; }
null
0
static void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp) { *dmp1 = r->dmp1; *dmq1 = r->dmq1; *iqmp = r->iqmp; }
@@ -5421,7 +5421,7 @@ PHP_FUNCTION(openssl_seal) buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx)); EVP_CIPHER_CTX_cleanup(ctx); - if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) || + if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 || ...
CWE-754
null
null