idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
12,300 | static PHP_FUNCTION(xmlwriter_start_dtd_element)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDElement, "Invalid Element Name");
}
| Bypass | 0 | static PHP_FUNCTION(xmlwriter_start_dtd_element)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDElement, "Invalid Element Name");
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,301 | static PHP_FUNCTION(xmlwriter_end_dtd_element)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDElement);
}
| Bypass | 0 | static PHP_FUNCTION(xmlwriter_end_dtd_element)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDElement);
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,302 | static PHP_FUNCTION(xmlwriter_write_dtd_element)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
char *name, *content;
int name_len, content_len, retval;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &conten... | Bypass | 0 | static PHP_FUNCTION(xmlwriter_write_dtd_element)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
char *name, *content;
int name_len, content_len, retval;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &conten... | @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,303 | static PHP_FUNCTION(xmlwriter_start_dtd_attlist)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDAttlist, "Invalid Element Name");
}
| Bypass | 0 | static PHP_FUNCTION(xmlwriter_start_dtd_attlist)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDAttlist, "Invalid Element Name");
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,304 | static PHP_FUNCTION(xmlwriter_end_dtd_attlist)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDAttlist);
}
| Bypass | 0 | static PHP_FUNCTION(xmlwriter_end_dtd_attlist)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDAttlist);
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,305 | static PHP_FUNCTION(xmlwriter_write_dtd_attlist)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
char *name, *content;
int name_len, content_len, retval;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss",
&name, &name_len, &c... | Bypass | 0 | static PHP_FUNCTION(xmlwriter_write_dtd_attlist)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
char *name, *content;
int name_len, content_len, retval;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss",
&name, &name_len, &c... | @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,306 | static PHP_FUNCTION(xmlwriter_end_dtd_entity)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDEntity);
}
| Bypass | 0 | static PHP_FUNCTION(xmlwriter_end_dtd_entity)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDEntity);
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,307 | static PHP_FUNCTION(xmlwriter_write_dtd_entity)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
char *name, *content;
int name_len, content_len, retval;
/* Optional parameters */
char *pubid = NULL, *sysid = NULL, *ndataid = NULL;
zend_bool pe = 0;
int pubid_len, sysid_len, ndataid_len;
#ifdef Z... | Bypass | 0 | static PHP_FUNCTION(xmlwriter_write_dtd_entity)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
char *name, *content;
int name_len, content_len, retval;
/* Optional parameters */
char *pubid = NULL, *sysid = NULL, *ndataid = NULL;
zend_bool pe = 0;
int pubid_len, sysid_len, ndataid_len;
#ifdef Z... | @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,308 | static PHP_FUNCTION(xmlwriter_output_memory)
{
php_xmlwriter_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
| Bypass | 0 | static PHP_FUNCTION(xmlwriter_output_memory)
{
php_xmlwriter_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,309 | static PHP_FUNCTION(xmlwriter_flush)
{
php_xmlwriter_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
| Bypass | 0 | static PHP_FUNCTION(xmlwriter_flush)
{
php_xmlwriter_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,310 | static PHP_MSHUTDOWN_FUNCTION(xmlwriter)
{
return SUCCESS;
}
| Bypass | 0 | static PHP_MSHUTDOWN_FUNCTION(xmlwriter)
{
return SUCCESS;
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,311 | static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len TSRMLS_DC) {
xmlURI *uri;
xmlChar *escsource;
char *file_dest;
int isFileUri = 0;
uri = xmlCreateURI();
escsource = xmlURIEscapeStr((xmlChar *)source, (xmlChar *) ":");
xmlParseURIReference(uri, (char *)escsour... | Bypass | 0 | static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len TSRMLS_DC) {
xmlURI *uri;
xmlChar *escsource;
char *file_dest;
int isFileUri = 0;
uri = xmlCreateURI();
escsource = xmlURIEscapeStr((xmlChar *)source, (xmlChar *) ":");
xmlParseURIReference(uri, (char *)escsour... | @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,312 | static void php_xmlwriter_end(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_int_t internal_function)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
int retval;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
XMLWRITER_FROM_OBJECT(intern, this);
if (zend_parse_parameters_none() == FAIL... | Bypass | 0 | static void php_xmlwriter_end(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_int_t internal_function)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
int retval;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
XMLWRITER_FROM_OBJECT(intern, this);
if (zend_parse_parameters_none() == FAIL... | @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,313 | static void php_xmlwriter_flush(INTERNAL_FUNCTION_PARAMETERS, int force_string) {
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
xmlBufferPtr buffer;
zend_bool empty = 1;
int output_bytes;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS... | Bypass | 0 | static void php_xmlwriter_flush(INTERNAL_FUNCTION_PARAMETERS, int force_string) {
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
xmlBufferPtr buffer;
zend_bool empty = 1;
int output_bytes;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS... | @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,314 | static int php_xmlwriter_streams_IO_close(void *context)
{
TSRMLS_FETCH();
return php_stream_close((php_stream*)context);
}
| Bypass | 0 | static int php_xmlwriter_streams_IO_close(void *context)
{
TSRMLS_FETCH();
return php_stream_close((php_stream*)context);
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,315 | static int php_xmlwriter_streams_IO_write(void *context, const char *buffer, int len)
{
TSRMLS_FETCH();
return php_stream_write((php_stream*)context, buffer, len);
}
| Bypass | 0 | static int php_xmlwriter_streams_IO_write(void *context, const char *buffer, int len)
{
TSRMLS_FETCH();
return php_stream_write((php_stream*)context, buffer, len);
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,316 | static void php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_one_char_t internal_function, char *err_string)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
char *name;
int name_len, retval;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
if (zend_parse_parameters... | Bypass | 0 | static void php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_one_char_t internal_function, char *err_string)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
char *name;
int name_len, retval;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
if (zend_parse_parameters... | @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,317 | static void xmlwriter_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) {
xmlwriter_object *intern;
intern = (xmlwriter_object *) rsrc->ptr;
xmlwriter_free_resource_ptr(intern TSRMLS_CC);
}
| Bypass | 0 | static void xmlwriter_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) {
xmlwriter_object *intern;
intern = (xmlwriter_object *) rsrc->ptr;
xmlwriter_free_resource_ptr(intern TSRMLS_CC);
}
| @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,318 | static void xmlwriter_object_free_storage(void *object TSRMLS_DC)
{
ze_xmlwriter_object * intern = (ze_xmlwriter_object *) object;
if (!intern) {
return;
}
if (intern->xmlwriter_ptr) {
xmlwriter_free_resource_ptr(intern->xmlwriter_ptr TSRMLS_CC);
}
intern->xmlwriter_ptr = NULL;
zend_object_std_dtor(&intern->... | Bypass | 0 | static void xmlwriter_object_free_storage(void *object TSRMLS_DC)
{
ze_xmlwriter_object * intern = (ze_xmlwriter_object *) object;
if (!intern) {
return;
}
if (intern->xmlwriter_ptr) {
xmlwriter_free_resource_ptr(intern->xmlwriter_ptr TSRMLS_CC);
}
intern->xmlwriter_ptr = NULL;
zend_object_std_dtor(&intern->... | @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,319 | static zend_object_value xmlwriter_object_new(zend_class_entry *class_type TSRMLS_DC)
{
ze_xmlwriter_object *intern;
zend_object_value retval;
intern = emalloc(sizeof(ze_xmlwriter_object));
memset(&intern->zo, 0, sizeof(zend_object));
intern->xmlwriter_ptr = NULL;
zend_object_std_init(&intern->zo, class_type T... | Bypass | 0 | static zend_object_value xmlwriter_object_new(zend_class_entry *class_type TSRMLS_DC)
{
ze_xmlwriter_object *intern;
zend_object_value retval;
intern = emalloc(sizeof(ze_xmlwriter_object));
memset(&intern->zo, 0, sizeof(zend_object));
intern->xmlwriter_ptr = NULL;
zend_object_std_init(&intern->zo, class_type T... | @@ -1738,7 +1738,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* }}} */
#endif
-/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source)
+/* {{{ proto resource xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
static PHP_FUNCTION(xmlwriter_open_uri)
... | CWE-254 | null | null |
12,320 | static PHP_FUNCTION(ob_gzhandler)
{
char *in_str;
int in_len;
long flags = 0;
php_output_context ctx = {0};
int encoding, rv;
/*
* NOTE that the real ob_gzhandler is an alias to "zlib output compression".
* This is a really bad hack, because
* - we have to initialize a php_zlib_context on demand
* - we h... | Bypass | 0 | static PHP_FUNCTION(ob_gzhandler)
{
char *in_str;
int in_len;
long flags = 0;
php_output_context ctx = {0};
int encoding, rv;
/*
* NOTE that the real ob_gzhandler is an alias to "zlib output compression".
* This is a really bad hack, because
* - we have to initialize a php_zlib_context on demand
* - we h... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,321 | static PHP_FUNCTION(zlib_get_coding_type)
{
if (zend_parse_parameters_none() == FAILURE) {
return;
}
switch (ZLIBG(compression_coding)) {
case PHP_ZLIB_ENCODING_GZIP:
RETURN_STRINGL("gzip", sizeof("gzip") - 1, 1);
case PHP_ZLIB_ENCODING_DEFLATE:
RETURN_STRINGL("deflate", sizeof("deflate") - 1, 1);
defa... | Bypass | 0 | static PHP_FUNCTION(zlib_get_coding_type)
{
if (zend_parse_parameters_none() == FAILURE) {
return;
}
switch (ZLIBG(compression_coding)) {
case PHP_ZLIB_ENCODING_GZIP:
RETURN_STRINGL("gzip", sizeof("gzip") - 1, 1);
case PHP_ZLIB_ENCODING_DEFLATE:
RETURN_STRINGL("deflate", sizeof("deflate") - 1, 1);
defa... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,322 | static PHP_FUNCTION(gzfile)
{
char *filename;
int filename_len;
int flags = REPORT_ERRORS;
char buf[8192] = {0};
register int i = 0;
long use_include_path = 0;
php_stream *stream;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|l", &filename, &filename_len, &use_include_path)) {
return;
}... | Bypass | 0 | static PHP_FUNCTION(gzfile)
{
char *filename;
int filename_len;
int flags = REPORT_ERRORS;
char buf[8192] = {0};
register int i = 0;
long use_include_path = 0;
php_stream *stream;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|l", &filename, &filename_len, &use_include_path)) {
return;
}... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,323 | static PHP_INI_MH(OnUpdate_zlib_output_compression)
{
int status, int_value;
char *ini_value;
if (new_value == NULL) {
return FAILURE;
}
if (!strncasecmp(new_value, "off", sizeof("off"))) {
new_value = "0";
new_value_length = sizeof("0");
} else if (!strncasecmp(new_value, "on", sizeof("on"))) {
new_val... | Bypass | 0 | static PHP_INI_MH(OnUpdate_zlib_output_compression)
{
int status, int_value;
char *ini_value;
if (new_value == NULL) {
return FAILURE;
}
if (!strncasecmp(new_value, "off", sizeof("off"))) {
new_value = "0";
new_value_length = sizeof("0");
} else if (!strncasecmp(new_value, "on", sizeof("on"))) {
new_val... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,324 | static PHP_INI_MH(OnUpdate_zlib_output_handler)
{
if (stage == PHP_INI_STAGE_RUNTIME && (php_output_get_status(TSRMLS_C) & PHP_OUTPUT_SENT)) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "Cannot change zlib.output_handler - headers already sent");
return FAILURE;
}
return OnUpdateString(entry, new_v... | Bypass | 0 | static PHP_INI_MH(OnUpdate_zlib_output_handler)
{
if (stage == PHP_INI_STAGE_RUNTIME && (php_output_get_status(TSRMLS_C) & PHP_OUTPUT_SENT)) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "Cannot change zlib.output_handler - headers already sent");
return FAILURE;
}
return OnUpdateString(entry, new_v... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,325 | static PHP_MINFO_FUNCTION(zlib)
{
php_info_print_table_start();
php_info_print_table_header(2, "ZLib Support", "enabled");
php_info_print_table_row(2, "Stream Wrapper", "compress.zlib://");
php_info_print_table_row(2, "Stream Filter", "zlib.inflate, zlib.deflate");
php_info_print_table_row(2, "Compiled Version", Z... | Bypass | 0 | static PHP_MINFO_FUNCTION(zlib)
{
php_info_print_table_start();
php_info_print_table_header(2, "ZLib Support", "enabled");
php_info_print_table_row(2, "Stream Wrapper", "compress.zlib://");
php_info_print_table_row(2, "Stream Filter", "zlib.inflate, zlib.deflate");
php_info_print_table_row(2, "Compiled Version", Z... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,326 | static PHP_MINIT_FUNCTION(zlib)
{
php_register_url_stream_wrapper("compress.zlib", &php_stream_gzip_wrapper TSRMLS_CC);
php_stream_filter_register_factory("zlib.*", &php_zlib_filter_factory TSRMLS_CC);
php_output_handler_alias_register(ZEND_STRL("ob_gzhandler"), php_zlib_output_handler_init TSRMLS_CC);
php_output_... | Bypass | 0 | static PHP_MINIT_FUNCTION(zlib)
{
php_register_url_stream_wrapper("compress.zlib", &php_stream_gzip_wrapper TSRMLS_CC);
php_stream_filter_register_factory("zlib.*", &php_zlib_filter_factory TSRMLS_CC);
php_output_handler_alias_register(ZEND_STRL("ob_gzhandler"), php_zlib_output_handler_init TSRMLS_CC);
php_output_... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,327 | static PHP_MSHUTDOWN_FUNCTION(zlib)
{
php_unregister_url_stream_wrapper("zlib" TSRMLS_CC);
php_stream_filter_unregister_factory("zlib.*" TSRMLS_CC);
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
| Bypass | 0 | static PHP_MSHUTDOWN_FUNCTION(zlib)
{
php_unregister_url_stream_wrapper("zlib" TSRMLS_CC);
php_stream_filter_unregister_factory("zlib.*" TSRMLS_CC);
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
| @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,328 | static PHP_RINIT_FUNCTION(zlib)
{
ZLIBG(compression_coding) = 0;
if (!ZLIBG(handler_registered)) {
ZLIBG(output_compression) = ZLIBG(output_compression_default);
php_zlib_output_compression_start(TSRMLS_C);
}
return SUCCESS;
}
| Bypass | 0 | static PHP_RINIT_FUNCTION(zlib)
{
ZLIBG(compression_coding) = 0;
if (!ZLIBG(handler_registered)) {
ZLIBG(output_compression) = ZLIBG(output_compression_default);
php_zlib_output_compression_start(TSRMLS_C);
}
return SUCCESS;
}
| @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,329 | static PHP_RSHUTDOWN_FUNCTION(zlib)
{
php_zlib_cleanup_ob_gzhandler_mess(TSRMLS_C);
ZLIBG(handler_registered) = 0;
return SUCCESS;
}
| Bypass | 0 | static PHP_RSHUTDOWN_FUNCTION(zlib)
{
php_zlib_cleanup_ob_gzhandler_mess(TSRMLS_C);
ZLIBG(handler_registered) = 0;
return SUCCESS;
}
| @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,330 | static ZEND_MODULE_GLOBALS_CTOR_D(zlib)
{
zlib_globals->ob_gzhandler = NULL;
zlib_globals->handler_registered = 0;
}
| Bypass | 0 | static ZEND_MODULE_GLOBALS_CTOR_D(zlib)
{
zlib_globals->ob_gzhandler = NULL;
zlib_globals->handler_registered = 0;
}
| @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,331 | static voidpf php_zlib_alloc(voidpf opaque, uInt items, uInt size)
{
return (voidpf)safe_emalloc(items, size, 0);
}
| Bypass | 0 | static voidpf php_zlib_alloc(voidpf opaque, uInt items, uInt size)
{
return (voidpf)safe_emalloc(items, size, 0);
}
| @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,332 | static int php_zlib_decode(const char *in_buf, size_t in_len, char **out_buf, size_t *out_len, int encoding, size_t max_len TSRMLS_DC)
{
int status = Z_DATA_ERROR;
z_stream Z;
memset(&Z, 0, sizeof(z_stream));
Z.zalloc = php_zlib_alloc;
Z.zfree = php_zlib_free;
if (in_len) {
retry_raw_inflate:
status = inflate... | Bypass | 0 | static int php_zlib_decode(const char *in_buf, size_t in_len, char **out_buf, size_t *out_len, int encoding, size_t max_len TSRMLS_DC)
{
int status = Z_DATA_ERROR;
z_stream Z;
memset(&Z, 0, sizeof(z_stream));
Z.zalloc = php_zlib_alloc;
Z.zfree = php_zlib_free;
if (in_len) {
retry_raw_inflate:
status = inflate... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,333 | static void php_zlib_free(voidpf opaque, voidpf address)
{
efree((void*)address);
}
| Bypass | 0 | static void php_zlib_free(voidpf opaque, voidpf address)
{
efree((void*)address);
}
| @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,334 | static inline int php_zlib_inflate_rounds(z_stream *Z, size_t max, char **buf, size_t *len)
{
int status, round = 0;
php_zlib_buffer buffer = {NULL, NULL, 0, 0, 0};
*buf = NULL;
*len = 0;
buffer.size = (max && (max < Z->avail_in)) ? max : Z->avail_in;
do {
if ((max && (max <= buffer.used)) || !(buffer.aptr =... | Bypass | 0 | static inline int php_zlib_inflate_rounds(z_stream *Z, size_t max, char **buf, size_t *len)
{
int status, round = 0;
php_zlib_buffer buffer = {NULL, NULL, 0, 0, 0};
*buf = NULL;
*len = 0;
buffer.size = (max && (max < Z->avail_in)) ? max : Z->avail_in;
do {
if ((max && (max <= buffer.used)) || !(buffer.aptr =... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,335 | static void php_zlib_output_compression_start(TSRMLS_D)
{
zval *zoh;
php_output_handler *h;
switch (ZLIBG(output_compression)) {
case 0:
break;
case 1:
ZLIBG(output_compression) = PHP_OUTPUT_HANDLER_DEFAULT_SIZE;
/* break omitted intentionally */
default:
if ( php_zlib_output_encoding(TSRMLS_C) &&... | Bypass | 0 | static void php_zlib_output_compression_start(TSRMLS_D)
{
zval *zoh;
php_output_handler *h;
switch (ZLIBG(output_compression)) {
case 0:
break;
case 1:
ZLIBG(output_compression) = PHP_OUTPUT_HANDLER_DEFAULT_SIZE;
/* break omitted intentionally */
default:
if ( php_zlib_output_encoding(TSRMLS_C) &&... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,336 | static int php_zlib_output_conflict_check(const char *handler_name, size_t handler_name_len TSRMLS_DC)
{
if (php_output_get_level(TSRMLS_C) > 0) {
if (php_output_handler_conflict(handler_name, handler_name_len, ZEND_STRL(PHP_ZLIB_OUTPUT_HANDLER_NAME) TSRMLS_CC)
|| php_output_handler_conflict(handler_name, handler_... | Bypass | 0 | static int php_zlib_output_conflict_check(const char *handler_name, size_t handler_name_len TSRMLS_DC)
{
if (php_output_get_level(TSRMLS_C) > 0) {
if (php_output_handler_conflict(handler_name, handler_name_len, ZEND_STRL(PHP_ZLIB_OUTPUT_HANDLER_NAME) TSRMLS_CC)
|| php_output_handler_conflict(handler_name, handler_... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,337 | static int php_zlib_output_encoding(TSRMLS_D)
{
zval **enc;
if (!ZLIBG(compression_coding)) {
zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC);
if (PG(http_globals)[TRACK_VARS_SERVER] && SUCCESS == zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCO... | Bypass | 0 | static int php_zlib_output_encoding(TSRMLS_D)
{
zval **enc;
if (!ZLIBG(compression_coding)) {
zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC);
if (PG(http_globals)[TRACK_VARS_SERVER] && SUCCESS == zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCO... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,338 | static int php_zlib_output_handler(void **handler_context, php_output_context *output_context)
{
php_zlib_context *ctx = *(php_zlib_context **) handler_context;
PHP_OUTPUT_TSRMLS(output_context);
if (!php_zlib_output_encoding(TSRMLS_C)) {
/* "Vary: Accept-Encoding" header sent along uncompressed content breaks ca... | Bypass | 0 | static int php_zlib_output_handler(void **handler_context, php_output_context *output_context)
{
php_zlib_context *ctx = *(php_zlib_context **) handler_context;
PHP_OUTPUT_TSRMLS(output_context);
if (!php_zlib_output_encoding(TSRMLS_C)) {
/* "Vary: Accept-Encoding" header sent along uncompressed content breaks ca... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,339 | static php_zlib_context *php_zlib_output_handler_context_init(TSRMLS_D)
{
php_zlib_context *ctx = (php_zlib_context *) ecalloc(1, sizeof(php_zlib_context));
ctx->Z.zalloc = php_zlib_alloc;
ctx->Z.zfree = php_zlib_free;
return ctx;
}
| Bypass | 0 | static php_zlib_context *php_zlib_output_handler_context_init(TSRMLS_D)
{
php_zlib_context *ctx = (php_zlib_context *) ecalloc(1, sizeof(php_zlib_context));
ctx->Z.zalloc = php_zlib_alloc;
ctx->Z.zfree = php_zlib_free;
return ctx;
}
| @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,340 | static int php_zlib_output_handler_ex(php_zlib_context *ctx, php_output_context *output_context)
{
int flags = Z_SYNC_FLUSH;
PHP_OUTPUT_TSRMLS(output_context);
if (output_context->op & PHP_OUTPUT_HANDLER_START) {
/* start up */
if (Z_OK != deflateInit2(&ctx->Z, ZLIBG(output_compression_level), Z_DEFLATED, ZLIBG... | Bypass | 0 | static int php_zlib_output_handler_ex(php_zlib_context *ctx, php_output_context *output_context)
{
int flags = Z_SYNC_FLUSH;
PHP_OUTPUT_TSRMLS(output_context);
if (output_context->op & PHP_OUTPUT_HANDLER_START) {
/* start up */
if (Z_OK != deflateInit2(&ctx->Z, ZLIBG(output_compression_level), Z_DEFLATED, ZLIBG... | @@ -581,7 +581,7 @@ static PHP_FUNCTION(gzopen)
php_stream *stream;
long use_include_path = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ... | CWE-254 | null | null |
12,341 | SSH_PACKET_CALLBACK(ssh_packet_disconnect_callback){
int rc;
uint32_t code = 0;
char *error = NULL;
ssh_string error_s;
(void)user;
(void)type;
rc = buffer_get_u32(packet, &code);
if (rc != 0) {
code = ntohl(code);
}
error_s = buffer_get_ssh_string(packet);
if (error_s != NULL) {
error =... | DoS | 0 | SSH_PACKET_CALLBACK(ssh_packet_disconnect_callback){
int rc;
uint32_t code = 0;
char *error = NULL;
ssh_string error_s;
(void)user;
(void)type;
rc = buffer_get_u32(packet, &code);
if (rc != 0) {
code = ntohl(code);
}
error_s = buffer_get_ssh_string(packet);
if (error_s != NULL) {
error =... | @@ -94,7 +94,7 @@ SSH_PACKET_CALLBACK(ssh_packet_dh_reply){
(void)type;
(void)user;
SSH_LOG(SSH_LOG_PROTOCOL,"Received SSH_KEXDH_REPLY");
- if(session->session_state!= SSH_SESSION_STATE_DH &&
+ if (session->session_state != SSH_SESSION_STATE_DH ||
session->dh_handshake_state != DH_STATE_INIT_SENT){
ssh_... | null | null | null |
12,342 | SSH_PACKET_CALLBACK(ssh_packet_ignore_callback){
(void)session; /* unused */
(void)user;
(void)type;
(void)packet;
SSH_LOG(SSH_LOG_PROTOCOL,"Received %s packet",type==SSH2_MSG_IGNORE ? "SSH_MSG_IGNORE" : "SSH_MSG_DEBUG");
/* TODO: handle a graceful disconnect */
return SSH_PACKET_USED;
}
| DoS | 0 | SSH_PACKET_CALLBACK(ssh_packet_ignore_callback){
(void)session; /* unused */
(void)user;
(void)type;
(void)packet;
SSH_LOG(SSH_LOG_PROTOCOL,"Received %s packet",type==SSH2_MSG_IGNORE ? "SSH_MSG_IGNORE" : "SSH_MSG_DEBUG");
/* TODO: handle a graceful disconnect */
return SSH_PACKET_USED;
}
| @@ -94,7 +94,7 @@ SSH_PACKET_CALLBACK(ssh_packet_dh_reply){
(void)type;
(void)user;
SSH_LOG(SSH_LOG_PROTOCOL,"Received SSH_KEXDH_REPLY");
- if(session->session_state!= SSH_SESSION_STATE_DH &&
+ if (session->session_state != SSH_SESSION_STATE_DH ||
session->dh_handshake_state != DH_STATE_INIT_SENT){
ssh_... | null | null | null |
12,343 | static int server_set_kex(ssh_session session) {
struct ssh_kex_struct *server = &session->next_crypto->server_kex;
int i, j, rc;
const char *wanted;
char hostkeys[64] = {0};
enum ssh_keytypes_e keytype;
size_t len;
ZERO_STRUCTP(server);
ssh_get_random(server->cookie, 16, 0);
#ifdef HAVE_ECC
if (ses... | DoS | 0 | static int server_set_kex(ssh_session session) {
struct ssh_kex_struct *server = &session->next_crypto->server_kex;
int i, j, rc;
const char *wanted;
char hostkeys[64] = {0};
enum ssh_keytypes_e keytype;
size_t len;
ZERO_STRUCTP(server);
ssh_get_random(server->cookie, 16, 0);
#ifdef HAVE_ECC
if (ses... | @@ -165,7 +165,7 @@ static int ssh_server_kexdh_init(ssh_session session, ssh_buffer packet){
}
SSH_PACKET_CALLBACK(ssh_packet_kexdh_init){
- int rc;
+ int rc = SSH_ERROR;
(void)type;
(void)user;
@@ -193,9 +193,11 @@ SSH_PACKET_CALLBACK(ssh_packet_kexdh_init){
ssh_set_error(session,SSH_FATAL,"Wro... | null | null | null |
12,344 | static int ssh_server_kexdh_init(ssh_session session, ssh_buffer packet){
ssh_string e;
e = buffer_get_ssh_string(packet);
if (e == NULL) {
ssh_set_error(session, SSH_FATAL, "No e number in client request");
return -1;
}
if (dh_import_e(session, e) < 0) {
ssh_set_error(session, SSH... | DoS | 0 | static int ssh_server_kexdh_init(ssh_session session, ssh_buffer packet){
ssh_string e;
e = buffer_get_ssh_string(packet);
if (e == NULL) {
ssh_set_error(session, SSH_FATAL, "No e number in client request");
return -1;
}
if (dh_import_e(session, e) < 0) {
ssh_set_error(session, SSH... | @@ -165,7 +165,7 @@ static int ssh_server_kexdh_init(ssh_session session, ssh_buffer packet){
}
SSH_PACKET_CALLBACK(ssh_packet_kexdh_init){
- int rc;
+ int rc = SSH_ERROR;
(void)type;
(void)user;
@@ -193,9 +193,11 @@ SSH_PACKET_CALLBACK(ssh_packet_kexdh_init){
ssh_set_error(session,SSH_FATAL,"Wro... | null | null | null |
12,345 | void ERR_load_ASN1_strings(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_func_error_string(ASN1_str_functs[0].error) == NULL) {
ERR_load_strings(0, ASN1_str_functs);
ERR_load_strings(0, ASN1_str_reasons);
}
#endif
}
| DoS | 0 | void ERR_load_ASN1_strings(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_func_error_string(ASN1_str_functs[0].error) == NULL) {
ERR_load_strings(0, ASN1_str_functs);
ERR_load_strings(0, ASN1_str_reasons);
}
#endif
}
| @@ -1,6 +1,6 @@
/* crypto/asn1/asn1_err.c */
/* ====================================================================
- * Copyright (c) 1999-2014 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2018 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, ... | CWE-400 | null | null |
12,346 | int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
{
if (rsa->meth->rsa_keygen)
return rsa->meth->rsa_keygen(rsa, bits, e_value, cb);
return rsa_builtin_keygen(rsa, bits, e_value, cb);
}
| null | 0 | int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
{
if (rsa->meth->rsa_keygen)
return rsa->meth->rsa_keygen(rsa, bits, e_value, cb);
return rsa_builtin_keygen(rsa, bits, e_value, cb);
}
| @@ -89,6 +89,8 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value,
if (BN_copy(rsa->e, e_value) == NULL)
goto err;
+ BN_set_flags(rsa->p, BN_FLG_CONSTTIME);
+ BN_set_flags(rsa->q, BN_FLG_CONSTTIME);
BN_set_flags(r2, BN_FLG_CONSTTIME);
/* generate p and q */
for (;;... | CWE-327 | null | null |
12,347 | EC_PRE_COMP *EC_ec_pre_comp_dup(EC_PRE_COMP *pre)
{
int i;
if (pre != NULL)
CRYPTO_atomic_add(&pre->references, 1, &i, pre->lock);
return pre;
}
| null | 0 | EC_PRE_COMP *EC_ec_pre_comp_dup(EC_PRE_COMP *pre)
{
int i;
if (pre != NULL)
CRYPTO_atomic_add(&pre->references, 1, &i, pre->lock);
return pre;
}
| @@ -177,8 +177,8 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
*/
cardinality_bits = BN_num_bits(cardinality);
group_top = bn_get_top(cardinality);
- if ((bn_wexpand(k, group_top + 1) == NULL)
- || (bn_wexpand(lambda, group_top + 1) == NULL))
+ if ((bn_wexpand(k, group_... | CWE-320 | null | null |
12,348 | static EC_PRE_COMP *ec_pre_comp_new(const EC_GROUP *group)
{
EC_PRE_COMP *ret = NULL;
if (!group)
return NULL;
ret = OPENSSL_zalloc(sizeof(*ret));
if (ret == NULL) {
ECerr(EC_F_EC_PRE_COMP_NEW, ERR_R_MALLOC_FAILURE);
return ret;
}
ret->group = group;
ret->blocksize... | null | 0 | static EC_PRE_COMP *ec_pre_comp_new(const EC_GROUP *group)
{
EC_PRE_COMP *ret = NULL;
if (!group)
return NULL;
ret = OPENSSL_zalloc(sizeof(*ret));
if (ret == NULL) {
ECerr(EC_F_EC_PRE_COMP_NEW, ERR_R_MALLOC_FAILURE);
return ret;
}
ret->group = group;
ret->blocksize... | @@ -177,8 +177,8 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
*/
cardinality_bits = BN_num_bits(cardinality);
group_top = bn_get_top(cardinality);
- if ((bn_wexpand(k, group_top + 1) == NULL)
- || (bn_wexpand(lambda, group_top + 1) == NULL))
+ if ((bn_wexpand(k, group_... | CWE-320 | null | null |
12,349 | int ec_wNAF_have_precompute_mult(const EC_GROUP *group)
{
return HAVEPRECOMP(group, ec);
}
| null | 0 | int ec_wNAF_have_precompute_mult(const EC_GROUP *group)
{
return HAVEPRECOMP(group, ec);
}
| @@ -177,8 +177,8 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
*/
cardinality_bits = BN_num_bits(cardinality);
group_top = bn_get_top(cardinality);
- if ((bn_wexpand(k, group_top + 1) == NULL)
- || (bn_wexpand(lambda, group_top + 1) == NULL))
+ if ((bn_wexpand(k, group_... | CWE-320 | null | null |
12,350 | int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
BN_CTX *ctx)
{
BN_CTX *new_ctx = NULL;
const EC_POINT *generator = NULL;
EC_POINT *tmp = NULL;
size_t totalnum;
size_t blocksize = ... | null | 0 | int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
BN_CTX *ctx)
{
BN_CTX *new_ctx = NULL;
const EC_POINT *generator = NULL;
EC_POINT *tmp = NULL;
size_t totalnum;
size_t blocksize = ... | @@ -177,8 +177,8 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
*/
cardinality_bits = BN_num_bits(cardinality);
group_top = bn_get_top(cardinality);
- if ((bn_wexpand(k, group_top + 1) == NULL)
- || (bn_wexpand(lambda, group_top + 1) == NULL))
+ if ((bn_wexpand(k, group_... | CWE-320 | null | null |
12,351 | int ec_wNAF_precompute_mult(EC_GROUP *group, BN_CTX *ctx)
{
const EC_POINT *generator;
EC_POINT *tmp_point = NULL, *base = NULL, **var;
BN_CTX *new_ctx = NULL;
const BIGNUM *order;
size_t i, bits, w, pre_points_per_block, blocksize, numblocks, num;
EC_POINT **points = NULL;
EC_PRE_COMP *pre_... | null | 0 | int ec_wNAF_precompute_mult(EC_GROUP *group, BN_CTX *ctx)
{
const EC_POINT *generator;
EC_POINT *tmp_point = NULL, *base = NULL, **var;
BN_CTX *new_ctx = NULL;
const BIGNUM *order;
size_t i, bits, w, pre_points_per_block, blocksize, numblocks, num;
EC_POINT **points = NULL;
EC_PRE_COMP *pre_... | @@ -177,8 +177,8 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
*/
cardinality_bits = BN_num_bits(cardinality);
group_top = bn_get_top(cardinality);
- if ((bn_wexpand(k, group_top + 1) == NULL)
- || (bn_wexpand(lambda, group_top + 1) == NULL))
+ if ((bn_wexpand(k, group_... | CWE-320 | null | null |
12,352 | EC_PRE_COMP *EC_ec_pre_comp_dup(EC_PRE_COMP *pre)
{
int i;
if (pre != NULL)
CRYPTO_UP_REF(&pre->references, &i, pre->lock);
return pre;
}
| null | 0 | EC_PRE_COMP *EC_ec_pre_comp_dup(EC_PRE_COMP *pre)
{
int i;
if (pre != NULL)
CRYPTO_UP_REF(&pre->references, &i, pre->lock);
return pre;
}
| @@ -206,8 +206,8 @@ int ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r,
*/
cardinality_bits = BN_num_bits(cardinality);
group_top = bn_get_top(cardinality);
- if ((bn_wexpand(k, group_top + 1) == NULL)
- || (bn_wexpand(lambda, group_top + 1) == NULL)) {
+ if ((bn_wexpand(k, group_t... | CWE-320 | null | null |
12,353 | void EC_ec_pre_comp_free(EC_PRE_COMP *pre)
{
int i;
if (pre == NULL)
return;
CRYPTO_DOWN_REF(&pre->references, &i, pre->lock);
REF_PRINT_COUNT("EC_ec", pre);
if (i > 0)
return;
REF_ASSERT_ISNT(i < 0);
if (pre->points != NULL) {
EC_POINT **pts;
for (pts = p... | null | 0 | void EC_ec_pre_comp_free(EC_PRE_COMP *pre)
{
int i;
if (pre == NULL)
return;
CRYPTO_DOWN_REF(&pre->references, &i, pre->lock);
REF_PRINT_COUNT("EC_ec", pre);
if (i > 0)
return;
REF_ASSERT_ISNT(i < 0);
if (pre->points != NULL) {
EC_POINT **pts;
for (pts = p... | @@ -206,8 +206,8 @@ int ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r,
*/
cardinality_bits = BN_num_bits(cardinality);
group_top = bn_get_top(cardinality);
- if ((bn_wexpand(k, group_top + 1) == NULL)
- || (bn_wexpand(lambda, group_top + 1) == NULL)) {
+ if ((bn_wexpand(k, group_t... | CWE-320 | null | null |
12,354 | int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
BN_CTX *ctx)
{
const EC_POINT *generator = NULL;
EC_POINT *tmp = NULL;
size_t totalnum;
size_t blocksize = 0, numblocks = 0; /* for wNA... | null | 0 | int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
BN_CTX *ctx)
{
const EC_POINT *generator = NULL;
EC_POINT *tmp = NULL;
size_t totalnum;
size_t blocksize = 0, numblocks = 0; /* for wNA... | @@ -206,8 +206,8 @@ int ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r,
*/
cardinality_bits = BN_num_bits(cardinality);
group_top = bn_get_top(cardinality);
- if ((bn_wexpand(k, group_top + 1) == NULL)
- || (bn_wexpand(lambda, group_top + 1) == NULL)) {
+ if ((bn_wexpand(k, group_t... | CWE-320 | null | null |
12,355 | static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
{
BIGNUM *kinv = NULL, *r = NULL, *s = NULL;
BIGNUM *m, *blind, *blindm, *tmp;
BN_CTX *ctx = NULL;
int reason = ERR_R_BN_LIB;
DSA_SIG *ret = NULL;
int noredo = 0;
if (dsa->p == NULL || dsa->q == NULL || dsa->g == NUL... | null | 0 | static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
{
BIGNUM *kinv = NULL, *r = NULL, *s = NULL;
BIGNUM *m, *blind, *blindm, *tmp;
BN_CTX *ctx = NULL;
int reason = ERR_R_BN_LIB;
DSA_SIG *ret = NULL;
int noredo = 0;
if (dsa->p == NULL || dsa->q == NULL || dsa->g == NUL... | @@ -279,7 +279,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
goto err;
/* Preallocate space */
- q_bits = BN_num_bits(dsa->q);
+ q_bits = BN_num_bits(dsa->q) + sizeof(dsa->q->d[0]) * 16;
if (!BN_set_bit(&k, q_bits)
|| !BN_set_bit(&l, q_bits)
|| !BN... | CWE-320 | null | null |
12,356 | static int dsa_do_verify(const unsigned char *dgst, int dgst_len,
DSA_SIG *sig, DSA *dsa)
{
BN_CTX *ctx;
BIGNUM u1, u2, t1;
BN_MONT_CTX *mont = NULL;
int ret = -1, i;
if (!dsa->p || !dsa->q || !dsa->g) {
DSAerr(DSA_F_DSA_DO_VERIFY, DSA_R_MISSING_PARAMETERS);
... | null | 0 | static int dsa_do_verify(const unsigned char *dgst, int dgst_len,
DSA_SIG *sig, DSA *dsa)
{
BN_CTX *ctx;
BIGNUM u1, u2, t1;
BN_MONT_CTX *mont = NULL;
int ret = -1, i;
if (!dsa->p || !dsa->q || !dsa->g) {
DSAerr(DSA_F_DSA_DO_VERIFY, DSA_R_MISSING_PARAMETERS);
... | @@ -279,7 +279,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
goto err;
/* Preallocate space */
- q_bits = BN_num_bits(dsa->q);
+ q_bits = BN_num_bits(dsa->q) + sizeof(dsa->q->d[0]) * 16;
if (!BN_set_bit(&k, q_bits)
|| !BN_set_bit(&l, q_bits)
|| !BN... | CWE-320 | null | null |
12,357 | static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
{
BIGNUM *kinv = NULL;
BIGNUM *m, *blind, *blindm, *tmp;
BN_CTX *ctx = NULL;
int reason = ERR_R_BN_LIB;
DSA_SIG *ret = NULL;
int rv = 0;
if (dsa->p == NULL || dsa->q == NULL || dsa->g == NULL) {
reason = DSA_... | null | 0 | static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
{
BIGNUM *kinv = NULL;
BIGNUM *m, *blind, *blindm, *tmp;
BN_CTX *ctx = NULL;
int reason = ERR_R_BN_LIB;
DSA_SIG *ret = NULL;
int rv = 0;
if (dsa->p == NULL || dsa->q == NULL || dsa->g == NULL) {
reason = DSA_... | @@ -11,6 +11,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
+#include "internal/bn_int.h"
#include <openssl/bn.h>
#include <openssl/sha.h>
#include "dsa_locl.h"
@@ -182,9 +183,9 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
{
BN_CTX *ctx = NULL;
BIGNUM *k, *kinv = NULL, *r = *rp;
- ... | CWE-320 | null | null |
12,358 | int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
{
#ifdef OPENSSL_FIPS
if (FIPS_mode() && !(dh->meth->flags & DH_FLAG_FIPS_METHOD)
&& !(dh->flags & DH_FLAG_NON_FIPS_ALLOW)) {
DHerr(DH_F_DH_COMPUTE_KEY, DH_R_NON_FIPS_METHOD);
return 0;
}
#endif
return dh->meth->co... | DoS | 0 | int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
{
#ifdef OPENSSL_FIPS
if (FIPS_mode() && !(dh->meth->flags & DH_FLAG_FIPS_METHOD)
&& !(dh->flags & DH_FLAG_NON_FIPS_ALLOW)) {
DHerr(DH_F_DH_COMPUTE_KEY, DH_R_NON_FIPS_METHOD);
return 0;
}
#endif
return dh->meth->co... | @@ -130,10 +130,15 @@ static int generate_key(DH *dh)
int ok = 0;
int generate_new_key = 0;
unsigned l;
- BN_CTX *ctx;
+ BN_CTX *ctx = NULL;
BN_MONT_CTX *mont = NULL;
BIGNUM *pub_key = NULL, *priv_key = NULL;
+ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
+ DHerr(DH... | CWE-320 | null | null |
12,359 | int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh)
{
int rv, pad;
rv = dh->meth->compute_key(key, pub_key, dh);
if (rv <= 0)
return rv;
pad = BN_num_bytes(dh->p) - rv;
if (pad > 0) {
memmove(key + pad, key, rv);
memset(key, 0, pad);
}
return ... | DoS | 0 | int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh)
{
int rv, pad;
rv = dh->meth->compute_key(key, pub_key, dh);
if (rv <= 0)
return rv;
pad = BN_num_bytes(dh->p) - rv;
if (pad > 0) {
memmove(key + pad, key, rv);
memset(key, 0, pad);
}
return ... | @@ -130,10 +130,15 @@ static int generate_key(DH *dh)
int ok = 0;
int generate_new_key = 0;
unsigned l;
- BN_CTX *ctx;
+ BN_CTX *ctx = NULL;
BN_MONT_CTX *mont = NULL;
BIGNUM *pub_key = NULL, *priv_key = NULL;
+ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
+ DHerr(DH... | CWE-320 | null | null |
12,360 | int DH_generate_key(DH *dh)
{
#ifdef OPENSSL_FIPS
if (FIPS_mode() && !(dh->meth->flags & DH_FLAG_FIPS_METHOD)
&& !(dh->flags & DH_FLAG_NON_FIPS_ALLOW)) {
DHerr(DH_F_DH_GENERATE_KEY, DH_R_NON_FIPS_METHOD);
return 0;
}
#endif
return dh->meth->generate_key(dh);
}
| DoS | 0 | int DH_generate_key(DH *dh)
{
#ifdef OPENSSL_FIPS
if (FIPS_mode() && !(dh->meth->flags & DH_FLAG_FIPS_METHOD)
&& !(dh->flags & DH_FLAG_NON_FIPS_ALLOW)) {
DHerr(DH_F_DH_GENERATE_KEY, DH_R_NON_FIPS_METHOD);
return 0;
}
#endif
return dh->meth->generate_key(dh);
}
| @@ -130,10 +130,15 @@ static int generate_key(DH *dh)
int ok = 0;
int generate_new_key = 0;
unsigned l;
- BN_CTX *ctx;
+ BN_CTX *ctx = NULL;
BN_MONT_CTX *mont = NULL;
BIGNUM *pub_key = NULL, *priv_key = NULL;
+ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
+ DHerr(DH... | CWE-320 | null | null |
12,361 | int DH_generate_key(DH *dh)
{
return dh->meth->generate_key(dh);
}
| DoS | 0 | int DH_generate_key(DH *dh)
{
return dh->meth->generate_key(dh);
}
| @@ -78,10 +78,15 @@ static int generate_key(DH *dh)
int ok = 0;
int generate_new_key = 0;
unsigned l;
- BN_CTX *ctx;
+ BN_CTX *ctx = NULL;
BN_MONT_CTX *mont = NULL;
BIGNUM *pub_key = NULL, *priv_key = NULL;
+ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
+ DHerr(DH_F... | CWE-320 | null | null |
12,362 | const DH_METHOD *DH_get_default_method(void)
{
return default_DH_method;
}
| DoS | 0 | const DH_METHOD *DH_get_default_method(void)
{
return default_DH_method;
}
| @@ -78,10 +78,15 @@ static int generate_key(DH *dh)
int ok = 0;
int generate_new_key = 0;
unsigned l;
- BN_CTX *ctx;
+ BN_CTX *ctx = NULL;
BN_MONT_CTX *mont = NULL;
BIGNUM *pub_key = NULL, *priv_key = NULL;
+ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
+ DHerr(DH_F... | CWE-320 | null | null |
12,363 | void DH_set_default_method(const DH_METHOD *meth)
{
default_DH_method = meth;
}
| DoS | 0 | void DH_set_default_method(const DH_METHOD *meth)
{
default_DH_method = meth;
}
| @@ -78,10 +78,15 @@ static int generate_key(DH *dh)
int ok = 0;
int generate_new_key = 0;
unsigned l;
- BN_CTX *ctx;
+ BN_CTX *ctx = NULL;
BN_MONT_CTX *mont = NULL;
BIGNUM *pub_key = NULL, *priv_key = NULL;
+ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
+ DHerr(DH_F... | CWE-320 | null | null |
12,364 | bdfFreeFontBits(FontPtr pFont)
{
BitmapFontPtr bitmapFont;
BitmapExtraPtr bitmapExtra;
int i, nencoding;
bitmapFont = (BitmapFontPtr) pFont->fontPrivate;
bitmapExtra = (BitmapExtraPtr) bitmapFont->bitmapExtra;
free(bitmapFont->ink_metrics);
if(bitmapFont->encoding) {
nencod... | DoS Exec Code Overflow | 0 | bdfFreeFontBits(FontPtr pFont)
{
BitmapFontPtr bitmapFont;
BitmapExtraPtr bitmapExtra;
int i, nencoding;
bitmapFont = (BitmapFontPtr) pFont->fontPrivate;
bitmapExtra = (BitmapExtraPtr) bitmapFont->bitmapExtra;
free(bitmapFont->ink_metrics);
if(bitmapFont->encoding) {
nencod... | @@ -338,7 +338,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
char charName[100];
int ignore;
- if (sscanf((char *) line, "STARTCHAR %s", charName) != 1) {
+ if (sscanf((char *) line, "STARTCHAR %99s", charName) != 1) {
bdfError("bad character name in BDF file\n... | CWE-119 | null | null |
12,365 | bdfPadToTerminal(FontPtr pFont)
{
BitmapFontPtr bitmapFont;
BitmapExtraPtr bitmapExtra;
int i;
int new_size;
CharInfoRec new;
int w,
h;
bitmapFont = (BitmapFontPtr) pFont->fontPrivate;
bzero(&new, sizeof(CharInfoRec));
new.metrics.ascent = p... | DoS Exec Code Overflow | 0 | bdfPadToTerminal(FontPtr pFont)
{
BitmapFontPtr bitmapFont;
BitmapExtraPtr bitmapExtra;
int i;
int new_size;
CharInfoRec new;
int w,
h;
bitmapFont = (BitmapFontPtr) pFont->fontPrivate;
bzero(&new, sizeof(CharInfoRec));
new.metrics.ascent = p... | @@ -338,7 +338,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
char charName[100];
int ignore;
- if (sscanf((char *) line, "STARTCHAR %s", charName) != 1) {
+ if (sscanf((char *) line, "STARTCHAR %99s", charName) != 1) {
bdfError("bad character name in BDF file\n... | CWE-119 | null | null |
12,366 | bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte,
int glyph, int scan, CARD32 *sizes)
{
int widthBits,
widthBytes,
widthHexChars;
int height,
row;
int i,
inLineLen,
nextByte;
... | DoS Exec Code Overflow | 0 | bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte,
int glyph, int scan, CARD32 *sizes)
{
int widthBits,
widthBytes,
widthHexChars;
int height,
row;
int i,
inLineLen,
nextByte;
... | @@ -338,7 +338,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
char charName[100];
int ignore;
- if (sscanf((char *) line, "STARTCHAR %s", charName) != 1) {
+ if (sscanf((char *) line, "STARTCHAR %99s", charName) != 1) {
bdfError("bad character name in BDF file\n... | CWE-119 | null | null |
12,367 | bdfReadHeader(FontFilePtr file, bdfFileState *pState)
{
unsigned char *line;
char namebuf[BDFLINELEN];
unsigned char lineBuf[BDFLINELEN];
line = bdfGetLine(file, lineBuf, BDFLINELEN);
if (!line || sscanf((char *) line, "STARTFONT %s", namebuf) != 1 ||
!bdfStrEqual(namebuf, "2.1")... | DoS Exec Code Overflow | 0 | bdfReadHeader(FontFilePtr file, bdfFileState *pState)
{
unsigned char *line;
char namebuf[BDFLINELEN];
unsigned char lineBuf[BDFLINELEN];
line = bdfGetLine(file, lineBuf, BDFLINELEN);
if (!line || sscanf((char *) line, "STARTFONT %s", namebuf) != 1 ||
!bdfStrEqual(namebuf, "2.1")... | @@ -338,7 +338,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
char charName[100];
int ignore;
- if (sscanf((char *) line, "STARTCHAR %s", charName) != 1) {
+ if (sscanf((char *) line, "STARTCHAR %99s", charName) != 1) {
bdfError("bad character name in BDF file\n... | CWE-119 | null | null |
12,368 | bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState)
{
int nProps, props_left,
nextProp;
char *stringProps;
FontPropPtr props;
char namebuf[BDFLINELEN],
secondbuf[BDFLINELEN],
thirdbuf[BDFLINELEN];
unsigned char... | DoS Exec Code Overflow | 0 | bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState)
{
int nProps, props_left,
nextProp;
char *stringProps;
FontPropPtr props;
char namebuf[BDFLINELEN],
secondbuf[BDFLINELEN],
thirdbuf[BDFLINELEN];
unsigned char... | @@ -338,7 +338,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
char charName[100];
int ignore;
- if (sscanf((char *) line, "STARTCHAR %s", charName) != 1) {
+ if (sscanf((char *) line, "STARTCHAR %99s", charName) != 1) {
bdfError("bad character name in BDF file\n... | CWE-119 | null | null |
12,369 | bdfSkipBitmap(FontFilePtr file, int height)
{
unsigned char *line;
int i = 0;
unsigned char lineBuf[BDFLINELEN];
do {
line = bdfGetLine(file, lineBuf, BDFLINELEN);
i++;
} while (line && !bdfIsPrefix(line, "ENDCHAR") && i <= height);
if (i > 1 && line && !bdfIsPrefix(line, "END... | DoS Exec Code Overflow | 0 | bdfSkipBitmap(FontFilePtr file, int height)
{
unsigned char *line;
int i = 0;
unsigned char lineBuf[BDFLINELEN];
do {
line = bdfGetLine(file, lineBuf, BDFLINELEN);
i++;
} while (line && !bdfIsPrefix(line, "ENDCHAR") && i <= height);
if (i > 1 && line && !bdfIsPrefix(line, "END... | @@ -338,7 +338,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
char charName[100];
int ignore;
- if (sscanf((char *) line, "STARTCHAR %s", charName) != 1) {
+ if (sscanf((char *) line, "STARTCHAR %99s", charName) != 1) {
bdfError("bad character name in BDF file\n... | CWE-119 | null | null |
12,370 | dtls1_process_heartbeat(SSL *s)
{
unsigned char *p = &s->s3->rrec.data[0], *pl;
unsigned short hbtype;
unsigned int payload;
unsigned int padding = 16; /* Use minimum padding */
/* Read type and payload length first */
hbtype = *p++;
n2s(p, payload);
pl = p;
if (s->msg_callback)
s->msg_callback(0, s->vers... | DoS | 0 | dtls1_process_heartbeat(SSL *s)
{
unsigned char *p = &s->s3->rrec.data[0], *pl;
unsigned short hbtype;
unsigned int payload;
unsigned int padding = 16; /* Use minimum padding */
/* Read type and payload length first */
hbtype = *p++;
n2s(p, payload);
pl = p;
if (s->msg_callback)
s->msg_callback(0, s->vers... | @@ -214,6 +214,12 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
static void
dtls1_hm_fragment_free(hm_fragment *frag)
{
+
+ if (frag->msg_header.is_ccs)
+ {
+ EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
+ EVP_MD... | CWE-310 | null | null |
12,371 | dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
{
hm_fragment *frag = NULL;
pitem *item = NULL;
int i = -1, is_complete;
unsigned char seq64be[8];
unsigned long frag_len = msg_hdr->frag_len, max_len;
if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len)
goto err;
/* Determine maximum... | DoS | 0 | dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
{
hm_fragment *frag = NULL;
pitem *item = NULL;
int i = -1, is_complete;
unsigned char seq64be[8];
unsigned long frag_len = msg_hdr->frag_len, max_len;
if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len)
goto err;
/* Determine maximum... | @@ -214,6 +214,12 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
static void
dtls1_hm_fragment_free(hm_fragment *frag)
{
+
+ if (frag->msg_header.is_ccs)
+ {
+ EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
+ EVP_MD... | CWE-310 | null | null |
12,372 | static int tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
int sec_len,
const void *seed1, int seed1_len,
const void *seed2, int seed2_len,
const void *seed3, int seed3_len,
const void *seed4, int seed4_len,
const void *seed5, int seed5_len,
unsigned char *out, int olen)
{
int chunk;
siz... | DoS | 0 | static int tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
int sec_len,
const void *seed1, int seed1_len,
const void *seed2, int seed2_len,
const void *seed3, int seed3_len,
const void *seed4, int seed4_len,
const void *seed5, int seed5_len,
unsigned char *out, int olen)
{
int chunk;
siz... | @@ -414,15 +414,20 @@ int tls1_change_cipher_state(SSL *s, int which)
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
else
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
- if (s->enc_write_ctx != NULL)
+ if (s->enc_write... | CWE-310 | null | null |
12,373 | int tls1_cert_verify_mac(SSL *s, int md_nid, unsigned char *out)
{
unsigned int ret;
EVP_MD_CTX ctx, *d=NULL;
int i;
if (s->s3->handshake_buffer)
if (!ssl3_digest_cached_records(s))
return 0;
for (i=0;i<SSL_MAX_DIGEST;i++)
{
if (s->s3->handshake_dgst[i]&&EVP_MD_CTX_type(s->s3->handshake_dgst[i])==m... | DoS | 0 | int tls1_cert_verify_mac(SSL *s, int md_nid, unsigned char *out)
{
unsigned int ret;
EVP_MD_CTX ctx, *d=NULL;
int i;
if (s->s3->handshake_buffer)
if (!ssl3_digest_cached_records(s))
return 0;
for (i=0;i<SSL_MAX_DIGEST;i++)
{
if (s->s3->handshake_dgst[i]&&EVP_MD_CTX_type(s->s3->handshake_dgst[i])==m... | @@ -414,15 +414,20 @@ int tls1_change_cipher_state(SSL *s, int which)
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
else
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
- if (s->enc_write_ctx != NULL)
+ if (s->enc_write... | CWE-310 | null | null |
12,374 | int tls1_enc(SSL *s, int send)
{
SSL3_RECORD *rec;
EVP_CIPHER_CTX *ds;
unsigned long l;
int bs,i,j,k,pad=0,ret,mac_size=0;
const EVP_CIPHER *enc;
if (send)
{
if (EVP_MD_CTX_md(s->write_hash))
{
int n=EVP_MD_CTX_size(s->write_hash);
OPENSSL_assert(n >= 0);
}
ds=s->enc_write_ctx;
rec= &(s->s3-... | DoS | 0 | int tls1_enc(SSL *s, int send)
{
SSL3_RECORD *rec;
EVP_CIPHER_CTX *ds;
unsigned long l;
int bs,i,j,k,pad=0,ret,mac_size=0;
const EVP_CIPHER *enc;
if (send)
{
if (EVP_MD_CTX_md(s->write_hash))
{
int n=EVP_MD_CTX_size(s->write_hash);
OPENSSL_assert(n >= 0);
}
ds=s->enc_write_ctx;
rec= &(s->s3-... | @@ -414,15 +414,20 @@ int tls1_change_cipher_state(SSL *s, int which)
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
else
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
- if (s->enc_write_ctx != NULL)
+ if (s->enc_write... | CWE-310 | null | null |
12,375 | int tls1_final_finish_mac(SSL *s,
const char *str, int slen, unsigned char *out)
{
unsigned int i;
EVP_MD_CTX ctx;
unsigned char buf[2*EVP_MAX_MD_SIZE];
unsigned char *q,buf2[12];
int idx;
long mask;
int err=0;
const EVP_MD *md;
q=buf;
if (s->s3->handshake_buffer)
if (!ssl3_digest_cached_records(... | DoS | 0 | int tls1_final_finish_mac(SSL *s,
const char *str, int slen, unsigned char *out)
{
unsigned int i;
EVP_MD_CTX ctx;
unsigned char buf[2*EVP_MAX_MD_SIZE];
unsigned char *q,buf2[12];
int idx;
long mask;
int err=0;
const EVP_MD *md;
q=buf;
if (s->s3->handshake_buffer)
if (!ssl3_digest_cached_records(... | @@ -414,15 +414,20 @@ int tls1_change_cipher_state(SSL *s, int which)
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
else
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
- if (s->enc_write_ctx != NULL)
+ if (s->enc_write... | CWE-310 | null | null |
12,376 | static int tls1_generate_key_block(SSL *s, unsigned char *km,
unsigned char *tmp, int num)
{
int ret;
ret = tls1_PRF(ssl_get_algorithm2(s),
TLS_MD_KEY_EXPANSION_CONST,TLS_MD_KEY_EXPANSION_CONST_SIZE,
s->s3->server_random,SSL3_RANDOM_SIZE,
s->s3->client_random,SSL3_RANDOM_SIZE,
NULL,0,NULL,0,
s->... | DoS | 0 | static int tls1_generate_key_block(SSL *s, unsigned char *km,
unsigned char *tmp, int num)
{
int ret;
ret = tls1_PRF(ssl_get_algorithm2(s),
TLS_MD_KEY_EXPANSION_CONST,TLS_MD_KEY_EXPANSION_CONST_SIZE,
s->s3->server_random,SSL3_RANDOM_SIZE,
s->s3->client_random,SSL3_RANDOM_SIZE,
NULL,0,NULL,0,
s->... | @@ -414,15 +414,20 @@ int tls1_change_cipher_state(SSL *s, int which)
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
else
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
- if (s->enc_write_ctx != NULL)
+ if (s->enc_write... | CWE-310 | null | null |
12,377 | int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p,
int len)
{
unsigned char buff[SSL_MAX_MASTER_KEY_LENGTH];
const void *co = NULL, *so = NULL;
int col = 0, sol = 0;
#ifdef KSSL_DEBUG
printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", s,out, p,len);
#endif /* KSSL_DEBUG */
... | DoS | 0 | int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p,
int len)
{
unsigned char buff[SSL_MAX_MASTER_KEY_LENGTH];
const void *co = NULL, *so = NULL;
int col = 0, sol = 0;
#ifdef KSSL_DEBUG
printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", s,out, p,len);
#endif /* KSSL_DEBUG */
... | @@ -414,15 +414,20 @@ int tls1_change_cipher_state(SSL *s, int which)
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
else
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
- if (s->enc_write_ctx != NULL)
+ if (s->enc_write... | CWE-310 | null | null |
12,378 | int tls1_mac(SSL *ssl, unsigned char *md, int send)
{
SSL3_RECORD *rec;
unsigned char *seq;
EVP_MD_CTX *hash;
size_t md_size, orig_len;
int i;
EVP_MD_CTX hmac, *mac_ctx;
unsigned char header[13];
int stream_mac = (send?(ssl->mac_flags & SSL_MAC_FLAG_WRITE_MAC_STREAM):(ssl->mac_flags&SSL_MAC_FLAG_READ_MAC_STREA... | DoS | 0 | int tls1_mac(SSL *ssl, unsigned char *md, int send)
{
SSL3_RECORD *rec;
unsigned char *seq;
EVP_MD_CTX *hash;
size_t md_size, orig_len;
int i;
EVP_MD_CTX hmac, *mac_ctx;
unsigned char header[13];
int stream_mac = (send?(ssl->mac_flags & SSL_MAC_FLAG_WRITE_MAC_STREAM):(ssl->mac_flags&SSL_MAC_FLAG_READ_MAC_STREA... | @@ -414,15 +414,20 @@ int tls1_change_cipher_state(SSL *s, int which)
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
else
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
- if (s->enc_write_ctx != NULL)
+ if (s->enc_write... | CWE-310 | null | null |
12,379 | __imlib_RenderDisconnect(Display * d)
{
if (d != disp)
return;
disp = NULL;
gc = gcm = NULL;
last_depth = 0;
}
| DoS Overflow | 0 | __imlib_RenderDisconnect(Display * d)
{
if (d != disp)
return;
disp = NULL;
gc = gcm = NULL;
last_depth = 0;
}
| @@ -16,10 +16,6 @@
#include "scale.h"
#include "ximage.h"
-/* The maximum pixmap dimension is 65535. */
-/* However, for now, use 46340 (46340^2 < 2^31) to avoid buffer overflow issues. */
-#define X_MAX_DIM 46340
-
/* size of the lines per segment we scale / render at a time */
#define LINESIZE 16 | null | null | null |
12,380 | __imlib_RenderImage(Display * d, ImlibImage * im,
Drawable w, Drawable m,
Visual * v, Colormap cm, int depth,
int sx, int sy, int sw, int sh,
int dx, int dy, int dw, int dh,
char antialias, char hiq, char blend, char dit... | DoS Overflow | 0 | __imlib_RenderImage(Display * d, ImlibImage * im,
Drawable w, Drawable m,
Visual * v, Colormap cm, int depth,
int sx, int sy, int sw, int sh,
int dx, int dy, int dw, int dh,
char antialias, char hiq, char blend, char dit... | @@ -16,10 +16,6 @@
#include "scale.h"
#include "ximage.h"
-/* The maximum pixmap dimension is 65535. */
-/* However, for now, use 46340 (46340^2 < 2^31) to avoid buffer overflow issues. */
-#define X_MAX_DIM 46340
-
/* size of the lines per segment we scale / render at a time */
#define LINESIZE 16 | null | null | null |
12,381 | __imlib_generic_render(DATA32 * src, int jump, int w, int h, int dx, int dy,
XImage * xim, Visual * v, Context * ct)
{
int x, y, hh;
unsigned int r, g, b, val;
unsigned int rmask, gmask, bmask;
int i, rshift, gshift, bshift;
static con... | DoS Overflow | 0 | __imlib_generic_render(DATA32 * src, int jump, int w, int h, int dx, int dy,
XImage * xim, Visual * v, Context * ct)
{
int x, y, hh;
unsigned int r, g, b, val;
unsigned int rmask, gmask, bmask;
int i, rshift, gshift, bshift;
static con... | @@ -16,10 +16,6 @@
#include "scale.h"
#include "ximage.h"
-/* The maximum pixmap dimension is 65535. */
-/* However, for now, use 46340 (46340^2 < 2^31) to avoid buffer overflow issues. */
-#define X_MAX_DIM 46340
-
/* size of the lines per segment we scale / render at a time */
#define LINESIZE 16 | null | null | null |
12,382 | _pixman_bits_image_dest_iter_init (pixman_image_t *image, pixman_iter_t *iter)
{
if (iter->iter_flags & ITER_NARROW)
{
if ((iter->iter_flags & (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) ==
(ITER_IGNORE_RGB | ITER_IGNORE_ALPHA))
{
iter->get_scanline = _pixman_iter_get_scanline_noop;
}
else
{
iter... | DoS Exec Code Overflow | 0 | _pixman_bits_image_dest_iter_init (pixman_image_t *image, pixman_iter_t *iter)
{
if (iter->iter_flags & ITER_NARROW)
{
if ((iter->iter_flags & (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) ==
(ITER_IGNORE_RGB | ITER_IGNORE_ALPHA))
{
iter->get_scanline = _pixman_iter_get_scanline_noop;
}
else
{
iter... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,383 | _pixman_bits_image_src_iter_init (pixman_image_t *image, pixman_iter_t *iter)
{
pixman_format_code_t format = image->common.extended_format_code;
uint32_t flags = image->common.flags;
const fetcher_info_t *info;
for (info = fetcher_info; info->format != PIXMAN_null; ++info)
{
if ((info->format == ... | DoS Exec Code Overflow | 0 | _pixman_bits_image_src_iter_init (pixman_image_t *image, pixman_iter_t *iter)
{
pixman_format_code_t format = image->common.extended_format_code;
uint32_t flags = image->common.flags;
const fetcher_info_t *info;
for (info = fetcher_info; info->format != PIXMAN_null; ++info)
{
if ((info->format == ... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,384 | _pixman_image_get_scanline_generic_float (pixman_iter_t * iter,
const uint32_t *mask)
{
pixman_iter_get_scanline_t fetch_32 = iter->data;
uint32_t *buffer = iter->buffer;
fetch_32 (iter, NULL);
pixman_expand_to_float ((argb_t *)buffer, buffer, PIXMAN_a8r8g8b8, iter->width);
return iter->bu... | DoS Exec Code Overflow | 0 | _pixman_image_get_scanline_generic_float (pixman_iter_t * iter,
const uint32_t *mask)
{
pixman_iter_get_scanline_t fetch_32 = iter->data;
uint32_t *buffer = iter->buffer;
fetch_32 (iter, NULL);
pixman_expand_to_float ((argb_t *)buffer, buffer, PIXMAN_a8r8g8b8, iter->width);
return iter->bu... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,385 | bits_image_fetch_affine_no_alpha (pixman_iter_t * iter,
const uint32_t * mask)
{
pixman_image_t *image = iter->image;
int offset = iter->x;
int line = iter->y++;
int width = iter->width;
uint32_t * buffer = iter->buffer;
pixman_fixed_t x, y;
... | DoS Exec Code Overflow | 0 | bits_image_fetch_affine_no_alpha (pixman_iter_t * iter,
const uint32_t * mask)
{
pixman_image_t *image = iter->image;
int offset = iter->x;
int line = iter->y++;
int width = iter->width;
uint32_t * buffer = iter->buffer;
pixman_fixed_t x, y;
... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,386 | bits_image_fetch_pixel_convolution (bits_image_t *image,
pixman_fixed_t x,
pixman_fixed_t y,
get_pixel_t get_pixel)
{
pixman_fixed_t *params = image->common.filter_params;
int x_off = (params[0] - pixman_fixed_1) >> 1;
int y_off = (params[1] - pixman_fixed_1) >> 1;
int32_... | DoS Exec Code Overflow | 0 | bits_image_fetch_pixel_convolution (bits_image_t *image,
pixman_fixed_t x,
pixman_fixed_t y,
get_pixel_t get_pixel)
{
pixman_fixed_t *params = image->common.filter_params;
int x_off = (params[0] - pixman_fixed_1) >> 1;
int y_off = (params[1] - pixman_fixed_1) >> 1;
int32_... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,387 | bits_image_fetch_pixel_filtered (bits_image_t *image,
pixman_fixed_t x,
pixman_fixed_t y,
get_pixel_t get_pixel)
{
switch (image->common.filter)
{
case PIXMAN_FILTER_NEAREST:
case PIXMAN_FILTER_FAST:
return bits_image_fetch_pixel_nearest (image, x, y, get_pixel);
break;
case PIX... | DoS Exec Code Overflow | 0 | bits_image_fetch_pixel_filtered (bits_image_t *image,
pixman_fixed_t x,
pixman_fixed_t y,
get_pixel_t get_pixel)
{
switch (image->common.filter)
{
case PIXMAN_FILTER_NEAREST:
case PIXMAN_FILTER_FAST:
return bits_image_fetch_pixel_nearest (image, x, y, get_pixel);
break;
case PIX... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,388 | bits_image_fetch_pixel_nearest (bits_image_t *image,
pixman_fixed_t x,
pixman_fixed_t y,
get_pixel_t get_pixel)
{
int x0 = pixman_fixed_to_int (x - pixman_fixed_e);
int y0 = pixman_fixed_to_int (y - pixman_fixed_e);
if (image->common.repeat != PIXMAN_REPEAT_NONE)
{
repeat (image->commo... | DoS Exec Code Overflow | 0 | bits_image_fetch_pixel_nearest (bits_image_t *image,
pixman_fixed_t x,
pixman_fixed_t y,
get_pixel_t get_pixel)
{
int x0 = pixman_fixed_to_int (x - pixman_fixed_e);
int y0 = pixman_fixed_to_int (y - pixman_fixed_e);
if (image->common.repeat != PIXMAN_REPEAT_NONE)
{
repeat (image->commo... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,389 | bits_image_fetch_pixel_separable_convolution (bits_image_t *image,
pixman_fixed_t x,
pixman_fixed_t y,
get_pixel_t get_pixel)
{
pixman_fixed_t *params = image->common.filter_p... | DoS Exec Code Overflow | 0 | bits_image_fetch_pixel_separable_convolution (bits_image_t *image,
pixman_fixed_t x,
pixman_fixed_t y,
get_pixel_t get_pixel)
{
pixman_fixed_t *params = image->common.filter_p... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,390 | bits_image_fetch_untransformed_32 (pixman_iter_t * iter,
const uint32_t *mask)
{
pixman_image_t *image = iter->image;
int x = iter->x;
int y = iter->y;
int width = iter->width;
uint32_t * buffer = iter->buffer;
if (image->common.repeat... | DoS Exec Code Overflow | 0 | bits_image_fetch_untransformed_32 (pixman_iter_t * iter,
const uint32_t *mask)
{
pixman_image_t *image = iter->image;
int x = iter->x;
int y = iter->y;
int width = iter->width;
uint32_t * buffer = iter->buffer;
if (image->common.repeat... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,391 | bits_image_fetch_untransformed_repeat_none (bits_image_t *image,
pixman_bool_t wide,
int x,
int y,
int width,
... | DoS Exec Code Overflow | 0 | bits_image_fetch_untransformed_repeat_none (bits_image_t *image,
pixman_bool_t wide,
int x,
int y,
int width,
... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,392 | bits_image_fetch_untransformed_repeat_normal (bits_image_t *image,
pixman_bool_t wide,
int x,
int y,
int w... | DoS Exec Code Overflow | 0 | bits_image_fetch_untransformed_repeat_normal (bits_image_t *image,
pixman_bool_t wide,
int x,
int y,
int w... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,393 | bits_image_property_changed (pixman_image_t *image)
{
_pixman_bits_image_setup_accessors (&image->bits);
}
| DoS Exec Code Overflow | 0 | bits_image_property_changed (pixman_image_t *image)
{
_pixman_bits_image_setup_accessors (&image->bits);
}
| @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,394 | dest_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask)
{
pixman_image_t *image = iter->image;
int x = iter->x;
int y = iter->y;
int width = iter->width;
uint32_t * buffer = iter->buffer;
image->bits.fetch_scanline_32 (&image->bit... | DoS Exec Code Overflow | 0 | dest_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask)
{
pixman_image_t *image = iter->image;
int x = iter->x;
int y = iter->y;
int width = iter->width;
uint32_t * buffer = iter->buffer;
image->bits.fetch_scanline_32 (&image->bit... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,395 | dest_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask)
{
bits_image_t * image = &iter->image->bits;
int x = iter->x;
int y = iter->y;
int width = iter->width;
argb_t * buffer = (argb_t *)iter->buffer;
image->fetch_scanline_float (... | DoS Exec Code Overflow | 0 | dest_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask)
{
bits_image_t * image = &iter->image->bits;
int x = iter->x;
int y = iter->y;
int width = iter->width;
argb_t * buffer = (argb_t *)iter->buffer;
image->fetch_scanline_float (... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,396 | dest_write_back_narrow (pixman_iter_t *iter)
{
bits_image_t * image = &iter->image->bits;
int x = iter->x;
int y = iter->y;
int width = iter->width;
const uint32_t *buffer = iter->buffer;
image->store_scanline_32 (image, x, y, width, buffer);
... | DoS Exec Code Overflow | 0 | dest_write_back_narrow (pixman_iter_t *iter)
{
bits_image_t * image = &iter->image->bits;
int x = iter->x;
int y = iter->y;
int width = iter->width;
const uint32_t *buffer = iter->buffer;
image->store_scanline_32 (image, x, y, width, buffer);
... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,397 | dest_write_back_wide (pixman_iter_t *iter)
{
bits_image_t * image = &iter->image->bits;
int x = iter->x;
int y = iter->y;
int width = iter->width;
const uint32_t *buffer = iter->buffer;
image->store_scanline_float (image, x, y, width, buffer);
... | DoS Exec Code Overflow | 0 | dest_write_back_wide (pixman_iter_t *iter)
{
bits_image_t * image = &iter->image->bits;
int x = iter->x;
int y = iter->y;
int width = iter->width;
const uint32_t *buffer = iter->buffer;
image->store_scanline_float (image, x, y, width, buffer);
... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,398 | fetch_pixel_general (bits_image_t *image, int x, int y, pixman_bool_t check_bounds)
{
uint32_t pixel;
if (check_bounds &&
(x < 0 || x >= image->width || y < 0 || y >= image->height))
{
return 0;
}
pixel = image->fetch_pixel_32 (image, x, y);
if (image->common.alpha_map)
{
uint32_t pixe... | DoS Exec Code Overflow | 0 | fetch_pixel_general (bits_image_t *image, int x, int y, pixman_bool_t check_bounds)
{
uint32_t pixel;
if (check_bounds &&
(x < 0 || x >= image->width || y < 0 || y >= image->height))
{
return 0;
}
pixel = image->fetch_pixel_32 (image, x, y);
if (image->common.alpha_map)
{
uint32_t pixe... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
12,399 | pixman_image_create_bits (pixman_format_code_t format,
int width,
int height,
uint32_t * bits,
int rowstride_bytes)
{
return create_bits_image_internal... | DoS Exec Code Overflow | 0 | pixman_image_create_bits (pixman_format_code_t format,
int width,
int height,
uint32_t * bits,
int rowstride_bytes)
{
return create_bits_image_internal... | @@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format,
if (_pixman_multiply_overflows_size (height, stride))
return NULL;
- buf_size = height * stride;
+ buf_size = (size_t)height * stride;
if (rowstride_bytes)
*rowstride_bytes = stride; | CWE-189 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.