idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
1,600
static void vdi_port_unref_msg_to_client(SpiceCharDeviceMsgToClient *msg, void *opaque) { vdi_port_read_buf_unref(msg); }
DoS Overflow
0
static void vdi_port_unref_msg_to_client(SpiceCharDeviceMsgToClient *msg, void *opaque) { vdi_port_read_buf_unref(msg); }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,601
PHP_FUNCTION(openssl_x509_check_private_key) { zval ** zcert, **zkey; X509 * cert = NULL; EVP_PKEY * key = NULL; long certresource = -1, keyresource = -1; RETVAL_FALSE; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZ", &zcert, &zkey) == FAILURE) { return; } cert = php_openssl_x509_from_zval(zcert, ...
null
0
PHP_FUNCTION(openssl_x509_check_private_key) { zval ** zcert, **zkey; X509 * cert = NULL; EVP_PKEY * key = NULL; long certresource = -1, keyresource = -1; RETVAL_FALSE; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZ", &zcert, &zkey) == FAILURE) { return; } cert = php_openssl_x509_from_zval(zcert, ...
@@ -1398,6 +1398,74 @@ PHP_FUNCTION(openssl_x509_check_private_key) } /* }}} */ +/* Special handling of subjectAltName, see CVE-2013-4073 + * Christian Heimes + */ + +static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension) +{ + GENERAL_NAMES *names; + const X509V3_EXT_METHOD *metho...
CWE-20
null
null
1,602
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...
@@ -1398,6 +1398,74 @@ PHP_FUNCTION(openssl_x509_check_private_key) } /* }}} */ +/* Special handling of subjectAltName, see CVE-2013-4073 + * Christian Heimes + */ + +static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension) +{ + GENERAL_NAMES *names; + const X509V3_EXT_METHOD *metho...
CWE-20
null
null
1,603
static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr TSRMLS_DC) /* {{{ */ { /* This is how the time string is formatted: snprintf(p, sizeof(p), "%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); */ time_t ret; struct tm thetime; char * strbuf; c...
null
0
static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr TSRMLS_DC) /* {{{ */ { /* This is how the time string is formatted: snprintf(p, sizeof(p), "%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); */ time_t ret; struct tm thetime; char * strbuf; c...
@@ -1398,6 +1398,74 @@ PHP_FUNCTION(openssl_x509_check_private_key) } /* }}} */ +/* Special handling of subjectAltName, see CVE-2013-4073 + * Christian Heimes + */ + +static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension) +{ + GENERAL_NAMES *names; + const X509V3_EXT_METHOD *metho...
CWE-20
null
null
1,604
static int php_openssl_load_rand_file(const char * file, int *egdsocket, int *seeded TSRMLS_DC) /* {{{ */ { char buffer[MAXPATHLEN]; *egdsocket = 0; *seeded = 0; if (file == NULL) { file = RAND_file_name(buffer, sizeof(buffer)); } else if (RAND_egd(file) > 0) { /* if the given filename is an EGD socket, don'...
null
0
static int php_openssl_load_rand_file(const char * file, int *egdsocket, int *seeded TSRMLS_DC) /* {{{ */ { char buffer[MAXPATHLEN]; *egdsocket = 0; *seeded = 0; if (file == NULL) { file = RAND_file_name(buffer, sizeof(buffer)); } else if (RAND_egd(file) > 0) { /* if the given filename is an EGD socket, don'...
@@ -1398,6 +1398,74 @@ PHP_FUNCTION(openssl_x509_check_private_key) } /* }}} */ +/* Special handling of subjectAltName, see CVE-2013-4073 + * Christian Heimes + */ + +static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension) +{ + GENERAL_NAMES *names; + const X509V3_EXT_METHOD *metho...
CWE-20
null
null
1,605
inline static int php_openssl_open_base_dir_chk(char *filename TSRMLS_DC) { if (php_check_open_basedir(filename TSRMLS_CC)) { return -1; } return 0; }
null
0
inline static int php_openssl_open_base_dir_chk(char *filename TSRMLS_DC) { if (php_check_open_basedir(filename TSRMLS_CC)) { return -1; } return 0; }
@@ -1398,6 +1398,74 @@ PHP_FUNCTION(openssl_x509_check_private_key) } /* }}} */ +/* Special handling of subjectAltName, see CVE-2013-4073 + * Christian Heimes + */ + +static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension) +{ + GENERAL_NAMES *names; + const X509V3_EXT_METHOD *metho...
CWE-20
null
null
1,606
static int php_openssl_parse_config(struct php_x509_request * req, zval * optional_args TSRMLS_DC) /* {{{ */ { char * str; zval ** item; SET_OPTIONAL_STRING_ARG("config", req->config_filename, default_ssl_conf_filename); SET_OPTIONAL_STRING_ARG("config_section_name", req->section_name, "req"); req->global_config ...
null
0
static int php_openssl_parse_config(struct php_x509_request * req, zval * optional_args TSRMLS_DC) /* {{{ */ { char * str; zval ** item; SET_OPTIONAL_STRING_ARG("config", req->config_filename, default_ssl_conf_filename); SET_OPTIONAL_STRING_ARG("config_section_name", req->section_name, "req"); req->global_config ...
@@ -1398,6 +1398,74 @@ PHP_FUNCTION(openssl_x509_check_private_key) } /* }}} */ +/* Special handling of subjectAltName, see CVE-2013-4073 + * Christian Heimes + */ + +static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension) +{ + GENERAL_NAMES *names; + const X509V3_EXT_METHOD *metho...
CWE-20
null
null
1,607
static X509 * php_openssl_x509_from_zval(zval ** val, int makeresource, long * resourceval TSRMLS_DC) { X509 *cert = NULL; if (resourceval) { *resourceval = -1; } if (Z_TYPE_PP(val) == IS_RESOURCE) { /* is it an x509 resource ? */ void * what; int type; what = zend_fetch_resource(val TSRMLS_CC, -1, "Ope...
null
0
static X509 * php_openssl_x509_from_zval(zval ** val, int makeresource, long * resourceval TSRMLS_DC) { X509 *cert = NULL; if (resourceval) { *resourceval = -1; } if (Z_TYPE_PP(val) == IS_RESOURCE) { /* is it an x509 resource ? */ void * what; int type; what = zend_fetch_resource(val TSRMLS_CC, -1, "Ope...
@@ -1398,6 +1398,74 @@ PHP_FUNCTION(openssl_x509_check_private_key) } /* }}} */ +/* Special handling of subjectAltName, see CVE-2013-4073 + * Christian Heimes + */ + +static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension) +{ + GENERAL_NAMES *names; + const X509V3_EXT_METHOD *metho...
CWE-20
null
null
1,608
check_fstab(const char *progname, const char *mountpoint, const char *devname, char **options) { FILE *fstab; struct mntent *mnt; /* make sure this mount is listed in /etc/fstab */ fstab = setmntent(_PATH_MNTTAB, "r"); if (!fstab) { fprintf(stderr, "Couldn't open %s for reading!\n", _PATH_MNTTAB); return...
DoS
0
check_fstab(const char *progname, const char *mountpoint, const char *devname, char **options) { FILE *fstab; struct mntent *mnt; /* make sure this mount is listed in /etc/fstab */ fstab = setmntent(_PATH_MNTTAB, "r"); if (!fstab) { fprintf(stderr, "Couldn't open %s for reading!\n", _PATH_MNTTAB); return...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,609
static int check_newline(const char *progname, const char *name) { const char *s; for (s = "\n"; *s; s++) { if (strchr(name, *s)) { fprintf(stderr, "%s: illegal character 0x%02x in mount entry\n", progname, *s); return EX_USAGE; } } return 0; }
DoS
0
static int check_newline(const char *progname, const char *name) { const char *s; for (s = "\n"; *s; s++) { if (strchr(name, *s)) { fprintf(stderr, "%s: illegal character 0x%02x in mount entry\n", progname, *s); return EX_USAGE; } } return 0; }
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,610
static int check_setuid(void) { if (geteuid()) { fprintf(stderr, "This program is not installed setuid root - " " \"user\" CIFS mounts not supported.\n"); return EX_USAGE; } #if CIFS_DISABLE_SETUID_CAPABILITY if (getuid() && !geteuid()) { printf("This mount.cifs program has been built with the " "...
DoS
0
static int check_setuid(void) { if (geteuid()) { fprintf(stderr, "This program is not installed setuid root - " " \"user\" CIFS mounts not supported.\n"); return EX_USAGE; } #if CIFS_DISABLE_SETUID_CAPABILITY if (getuid() && !geteuid()) { printf("This mount.cifs program has been built with the " "...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,611
drop_capabilities(int parent) { capng_setpid(getpid()); capng_clear(CAPNG_SELECT_BOTH); if (parent) { if (capng_updatev(CAPNG_ADD, CAPNG_PERMITTED, CAP_DAC_READ_SEARCH, CAP_DAC_OVERRIDE, -1)) { fprintf(stderr, "Unable to update capability set.\n"); return EX_SYSERR; } if (capng_update(CAPNG_ADD, CAPNG_PE...
DoS
0
drop_capabilities(int parent) { capng_setpid(getpid()); capng_clear(CAPNG_SELECT_BOTH); if (parent) { if (capng_updatev(CAPNG_ADD, CAPNG_PERMITTED, CAP_DAC_READ_SEARCH, CAP_DAC_OVERRIDE, -1)) { fprintf(stderr, "Unable to update capability set.\n"); return EX_SYSERR; } if (capng_update(CAPNG_ADD, CAPNG_PE...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,612
drop_capabilities(int parent) { int rc, ncaps; cap_t caps; cap_value_t cap_list[3]; rc = prune_bounding_set(); if (rc) return rc; caps = cap_get_proc(); if (caps == NULL) { fprintf(stderr, "Unable to get current capability set: %s\n", strerror(errno)); return EX_SYSERR; } if (cap_clear(caps) == -1)...
DoS
0
drop_capabilities(int parent) { int rc, ncaps; cap_t caps; cap_value_t cap_list[3]; rc = prune_bounding_set(); if (rc) return rc; caps = cap_get_proc(); if (caps == NULL) { fprintf(stderr, "Unable to get current capability set: %s\n", strerror(errno)); return EX_SYSERR; } if (cap_clear(caps) == -1)...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,613
get_password_from_file(int file_descript, char *filename, struct parsed_mount_info *parsed_info) { int rc = 0; char buf[sizeof(parsed_info->password) + 1]; if (filename != NULL) { rc = toggle_dac_capability(0, 1); if (rc) return rc; rc = access(filename, R_OK); if (rc) { fprintf(stderr, ...
DoS
0
get_password_from_file(int file_descript, char *filename, struct parsed_mount_info *parsed_info) { int rc = 0; char buf[sizeof(parsed_info->password) + 1]; if (filename != NULL) { rc = toggle_dac_capability(0, 1); if (rc) return rc; rc = access(filename, R_OK); if (rc) { fprintf(stderr, ...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,614
static int get_pw_from_env(struct parsed_mount_info *parsed_info) { int rc = 0; if (getenv("PASSWD")) rc = set_password(parsed_info, getenv("PASSWD")); else if (getenv("PASSWD_FD")) rc = get_password_from_file(atoi(getenv("PASSWD_FD")), NULL, parsed_info); else if (getenv("PASSWD_FILE")) rc = get_pa...
DoS
0
static int get_pw_from_env(struct parsed_mount_info *parsed_info) { int rc = 0; if (getenv("PASSWD")) rc = set_password(parsed_info, getenv("PASSWD")); else if (getenv("PASSWD_FD")) rc = get_password_from_file(atoi(getenv("PASSWD_FD")), NULL, parsed_info); else if (getenv("PASSWD_FILE")) rc = get_pa...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,615
static char *getusername(uid_t uid) { char *username = NULL; struct passwd *password = getpwuid(uid); if (password) username = password->pw_name; return username; }
DoS
0
static char *getusername(uid_t uid) { char *username = NULL; struct passwd *password = getpwuid(uid); if (password) username = password->pw_name; return username; }
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,616
static int mount_cifs_usage(FILE * stream) { fprintf(stream, "\nUsage: %s <remotetarget> <dir> -o <options>\n", thisprogram); fprintf(stream, "\nMount the remote target, specified as a UNC name,"); fprintf(stream, " to a local directory.\n\nOptions:\n"); fprintf(stream, "\tuser=<arg>\n\tpass=<arg>\n\tdom=<arg>\n...
DoS
0
static int mount_cifs_usage(FILE * stream) { fprintf(stream, "\nUsage: %s <remotetarget> <dir> -o <options>\n", thisprogram); fprintf(stream, "\nMount the remote target, specified as a UNC name,"); fprintf(stream, " to a local directory.\n\nOptions:\n"); fprintf(stream, "\tuser=<arg>\n\tpass=<arg>\n\tdom=<arg>\n...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,617
static int mount_smb2_usage(FILE *stream) { fprintf(stream, "\nUsage: %s <remotetarget> <dir> -o <options>\n", thisprogram); fprintf(stream, "\nMount the remote target, specified as a UNC name,"); fprintf(stream, " to a local directory.\n\nOptions:\n"); fprintf(stream, "\tuser=<arg>\n\tpass=<arg>\n\tdom=<arg>\n"...
DoS
0
static int mount_smb2_usage(FILE *stream) { fprintf(stream, "\nUsage: %s <remotetarget> <dir> -o <options>\n", thisprogram); fprintf(stream, "\nMount the remote target, specified as a UNC name,"); fprintf(stream, " to a local directory.\n\nOptions:\n"); fprintf(stream, "\tuser=<arg>\n\tpass=<arg>\n\tdom=<arg>\n"...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,618
static void null_terminate_endl(char *source) { char *newline = strchr(source, '\n'); if (newline) *newline = '\0'; }
DoS
0
static void null_terminate_endl(char *source) { char *newline = strchr(source, '\n'); if (newline) *newline = '\0'; }
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,619
static int open_cred_file(char *file_name, struct parsed_mount_info *parsed_info) { char *line_buf = NULL; char *temp_val = NULL; FILE *fs = NULL; int i; const int line_buf_size = 4096; const int min_non_white = 10; i = toggle_dac_capability(0, 1); if (i) goto return_i; i = access(file_name, R_OK); if ...
DoS
0
static int open_cred_file(char *file_name, struct parsed_mount_info *parsed_info) { char *line_buf = NULL; char *temp_val = NULL; FILE *fs = NULL; int i; const int line_buf_size = 4096; const int min_non_white = 10; i = toggle_dac_capability(0, 1); if (i) goto return_i; i = access(file_name, R_OK); if ...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,620
static int parse_cred_line(char *line, char **target) { if (line == NULL || target == NULL) goto parsing_err; /* position target at first char of value */ *target = strchr(line, '='); if (!*target) goto parsing_err; *target += 1; /* tell the caller which value target points to */ if (strncasecmp("user", li...
DoS
0
static int parse_cred_line(char *line, char **target) { if (line == NULL || target == NULL) goto parsing_err; /* position target at first char of value */ *target = strchr(line, '='); if (!*target) goto parsing_err; *target += 1; /* tell the caller which value target points to */ if (strncasecmp("user", li...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,621
static int parse_opt_token(const char *token) { if (token == NULL) return OPT_ERROR; if (strncmp(token, "users", 5) == 0) return OPT_USERS; if (strncmp(token, "user_xattr", 10) == 0) return OPT_USER_XATTR; if (strncmp(token, "user", 4) == 0) return OPT_USER; if (strncmp(token, "pass", 4) == 0) return OP...
DoS
0
static int parse_opt_token(const char *token) { if (token == NULL) return OPT_ERROR; if (strncmp(token, "users", 5) == 0) return OPT_USERS; if (strncmp(token, "user_xattr", 10) == 0) return OPT_USER_XATTR; if (strncmp(token, "user", 4) == 0) return OPT_USER; if (strncmp(token, "pass", 4) == 0) return OP...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,622
parse_options(const char *data, struct parsed_mount_info *parsed_info) { char *value = NULL; char *equals = NULL; char *next_keyword = NULL; char *out = parsed_info->options; unsigned long *filesys_flags = &parsed_info->flags; int out_len = 0; int word_len; int rc = 0; int got_uid = 0; int got_cruid = 0; int...
DoS
0
parse_options(const char *data, struct parsed_mount_info *parsed_info) { char *value = NULL; char *equals = NULL; char *next_keyword = NULL; char *out = parsed_info->options; unsigned long *filesys_flags = &parsed_info->flags; int out_len = 0; int word_len; int rc = 0; int got_uid = 0; int got_cruid = 0; int...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,623
static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_info) { int length = strnlen(unc_name, MAX_UNC_LEN); const char *host, *share, *prepath; size_t hostlen, sharelen, prepathlen; if (length > (MAX_UNC_LEN - 1)) { fprintf(stderr, "mount error: UNC name too long\n"); return EX_USAGE; } ...
DoS
0
static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_info) { int length = strnlen(unc_name, MAX_UNC_LEN); const char *host, *share, *prepath; size_t hostlen, sharelen, prepathlen; if (length > (MAX_UNC_LEN - 1)) { fprintf(stderr, "mount error: UNC name too long\n"); return EX_USAGE; } ...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,624
static int parse_username(char *rawuser, struct parsed_mount_info *parsed_info) { char *user, *password, slash; int rc = 0; /* everything after first % sign is a password */ password = strchr(rawuser, '%'); if (password) { rc = set_password(parsed_info, password + 1); if (rc) return rc; *password = '\0';...
DoS
0
static int parse_username(char *rawuser, struct parsed_mount_info *parsed_info) { char *user, *password, slash; int rc = 0; /* everything after first % sign is a password */ password = strchr(rawuser, '%'); if (password) { rc = set_password(parsed_info, password + 1); if (rc) return rc; *password = '\0';...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,625
static void print_cifs_mount_version(void) { printf("mount.cifs version: %s\n", VERSION); }
DoS
0
static void print_cifs_mount_version(void) { printf("mount.cifs version: %s\n", VERSION); }
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,626
prune_bounding_set(void) { int i, rc = 0; static int bounding_set_cleared; if (bounding_set_cleared) return 0; for (i = 0; i <= CAP_LAST_CAP && rc == 0; ++i) rc = prctl(PR_CAPBSET_DROP, i); if (rc != 0) { fprintf(stderr, "Unable to clear capability bounding set: %d\n", rc); return EX_SYSERR; } ++boun...
DoS
0
prune_bounding_set(void) { int i, rc = 0; static int bounding_set_cleared; if (bounding_set_cleared) return 0; for (i = 0; i <= CAP_LAST_CAP && rc == 0; ++i) rc = prctl(PR_CAPBSET_DROP, i); if (rc != 0) { fprintf(stderr, "Unable to clear capability bounding set: %d\n", rc); return EX_SYSERR; } ++boun...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,627
static int set_password(struct parsed_mount_info *parsed_info, const char *src) { char *dst = parsed_info->password; unsigned int i = 0, j = 0; while (src[i]) { if (src[i] == ',') dst[j++] = ','; dst[j++] = src[i++]; if (j > sizeof(parsed_info->password)) { fprintf(stderr, "Converted password too long!\...
DoS
0
static int set_password(struct parsed_mount_info *parsed_info, const char *src) { char *dst = parsed_info->password; unsigned int i = 0, j = 0; while (src[i]) { if (src[i] == ',') dst[j++] = ','; dst[j++] = src[i++]; if (j > sizeof(parsed_info->password)) { fprintf(stderr, "Converted password too long!\...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,628
toggle_dac_capability(int writable, int enable) { unsigned int capability = writable ? CAP_DAC_OVERRIDE : CAP_DAC_READ_SEARCH; if (capng_update(enable ? CAPNG_ADD : CAPNG_DROP, CAPNG_EFFECTIVE, capability)) { fprintf(stderr, "Unable to update capability set.\n"); return EX_SYSERR; } if (capng_apply(CAPNG_SELEC...
DoS
0
toggle_dac_capability(int writable, int enable) { unsigned int capability = writable ? CAP_DAC_OVERRIDE : CAP_DAC_READ_SEARCH; if (capng_update(enable ? CAPNG_ADD : CAPNG_DROP, CAPNG_EFFECTIVE, capability)) { fprintf(stderr, "Unable to update capability set.\n"); return EX_SYSERR; } if (capng_apply(CAPNG_SELEC...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,629
toggle_dac_capability(int writable, int enable) { int rc; cap_t caps; cap_value_t capability = writable ? CAP_DAC_OVERRIDE : CAP_DAC_READ_SEARCH; if (getuid() != 0) return 0; caps = cap_get_proc(); if (caps == NULL) { fprintf(stderr, "Unable to get current capability set: %s\n", strerror(errno)); retur...
DoS
0
toggle_dac_capability(int writable, int enable) { int rc; cap_t caps; cap_value_t capability = writable ? CAP_DAC_OVERRIDE : CAP_DAC_READ_SEARCH; if (getuid() != 0) return 0; caps = cap_get_proc(); if (caps == NULL) { fprintf(stderr, "Unable to get current capability set: %s\n", strerror(errno)); retur...
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,630
toggle_dac_capability(int writable, int enable) { return 0; }
DoS
0
toggle_dac_capability(int writable, int enable) { return 0; }
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,631
static int uppercase_string(char *string) { if (!string) return 1; while (*string) { /* check for unicode */ if ((unsigned char)string[0] & 0x80) return 0; *string = toupper((unsigned char)*string); string++; } return 1; }
DoS
0
static int uppercase_string(char *string) { if (!string) return 1; while (*string) { /* check for unicode */ if ((unsigned char)string[0] & 0x80) return 0; *string = toupper((unsigned char)*string); string++; } return 1; }
@@ -1419,8 +1419,7 @@ static int check_newline(const char *progname, const char *name) static int check_mtab(const char *progname, const char *devname, const char *dir) { - if (check_newline(progname, devname) == -1 || - check_newline(progname, dir) == -1) + if (check_newli...
CWE-20
null
null
1,632
static int do_nothing_handle_message(RedChannelClient *rcc, uint16_t type, uint32_t size, uint8_t *msg) { return TRUE; }
DoS
0
static int do_nothing_handle_message(RedChannelClient *rcc, uint16_t type, uint32_t size, uint8_t *msg) { return TRUE; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,633
static SpiceWatch *dummy_watch_add(int fd, int event_mask, SpiceWatchFunc func, void *opaque) { return NULL; // apparently allowed? }
DoS
0
static SpiceWatch *dummy_watch_add(int fd, int event_mask, SpiceWatchFunc func, void *opaque) { return NULL; // apparently allowed? }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,634
static void dummy_watch_remove(SpiceWatch *watch) { }
DoS
0
static void dummy_watch_remove(SpiceWatch *watch) { }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,635
static void dummy_watch_update_mask(SpiceWatch *watch, int event_mask) { }
DoS
0
static void dummy_watch_update_mask(SpiceWatch *watch, int event_mask) { }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,636
static uint32_t full_header_get_msg_size(SpiceDataHeaderOpaque *header) { return ((SpiceDataHeader *)header->data)->size; }
DoS
0
static uint32_t full_header_get_msg_size(SpiceDataHeaderOpaque *header) { return ((SpiceDataHeader *)header->data)->size; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,637
static uint16_t full_header_get_msg_type(SpiceDataHeaderOpaque *header) { return ((SpiceDataHeader *)header->data)->type; }
DoS
0
static uint16_t full_header_get_msg_type(SpiceDataHeaderOpaque *header) { return ((SpiceDataHeader *)header->data)->type; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,638
static void full_header_set_msg_type(SpiceDataHeaderOpaque *header, uint16_t type) { ((SpiceDataHeader *)header->data)->type = type; }
DoS
0
static void full_header_set_msg_type(SpiceDataHeaderOpaque *header, uint16_t type) { ((SpiceDataHeader *)header->data)->type = type; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,639
static uint32_t mini_header_get_msg_size(SpiceDataHeaderOpaque *header) { return ((SpiceMiniDataHeader *)header->data)->size; }
DoS
0
static uint32_t mini_header_get_msg_size(SpiceDataHeaderOpaque *header) { return ((SpiceMiniDataHeader *)header->data)->size; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,640
static uint16_t mini_header_get_msg_type(SpiceDataHeaderOpaque *header) { return ((SpiceMiniDataHeader *)header->data)->type; }
DoS
0
static uint16_t mini_header_get_msg_type(SpiceDataHeaderOpaque *header) { return ((SpiceMiniDataHeader *)header->data)->type; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,641
static void mini_header_set_msg_serial(SpiceDataHeaderOpaque *header, uint64_t serial) { spice_error("attempt to set header serial on mini header"); }
DoS
0
static void mini_header_set_msg_serial(SpiceDataHeaderOpaque *header, uint64_t serial) { spice_error("attempt to set header serial on mini header"); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,642
static void mini_header_set_msg_size(SpiceDataHeaderOpaque *header, uint32_t size) { ((SpiceMiniDataHeader *)header->data)->size = size; }
DoS
0
static void mini_header_set_msg_size(SpiceDataHeaderOpaque *header, uint32_t size) { ((SpiceMiniDataHeader *)header->data)->size = size; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,643
static void mini_header_set_msg_sub_list(SpiceDataHeaderOpaque *header, uint32_t sub_list) { spice_error("attempt to set header sub list on mini header"); }
DoS
0
static void mini_header_set_msg_sub_list(SpiceDataHeaderOpaque *header, uint32_t sub_list) { spice_error("attempt to set header sub list on mini header"); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,644
static void mini_header_set_msg_type(SpiceDataHeaderOpaque *header, uint16_t type) { ((SpiceMiniDataHeader *)header->data)->type = type; }
DoS
0
static void mini_header_set_msg_type(SpiceDataHeaderOpaque *header, uint16_t type) { ((SpiceMiniDataHeader *)header->data)->type = type; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,645
static void red_channel_add_client(RedChannel *channel, RedChannelClient *rcc) { spice_assert(rcc); ring_add(&channel->clients, &rcc->channel_link); channel->clients_num++; }
DoS
0
static void red_channel_add_client(RedChannel *channel, RedChannelClient *rcc) { spice_assert(rcc); ring_add(&channel->clients, &rcc->channel_link); channel->clients_num++; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,646
int red_channel_all_blocked(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; if (!channel || channel->clients_num == 0) { return FALSE; } RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); if (!rcc->send_data.b...
DoS
0
int red_channel_all_blocked(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; if (!channel || channel->clients_num == 0) { return FALSE; } RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); if (!rcc->send_data.b...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,647
int red_channel_any_blocked(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); if (rcc->send_data.blocked) { return TRUE; } } return FALSE; }
DoS
0
int red_channel_any_blocked(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); if (rcc->send_data.blocked) { return TRUE; } } return FALSE; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,648
void red_channel_apply_clients(RedChannel *channel, channel_client_callback cb) { RingItem *link; RingItem *next; RedChannelClient *rcc; RING_FOREACH_SAFE(link, next, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); cb(rcc); } }
DoS
0
void red_channel_apply_clients(RedChannel *channel, channel_client_callback cb) { RingItem *link; RingItem *next; RedChannelClient *rcc; RING_FOREACH_SAFE(link, next, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); cb(rcc); } }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,649
void red_channel_apply_clients_data(RedChannel *channel, channel_client_callback_data cb, void *data) { RingItem *link; RingItem *next; RedChannelClient *rcc; RING_FOREACH_SAFE(link, next, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); cb(rcc, data);...
DoS
0
void red_channel_apply_clients_data(RedChannel *channel, channel_client_callback_data cb, void *data) { RingItem *link; RingItem *next; RedChannelClient *rcc; RING_FOREACH_SAFE(link, next, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); cb(rcc, data);...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,650
void red_channel_client_ack_set_client_window(RedChannelClient *rcc, int client_window) { rcc->ack_data.client_window = client_window; }
DoS
0
void red_channel_client_ack_set_client_window(RedChannelClient *rcc, int client_window) { rcc->ack_data.client_window = client_window; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,651
void red_channel_client_begin_send_message(RedChannelClient *rcc) { SpiceMarshaller *m = rcc->send_data.marshaller; if (rcc->send_data.header.get_msg_type(&rcc->send_data.header) == 0) { spice_printerr("BUG: header->type == 0"); return; } /* canceling the latency test timer till the ne...
DoS
0
void red_channel_client_begin_send_message(RedChannelClient *rcc) { SpiceMarshaller *m = rcc->send_data.marshaller; if (rcc->send_data.header.get_msg_type(&rcc->send_data.header) == 0) { spice_printerr("BUG: header->type == 0"); return; } /* canceling the latency test timer till the ne...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,652
static void red_channel_client_cancel_ping_timer(RedChannelClient *rcc) { if (!rcc->latency_monitor.timer) { return; } if (rcc->latency_monitor.state != PING_STATE_TIMER) { return; } rcc->channel->core->timer_cancel(rcc->latency_monitor.timer); rcc->latency_monitor.state = PING_...
DoS
0
static void red_channel_client_cancel_ping_timer(RedChannelClient *rcc) { if (!rcc->latency_monitor.timer) { return; } if (rcc->latency_monitor.state != PING_STATE_TIMER) { return; } rcc->channel->core->timer_cancel(rcc->latency_monitor.timer); rcc->latency_monitor.state = PING_...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,653
void red_channel_client_clear_sent_item(RedChannelClient *rcc) { if (rcc->send_data.item) { red_channel_client_release_item(rcc, rcc->send_data.item, TRUE); rcc->send_data.item = NULL; } rcc->send_data.blocked = FALSE; rcc->send_data.size = 0; }
DoS
0
void red_channel_client_clear_sent_item(RedChannelClient *rcc) { if (rcc->send_data.item) { red_channel_client_release_item(rcc, rcc->send_data.item, TRUE); rcc->send_data.item = NULL; } rcc->send_data.blocked = FALSE; rcc->send_data.size = 0; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,654
RedChannelClient *red_channel_client_create(int size, RedChannel *channel, RedClient *client, RedsStream *stream, int monitor_latency, int num_common_caps, uint32_t *common_caps, ...
DoS
0
RedChannelClient *red_channel_client_create(int size, RedChannel *channel, RedClient *client, RedsStream *stream, int monitor_latency, int num_common_caps, uint32_t *common_caps, ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,655
RedChannelClient *red_channel_client_create_dummy(int size, RedChannel *channel, RedClient *client, int num_common_caps, uint32_t *common_caps, ...
DoS
0
RedChannelClient *red_channel_client_create_dummy(int size, RedChannel *channel, RedClient *client, int num_common_caps, uint32_t *common_caps, ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,656
static void red_channel_client_default_connect(RedChannel *channel, RedClient *client, RedsStream *stream, int migration, int num_common_caps, uint32_t *common_caps, ...
DoS
0
static void red_channel_client_default_connect(RedChannel *channel, RedClient *client, RedsStream *stream, int migration, int num_common_caps, uint32_t *common_caps, ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,657
static void red_channel_client_default_disconnect(RedChannelClient *base) { red_channel_client_disconnect(base); }
DoS
0
static void red_channel_client_default_disconnect(RedChannelClient *base) { red_channel_client_disconnect(base); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,658
void red_channel_client_default_migrate(RedChannelClient *rcc) { if (rcc->latency_monitor.timer) { red_channel_client_cancel_ping_timer(rcc); rcc->channel->core->timer_remove(rcc->latency_monitor.timer); rcc->latency_monitor.timer = NULL; } red_channel_client_pipe_add_type(rcc, PIPE_...
DoS
0
void red_channel_client_default_migrate(RedChannelClient *rcc) { if (rcc->latency_monitor.timer) { red_channel_client_cancel_ping_timer(rcc); rcc->channel->core->timer_remove(rcc->latency_monitor.timer); rcc->latency_monitor.timer = NULL; } red_channel_client_pipe_add_type(rcc, PIPE_...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,659
static void red_channel_client_default_peer_on_error(RedChannelClient *rcc) { red_channel_client_disconnect(rcc); }
DoS
0
static void red_channel_client_default_peer_on_error(RedChannelClient *rcc) { red_channel_client_disconnect(rcc); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,660
static void red_channel_client_destroy_remote_caps(RedChannelClient* rcc) { rcc->remote_caps.num_common_caps = 0; free(rcc->remote_caps.common_caps); rcc->remote_caps.num_caps = 0; free(rcc->remote_caps.caps); }
DoS
0
static void red_channel_client_destroy_remote_caps(RedChannelClient* rcc) { rcc->remote_caps.num_common_caps = 0; free(rcc->remote_caps.common_caps); rcc->remote_caps.num_caps = 0; free(rcc->remote_caps.caps); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,661
void red_channel_client_disconnect(RedChannelClient *rcc) { spice_printerr("%p (channel %p type %d id %d)", rcc, rcc->channel, rcc->channel->type, rcc->channel->id); if (rcc->dummy) { red_channel_client_disconnect_dummy(rcc); return; } if (...
DoS
0
void red_channel_client_disconnect(RedChannelClient *rcc) { spice_printerr("%p (channel %p type %d id %d)", rcc, rcc->channel, rcc->channel->type, rcc->channel->id); if (rcc->dummy) { red_channel_client_disconnect_dummy(rcc); return; } if (...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,662
static void red_channel_client_event(int fd, int event, void *data) { RedChannelClient *rcc = (RedChannelClient *)data; red_channel_client_ref(rcc); if (event & SPICE_WATCH_EVENT_READ) { red_channel_client_receive(rcc); } if (event & SPICE_WATCH_EVENT_WRITE) { red_channel_client_pus...
DoS
0
static void red_channel_client_event(int fd, int event, void *data) { RedChannelClient *rcc = (RedChannelClient *)data; red_channel_client_ref(rcc); if (event & SPICE_WATCH_EVENT_READ) { red_channel_client_receive(rcc); } if (event & SPICE_WATCH_EVENT_WRITE) { red_channel_client_pus...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,663
SpiceMarshaller *red_channel_client_get_marshaller(RedChannelClient *rcc) { return rcc->send_data.marshaller; }
DoS
0
SpiceMarshaller *red_channel_client_get_marshaller(RedChannelClient *rcc) { return rcc->send_data.marshaller; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,664
uint64_t red_channel_client_get_message_serial(RedChannelClient *rcc) { return rcc->send_data.serial; }
DoS
0
uint64_t red_channel_client_get_message_serial(RedChannelClient *rcc) { return rcc->send_data.serial; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,665
int red_channel_client_get_roundtrip_ms(RedChannelClient *rcc) { if (rcc->latency_monitor.roundtrip < 0) { return rcc->latency_monitor.roundtrip; } return rcc->latency_monitor.roundtrip / 1000 / 1000; }
DoS
0
int red_channel_client_get_roundtrip_ms(RedChannelClient *rcc) { if (rcc->latency_monitor.roundtrip < 0) { return rcc->latency_monitor.roundtrip; } return rcc->latency_monitor.roundtrip / 1000 / 1000; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,666
RedsStream *red_channel_client_get_stream(RedChannelClient *rcc) { return rcc->stream; }
DoS
0
RedsStream *red_channel_client_get_stream(RedChannelClient *rcc) { return rcc->stream; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,667
int red_channel_client_handle_message(RedChannelClient *rcc, uint32_t size, uint16_t type, void *message) { switch (type) { case SPICE_MSGC_ACK_SYNC: if (size != sizeof(uint32_t)) { spice_printerr("bad message size"); return FALSE; } ...
DoS
0
int red_channel_client_handle_message(RedChannelClient *rcc, uint32_t size, uint16_t type, void *message) { switch (type) { case SPICE_MSGC_ACK_SYNC: if (size != sizeof(uint32_t)) { spice_printerr("bad message size"); return FALSE; } ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,668
static void red_channel_client_init_outgoing_messages_window(RedChannelClient *rcc) { rcc->ack_data.messages_window = 0; red_channel_client_push(rcc); }
DoS
0
static void red_channel_client_init_outgoing_messages_window(RedChannelClient *rcc) { rcc->ack_data.messages_window = 0; red_channel_client_push(rcc); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,669
int red_channel_client_is_connected(RedChannelClient *rcc) { if (!rcc->dummy) { return rcc->stream != NULL; } else { return rcc->dummy_connected; } }
DoS
0
int red_channel_client_is_connected(RedChannelClient *rcc) { if (!rcc->dummy) { return rcc->stream != NULL; } else { return rcc->dummy_connected; } }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,670
int red_channel_client_no_item_being_sent(RedChannelClient *rcc) { return !rcc || (rcc->send_data.size == 0); }
DoS
0
int red_channel_client_no_item_being_sent(RedChannelClient *rcc) { return !rcc || (rcc->send_data.size == 0); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,671
static void red_channel_client_peer_on_out_block(void *opaque) { RedChannelClient *rcc = (RedChannelClient *)opaque; rcc->send_data.blocked = TRUE; rcc->channel->core->watch_update_mask(rcc->stream->watch, SPICE_WATCH_EVENT_READ | SP...
DoS
0
static void red_channel_client_peer_on_out_block(void *opaque) { RedChannelClient *rcc = (RedChannelClient *)opaque; rcc->send_data.blocked = TRUE; rcc->channel->core->watch_update_mask(rcc->stream->watch, SPICE_WATCH_EVENT_READ | SP...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,672
static void red_channel_client_peer_prepare_out_msg( void *opaque, struct iovec *vec, int *vec_size, int pos) { RedChannelClient *rcc = (RedChannelClient *)opaque; *vec_size = spice_marshaller_fill_iovec(rcc->send_data.marshaller, vec, IOV_MAX, pos); }
DoS
0
static void red_channel_client_peer_prepare_out_msg( void *opaque, struct iovec *vec, int *vec_size, int pos) { RedChannelClient *rcc = (RedChannelClient *)opaque; *vec_size = spice_marshaller_fill_iovec(rcc->send_data.marshaller, vec, IOV_MAX, pos); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,673
static void red_channel_client_ping_timer(void *opaque) { int so_unsent_size = 0; RedChannelClient *rcc = opaque; spice_assert(rcc->latency_monitor.state == PING_STATE_TIMER); red_channel_client_cancel_ping_timer(rcc); /* retrieving the occupied size of the socket's tcp snd buffer (unacked + unsent...
DoS
0
static void red_channel_client_ping_timer(void *opaque) { int so_unsent_size = 0; RedChannelClient *rcc = opaque; spice_assert(rcc->latency_monitor.state == PING_STATE_TIMER); red_channel_client_cancel_ping_timer(rcc); /* retrieving the occupied size of the socket's tcp snd buffer (unacked + unsent...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,674
void red_channel_client_pipe_add(RedChannelClient *rcc, PipeItem *item) { spice_assert(rcc && item); rcc->pipe_size++; ring_add(&rcc->pipe, &item->link); }
DoS
0
void red_channel_client_pipe_add(RedChannelClient *rcc, PipeItem *item) { spice_assert(rcc && item); rcc->pipe_size++; ring_add(&rcc->pipe, &item->link); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,675
void red_channel_client_pipe_add_after(RedChannelClient *rcc, PipeItem *item, PipeItem *pos) { spice_assert(rcc); spice_assert(pos); spice_assert(item); rcc->pipe_size++; ring_add_after(&item->link, &pos->link); }
DoS
0
void red_channel_client_pipe_add_after(RedChannelClient *rcc, PipeItem *item, PipeItem *pos) { spice_assert(rcc); spice_assert(pos); spice_assert(item); rcc->pipe_size++; ring_add_after(&item->link, &pos->link); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,676
void red_channel_client_pipe_add_push(RedChannelClient *rcc, PipeItem *item) { red_channel_client_pipe_add(rcc, item); red_channel_client_push(rcc); }
DoS
0
void red_channel_client_pipe_add_push(RedChannelClient *rcc, PipeItem *item) { red_channel_client_pipe_add(rcc, item); red_channel_client_push(rcc); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,677
void red_channel_client_pipe_add_tail(RedChannelClient *rcc, PipeItem *item) { spice_assert(rcc); rcc->pipe_size++; ring_add_before(&item->link, &rcc->pipe); red_channel_client_push(rcc); }
DoS
0
void red_channel_client_pipe_add_tail(RedChannelClient *rcc, PipeItem *item) { spice_assert(rcc); rcc->pipe_size++; ring_add_before(&item->link, &rcc->pipe); red_channel_client_push(rcc); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,678
void red_channel_client_pipe_add_tail_no_push(RedChannelClient *rcc, PipeItem *item) { spice_assert(rcc); rcc->pipe_size++; ring_add_before(&item->link, &rcc->pipe); }
DoS
0
void red_channel_client_pipe_add_tail_no_push(RedChannelClient *rcc, PipeItem *item) { spice_assert(rcc); rcc->pipe_size++; ring_add_before(&item->link, &rcc->pipe); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,679
void red_channel_client_pipe_clear(RedChannelClient *rcc) { PipeItem *item; if (rcc) { red_channel_client_clear_sent_item(rcc); } while ((item = (PipeItem *)ring_get_head(&rcc->pipe))) { ring_remove(&item->link); red_channel_client_release_item(rcc, item, FALSE); } rcc->...
DoS
0
void red_channel_client_pipe_clear(RedChannelClient *rcc) { PipeItem *item; if (rcc) { red_channel_client_clear_sent_item(rcc); } while ((item = (PipeItem *)ring_get_head(&rcc->pipe))) { ring_remove(&item->link); red_channel_client_release_item(rcc, item, FALSE); } rcc->...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,680
int red_channel_client_pipe_item_is_linked(RedChannelClient *rcc, PipeItem *item) { return ring_item_is_linked(&item->link); }
DoS
0
int red_channel_client_pipe_item_is_linked(RedChannelClient *rcc, PipeItem *item) { return ring_item_is_linked(&item->link); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,681
void red_channel_client_pipe_remove_and_release(RedChannelClient *rcc, PipeItem *item) { red_channel_client_pipe_remove(rcc, item); red_channel_client_release_item(rcc, item, FALSE); }
DoS
0
void red_channel_client_pipe_remove_and_release(RedChannelClient *rcc, PipeItem *item) { red_channel_client_pipe_remove(rcc, item); red_channel_client_release_item(rcc, item, FALSE); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,682
static int red_channel_client_pre_create_validate(RedChannel *channel, RedClient *client) { if (red_client_get_channel(client, channel->type, channel->id)) { spice_printerr("Error client %p: duplicate channel type %d id %d", client, channel->type, channel->id); return FALSE; ...
DoS
0
static int red_channel_client_pre_create_validate(RedChannel *channel, RedClient *client) { if (red_client_get_channel(client, channel->type, channel->id)) { spice_printerr("Error client %p: duplicate channel type %d id %d", client, channel->type, channel->id); return FALSE; ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,683
void red_channel_client_push(RedChannelClient *rcc) { PipeItem *pipe_item; if (!rcc->during_send) { rcc->during_send = TRUE; } else { return; } red_channel_client_ref(rcc); if (rcc->send_data.blocked) { red_channel_client_send(rcc); } if (!red_channel_client_no_...
DoS
0
void red_channel_client_push(RedChannelClient *rcc) { PipeItem *pipe_item; if (!rcc->during_send) { rcc->during_send = TRUE; } else { return; } red_channel_client_ref(rcc); if (rcc->send_data.blocked) { red_channel_client_send(rcc); } if (!red_channel_client_no_...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,684
static void red_channel_client_push_ping(RedChannelClient *rcc) { spice_assert(rcc->latency_monitor.state == PING_STATE_NONE); rcc->latency_monitor.state = PING_STATE_WARMUP; rcc->latency_monitor.warmup_was_sent = FALSE; rcc->latency_monitor.id = rand(); red_channel_client_pipe_add_type(rcc, PIPE_IT...
DoS
0
static void red_channel_client_push_ping(RedChannelClient *rcc) { spice_assert(rcc->latency_monitor.state == PING_STATE_NONE); rcc->latency_monitor.state = PING_STATE_WARMUP; rcc->latency_monitor.warmup_was_sent = FALSE; rcc->latency_monitor.id = rand(); red_channel_client_pipe_add_type(rcc, PIPE_IT...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,685
void red_channel_client_push_set_ack(RedChannelClient *rcc) { red_channel_client_pipe_add_type(rcc, PIPE_ITEM_TYPE_SET_ACK); }
DoS
0
void red_channel_client_push_set_ack(RedChannelClient *rcc) { red_channel_client_pipe_add_type(rcc, PIPE_ITEM_TYPE_SET_ACK); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,686
void red_channel_client_receive(RedChannelClient *rcc) { red_channel_client_ref(rcc); red_peer_handle_incoming(rcc->stream, &rcc->incoming); red_channel_client_unref(rcc); }
DoS
0
void red_channel_client_receive(RedChannelClient *rcc) { red_channel_client_ref(rcc); red_peer_handle_incoming(rcc->stream, &rcc->incoming); red_channel_client_unref(rcc); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,687
static void red_channel_client_release_item(RedChannelClient *rcc, PipeItem *item, int item_pushed) { int handled = TRUE; switch (item->type) { case PIPE_ITEM_TYPE_SET_ACK: case PIPE_ITEM_TYPE_EMPTY_MSG: case PIPE_ITEM_TYPE_MIGRATE: case PIPE_ITEM_TYPE_PING: free(ite...
DoS
0
static void red_channel_client_release_item(RedChannelClient *rcc, PipeItem *item, int item_pushed) { int handled = TRUE; switch (item->type) { case PIPE_ITEM_TYPE_SET_ACK: case PIPE_ITEM_TYPE_EMPTY_MSG: case PIPE_ITEM_TYPE_MIGRATE: case PIPE_ITEM_TYPE_PING: free(ite...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,688
static inline void red_channel_client_release_sent_item(RedChannelClient *rcc) { if (rcc->send_data.item) { red_channel_client_release_item(rcc, rcc->send_data.item, TRUE); rcc->send_data.item = NULL; } }
DoS
0
static inline void red_channel_client_release_sent_item(RedChannelClient *rcc) { if (rcc->send_data.item) { red_channel_client_release_item(rcc, rcc->send_data.item, TRUE); rcc->send_data.item = NULL; } }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,689
static void red_channel_client_reset_send_data(RedChannelClient *rcc) { spice_marshaller_reset(rcc->send_data.marshaller); rcc->send_data.header.data = spice_marshaller_reserve_space(rcc->send_data.marshaller, rcc->send_data.header.header_size); ...
DoS
0
static void red_channel_client_reset_send_data(RedChannelClient *rcc) { spice_marshaller_reset(rcc->send_data.marshaller); rcc->send_data.header.data = spice_marshaller_reserve_space(rcc->send_data.marshaller, rcc->send_data.header.header_size); ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,690
static void red_channel_client_restart_ping_timer(RedChannelClient *rcc) { struct timespec ts; uint64_t passed, timeout; clock_gettime(CLOCK_MONOTONIC, &ts); passed = ts.tv_sec * 1000000000LL + ts.tv_nsec; passed = passed - rcc->latency_monitor.last_pong_time; passed /= 1000*1000; timeout ...
DoS
0
static void red_channel_client_restart_ping_timer(RedChannelClient *rcc) { struct timespec ts; uint64_t passed, timeout; clock_gettime(CLOCK_MONOTONIC, &ts); passed = ts.tv_sec * 1000000000LL + ts.tv_nsec; passed = passed - rcc->latency_monitor.last_pong_time; passed /= 1000*1000; timeout ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,691
static void red_channel_client_restore_main_sender(RedChannelClient *rcc) { spice_marshaller_reset(rcc->send_data.urgent.marshaller); rcc->send_data.marshaller = rcc->send_data.main.marshaller; rcc->send_data.header.data = rcc->send_data.main.header_data; if (!rcc->is_mini_header) { rcc->send_da...
DoS
0
static void red_channel_client_restore_main_sender(RedChannelClient *rcc) { spice_marshaller_reset(rcc->send_data.urgent.marshaller); rcc->send_data.marshaller = rcc->send_data.main.marshaller; rcc->send_data.header.data = rcc->send_data.main.header_data; if (!rcc->is_mini_header) { rcc->send_da...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,692
static void red_channel_client_seamless_migration_done(RedChannelClient *rcc) { rcc->wait_migrate_data = FALSE; pthread_mutex_lock(&rcc->client->lock); rcc->client->num_migrated_channels--; /* we assume we always have at least one channel who has migration data transfer, * otherwise, this flag wi...
DoS
0
static void red_channel_client_seamless_migration_done(RedChannelClient *rcc) { rcc->wait_migrate_data = FALSE; pthread_mutex_lock(&rcc->client->lock); rcc->client->num_migrated_channels--; /* we assume we always have at least one channel who has migration data transfer, * otherwise, this flag wi...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,693
void red_channel_client_send(RedChannelClient *rcc) { red_channel_client_ref(rcc); red_peer_handle_outgoing(rcc->stream, &rcc->outgoing); red_channel_client_unref(rcc); }
DoS
0
void red_channel_client_send(RedChannelClient *rcc) { red_channel_client_ref(rcc); red_peer_handle_outgoing(rcc->stream, &rcc->outgoing); red_channel_client_unref(rcc); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,694
int red_channel_client_send_message_pending(RedChannelClient *rcc) { return rcc->send_data.header.get_msg_type(&rcc->send_data.header) != 0; }
DoS
0
int red_channel_client_send_message_pending(RedChannelClient *rcc) { return rcc->send_data.header.get_msg_type(&rcc->send_data.header) != 0; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,695
static void red_channel_client_send_migrate(RedChannelClient *rcc) { SpiceMsgMigrate migrate; red_channel_client_init_send_data(rcc, SPICE_MSG_MIGRATE, NULL); migrate.flags = rcc->channel->migration_flags; spice_marshall_msg_migrate(rcc->send_data.marshaller, &migrate); if (rcc->channel->migration_...
DoS
0
static void red_channel_client_send_migrate(RedChannelClient *rcc) { SpiceMsgMigrate migrate; red_channel_client_init_send_data(rcc, SPICE_MSG_MIGRATE, NULL); migrate.flags = rcc->channel->migration_flags; spice_marshall_msg_migrate(rcc->send_data.marshaller, &migrate); if (rcc->channel->migration_...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,696
static void red_channel_client_send_ping(RedChannelClient *rcc) { SpiceMsgPing ping; struct timespec ts; if (!rcc->latency_monitor.warmup_was_sent) { // latency test start int delay_val; socklen_t opt_size = sizeof(delay_val); rcc->latency_monitor.warmup_was_sent = TRUE; /*...
DoS
0
static void red_channel_client_send_ping(RedChannelClient *rcc) { SpiceMsgPing ping; struct timespec ts; if (!rcc->latency_monitor.warmup_was_sent) { // latency test start int delay_val; socklen_t opt_size = sizeof(delay_val); rcc->latency_monitor.warmup_was_sent = TRUE; /*...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,697
static void red_channel_client_send_set_ack(RedChannelClient *rcc) { SpiceMsgSetAck ack; spice_assert(rcc); red_channel_client_init_send_data(rcc, SPICE_MSG_SET_ACK, NULL); ack.generation = ++rcc->ack_data.generation; ack.window = rcc->ack_data.client_window; rcc->ack_data.messages_window = 0; ...
DoS
0
static void red_channel_client_send_set_ack(RedChannelClient *rcc) { SpiceMsgSetAck ack; spice_assert(rcc); red_channel_client_init_send_data(rcc, SPICE_MSG_SET_ACK, NULL); ack.generation = ++rcc->ack_data.generation; ack.window = rcc->ack_data.client_window; rcc->ack_data.messages_window = 0; ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,698
void red_channel_client_set_header_sub_list(RedChannelClient *rcc, uint32_t sub_list) { rcc->send_data.header.set_msg_sub_list(&rcc->send_data.header, sub_list); }
DoS
0
void red_channel_client_set_header_sub_list(RedChannelClient *rcc, uint32_t sub_list) { rcc->send_data.header.set_msg_sub_list(&rcc->send_data.header, sub_list); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,699
void red_channel_client_set_message_serial(RedChannelClient *rcc, uint64_t serial) { rcc->send_data.last_sent_serial = serial; rcc->send_data.serial = serial; }
DoS
0
void red_channel_client_set_message_serial(RedChannelClient *rcc, uint64_t serial) { rcc->send_data.last_sent_serial = serial; rcc->send_data.serial = serial; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null