idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
5,800
hook_hsignal (struct t_weechat_plugin *plugin, const char *signal, t_hook_callback_hsignal *callback, void *callback_data) { struct t_hook *new_hook; struct t_hook_hsignal *new_hook_hsignal; int priority; const char *ptr_signal; if (!signal || !signal[0] || !callback) return N...
Exec Code
0
hook_hsignal (struct t_weechat_plugin *plugin, const char *signal, t_hook_callback_hsignal *callback, void *callback_data) { struct t_hook *new_hook; struct t_hook_hsignal *new_hook_hsignal; int priority; const char *ptr_signal; if (!signal || !signal[0] || !callback) return N...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,801
hook_hsignal_send (const char *signal, struct t_hashtable *hashtable) { struct t_hook *ptr_hook, *next_hook; hook_exec_start (); ptr_hook = weechat_hooks[HOOK_TYPE_HSIGNAL]; while (ptr_hook) { next_hook = ptr_hook->next_hook; if (!ptr_hook->deleted && !ptr_hook->runnin...
Exec Code
0
hook_hsignal_send (const char *signal, struct t_hashtable *hashtable) { struct t_hook *ptr_hook, *next_hook; hook_exec_start (); ptr_hook = weechat_hooks[HOOK_TYPE_HSIGNAL]; while (ptr_hook) { next_hook = ptr_hook->next_hook; if (!ptr_hook->deleted && !ptr_hook->runnin...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,802
hook_info (struct t_weechat_plugin *plugin, const char *info_name, const char *description, const char *args_description, t_hook_callback_info *callback, void *callback_data) { struct t_hook *new_hook; struct t_hook_info *new_hook_info; int priority; const char *ptr_info_name; ...
Exec Code
0
hook_info (struct t_weechat_plugin *plugin, const char *info_name, const char *description, const char *args_description, t_hook_callback_info *callback, void *callback_data) { struct t_hook *new_hook; struct t_hook_info *new_hook_info; int priority; const char *ptr_info_name; ...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,803
hook_info_get (struct t_weechat_plugin *plugin, const char *info_name, const char *arguments) { struct t_hook *ptr_hook, *next_hook; const char *value; /* make C compiler happy */ (void) plugin; if (!info_name || !info_name[0]) return NULL; hook_exec_start (); ptr_...
Exec Code
0
hook_info_get (struct t_weechat_plugin *plugin, const char *info_name, const char *arguments) { struct t_hook *ptr_hook, *next_hook; const char *value; /* make C compiler happy */ (void) plugin; if (!info_name || !info_name[0]) return NULL; hook_exec_start (); ptr_...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,804
hook_info_get_hashtable (struct t_weechat_plugin *plugin, const char *info_name, struct t_hashtable *hashtable) { struct t_hook *ptr_hook, *next_hook; struct t_hashtable *value; /* make C compiler happy */ (void) plugin; if (!info_name || !info_name[0]) return NULL...
Exec Code
0
hook_info_get_hashtable (struct t_weechat_plugin *plugin, const char *info_name, struct t_hashtable *hashtable) { struct t_hook *ptr_hook, *next_hook; struct t_hashtable *value; /* make C compiler happy */ (void) plugin; if (!info_name || !info_name[0]) return NULL...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,805
hook_info_hashtable (struct t_weechat_plugin *plugin, const char *info_name, const char *description, const char *args_description, const char *output_description, t_hook_callback_info_hashtable *callback, void *callback_data) { str...
Exec Code
0
hook_info_hashtable (struct t_weechat_plugin *plugin, const char *info_name, const char *description, const char *args_description, const char *output_description, t_hook_callback_info_hashtable *callback, void *callback_data) { str...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,806
hook_infolist (struct t_weechat_plugin *plugin, const char *infolist_name, const char *description, const char *pointer_description, const char *args_description, t_hook_callback_infolist *callback, void *callback_data) { struct t_hook *new_hook; struct t_hook_infoli...
Exec Code
0
hook_infolist (struct t_weechat_plugin *plugin, const char *infolist_name, const char *description, const char *pointer_description, const char *args_description, t_hook_callback_infolist *callback, void *callback_data) { struct t_hook *new_hook; struct t_hook_infoli...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,807
hook_infolist_get (struct t_weechat_plugin *plugin, const char *infolist_name, void *pointer, const char *arguments) { struct t_hook *ptr_hook, *next_hook; struct t_infolist *value; /* make C compiler happy */ (void) plugin; if (!infolist_name || !infolist_name[0]) retur...
Exec Code
0
hook_infolist_get (struct t_weechat_plugin *plugin, const char *infolist_name, void *pointer, const char *arguments) { struct t_hook *ptr_hook, *next_hook; struct t_infolist *value; /* make C compiler happy */ (void) plugin; if (!infolist_name || !infolist_name[0]) retur...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,808
hook_init () { int type; for (type = 0; type < HOOK_NUM_TYPES; type++) { weechat_hooks[type] = NULL; last_weechat_hook[type] = NULL; } hook_last_system_time = time (NULL); }
Exec Code
0
hook_init () { int type; for (type = 0; type < HOOK_NUM_TYPES; type++) { weechat_hooks[type] = NULL; last_weechat_hook[type] = NULL; } hook_last_system_time = time (NULL); }
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,809
hook_modifier (struct t_weechat_plugin *plugin, const char *modifier, t_hook_callback_modifier *callback, void *callback_data) { struct t_hook *new_hook; struct t_hook_modifier *new_hook_modifier; int priority; const char *ptr_modifier; if (!modifier || !modifier[0] || !callback) ...
Exec Code
0
hook_modifier (struct t_weechat_plugin *plugin, const char *modifier, t_hook_callback_modifier *callback, void *callback_data) { struct t_hook *new_hook; struct t_hook_modifier *new_hook_modifier; int priority; const char *ptr_modifier; if (!modifier || !modifier[0] || !callback) ...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,810
hook_modifier_exec (struct t_weechat_plugin *plugin, const char *modifier, const char *modifier_data, const char *string) { struct t_hook *ptr_hook, *next_hook; char *new_msg, *message_modified; /* make C compiler happy */ (void) plugin; if (!modifier || !modifier[0]) r...
Exec Code
0
hook_modifier_exec (struct t_weechat_plugin *plugin, const char *modifier, const char *modifier_data, const char *string) { struct t_hook *ptr_hook, *next_hook; char *new_msg, *message_modified; /* make C compiler happy */ (void) plugin; if (!modifier || !modifier[0]) r...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,811
hook_print_exec (struct t_gui_buffer *buffer, struct t_gui_line *line) { struct t_hook *ptr_hook, *next_hook; char *prefix_no_color, *message_no_color; int tags_match, tag_found, i, j; if (!line->data->message || !line->data->message[0]) return; prefix_no_color = (line->data->prefix) ? ...
Exec Code
0
hook_print_exec (struct t_gui_buffer *buffer, struct t_gui_line *line) { struct t_hook *ptr_hook, *next_hook; char *prefix_no_color, *message_no_color; int tags_match, tag_found, i, j; if (!line->data->message || !line->data->message[0]) return; prefix_no_color = (line->data->prefix) ? ...
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,812
hook_process (struct t_weechat_plugin *plugin, const char *command, int timeout, t_hook_callback_process *callback, void *callback_data) { return hook_process_hashtable (plugin, command, NULL, timeout, callback, callback_data); }
Exec Code
0
hook_process (struct t_weechat_plugin *plugin, const char *command, int timeout, t_hook_callback_process *callback, void *callback_data) { return hook_process_hashtable (plugin, command, NULL, timeout, callback, callback_data); }
@@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char *exec_args[4] = { "sh", "-c", NULL, NULL }; + char **exec_args; const char *ptr_url; - int rc; + int rc, i; /* * close stdin, so that process will fail to ...
CWE-20
null
null
5,813
string_convert_hex_chars (const char *string) { char *output, hex_str[8], *error; int pos_output; long number; output = malloc (strlen (string) + 1); if (output) { pos_output = 0; while (string && string[0]) { if (string[0] == '\\') { ...
Exec Code
0
string_convert_hex_chars (const char *string) { char *output, hex_str[8], *error; int pos_output; long number; output = malloc (strlen (string) + 1); if (output) { pos_output = 0; while (string && string[0]) { if (string[0] == '\\') { ...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,814
string_expand_home (const char *path) { char *ptr_home, *str; int length; if (!path) return NULL; if (!path[0] || (path[0] != '~') || ((path[1] && path[1] != DIR_SEPARATOR_CHAR))) { return strdup (path); } ptr_home = getenv ("HOME"); length = strlen (ptr_home)...
Exec Code
0
string_expand_home (const char *path) { char *ptr_home, *str; int length; if (!path) return NULL; if (!path[0] || (path[0] != '~') || ((path[1] && path[1] != DIR_SEPARATOR_CHAR))) { return strdup (path); } ptr_home = getenv ("HOME"); length = strlen (ptr_home)...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,815
string_has_highlight_regex (const char *string, const char *regex) { regex_t reg; int rc; if (!string || !regex || !regex[0]) return 0; if (string_regcomp (&reg, regex, REG_EXTENDED | REG_ICASE) != 0) return 0; rc = string_has_highlight_regex_compiled (string, &reg); regfree ...
Exec Code
0
string_has_highlight_regex (const char *string, const char *regex) { regex_t reg; int rc; if (!string || !regex || !regex[0]) return 0; if (string_regcomp (&reg, regex, REG_EXTENDED | REG_ICASE) != 0) return 0; rc = string_has_highlight_regex_compiled (string, &reg); regfree ...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,816
string_has_highlight_regex_compiled (const char *string, regex_t *regex) { int rc, startswith, endswith; regmatch_t regex_match; const char *match_pre; if (!string || !regex) return 0; while (string && string[0]) { rc = regexec (regex, string, 1, &regex_match, 0); if (...
Exec Code
0
string_has_highlight_regex_compiled (const char *string, regex_t *regex) { int rc, startswith, endswith; regmatch_t regex_match; const char *match_pre; if (!string || !regex) return 0; while (string && string[0]) { rc = regexec (regex, string, 1, &regex_match, 0); if (...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,817
string_is_word_char (const char *string) { wint_t c = utf8_wide_char (string); if (c == WEOF) return 0; if (iswalnum (c)) return 1; switch (c) { case '-': case '_': case '|': return 1; } /* not a 'word char' */ return 0; }
Exec Code
0
string_is_word_char (const char *string) { wint_t c = utf8_wide_char (string); if (c == WEOF) return 0; if (iswalnum (c)) return 1; switch (c) { case '-': case '_': case '|': return 1; } /* not a 'word char' */ return 0; }
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,818
string_mask_to_regex (const char *mask) { char *result; const char *ptr_mask; int index_result; char *regex_special_char = ".[]{}()?+"; if (!mask) return NULL; result = malloc ((strlen (mask) * 2) + 1); if (!result) return NULL; result[0] = '\0'; index_result = 0; ...
Exec Code
0
string_mask_to_regex (const char *mask) { char *result; const char *ptr_mask; int index_result; char *regex_special_char = ".[]{}()?+"; if (!mask) return NULL; result = malloc ((strlen (mask) * 2) + 1); if (!result) return NULL; result[0] = '\0'; index_result = 0; ...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,819
string_match (const char *string, const char *mask, int case_sensitive) { char last, *mask2; int len_string, len_mask, rc; if (!mask || !mask[0]) return 0; /* if mask is "*", then any string matches */ if (strcmp (mask, "*") == 0) return 1; len_string = strlen (string); le...
Exec Code
0
string_match (const char *string, const char *mask, int case_sensitive) { char last, *mask2; int len_string, len_mask, rc; if (!mask || !mask[0]) return 0; /* if mask is "*", then any string matches */ if (strcmp (mask, "*") == 0) return 1; len_string = strlen (string); le...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,820
string_regcomp (void *preg, const char *regex, int default_flags) { const char *ptr_regex; int flags; ptr_regex = string_regex_flags (regex, default_flags, &flags); return regcomp ((regex_t *)preg, ptr_regex, flags); }
Exec Code
0
string_regcomp (void *preg, const char *regex, int default_flags) { const char *ptr_regex; int flags; ptr_regex = string_regex_flags (regex, default_flags, &flags); return regcomp ((regex_t *)preg, ptr_regex, flags); }
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,821
string_regex_flags (const char *regex, int default_flags, int *flags) { const char *ptr_regex, *ptr_flags; int set_flag, flag; char *pos; ptr_regex = regex; if (flags) *flags = default_flags; while (strncmp (ptr_regex, "(?", 2) == 0) { pos = strchr (ptr_regex, ')'); ...
Exec Code
0
string_regex_flags (const char *regex, int default_flags, int *flags) { const char *ptr_regex, *ptr_flags; int set_flag, flag; char *pos; ptr_regex = regex; if (flags) *flags = default_flags; while (strncmp (ptr_regex, "(?", 2) == 0) { pos = strchr (ptr_regex, ')'); ...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,822
string_remove_quotes (const char *string, const char *quotes) { int length; const char *pos_start, *pos_end; if (!string || !quotes) return NULL; if (!string[0]) return strdup (string); pos_start = string; while (pos_start[0] == ' ') { pos_start++; } length...
Exec Code
0
string_remove_quotes (const char *string, const char *quotes) { int length; const char *pos_start, *pos_end; if (!string || !quotes) return NULL; if (!string[0]) return strdup (string); pos_start = string; while (pos_start[0] == ' ') { pos_start++; } length...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,823
string_replace (const char *string, const char *search, const char *replace) { const char *pos; char *new_string; int length1, length2, length_new, count; if (!string || !search || !replace) return NULL; length1 = strlen (search); length2 = strlen (replace); /* count number of str...
Exec Code
0
string_replace (const char *string, const char *search, const char *replace) { const char *pos; char *new_string; int length1, length2, length_new, count; if (!string || !search || !replace) return NULL; length1 = strlen (search); length2 = strlen (replace); /* count number of str...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,824
string_split (const char *string, const char *separators, int keep_eol, int num_items_max, int *num_items) { int i, j, n_items; char *string2, **array; char *ptr, *ptr1, *ptr2; if (num_items != NULL) *num_items = 0; if (!string || !string[0] || !separators || !separators[0]) ...
Exec Code
0
string_split (const char *string, const char *separators, int keep_eol, int num_items_max, int *num_items) { int i, j, n_items; char *string2, **array; char *ptr, *ptr1, *ptr2; if (num_items != NULL) *num_items = 0; if (!string || !string[0] || !separators || !separators[0]) ...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,825
string_strcasecmp (const char *string1, const char *string2) { int diff; if (!string1 || !string2) return (string1) ? 1 : ((string2) ? -1 : 0); while (string1[0] && string2[0]) { diff = utf8_charcasecmp (string1, string2); if (diff != 0) return diff; string...
Exec Code
0
string_strcasecmp (const char *string1, const char *string2) { int diff; if (!string1 || !string2) return (string1) ? 1 : ((string2) ? -1 : 0); while (string1[0] && string2[0]) { diff = utf8_charcasecmp (string1, string2); if (diff != 0) return diff; string...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,826
string_strcasestr (const char *string, const char *search) { int length_search; length_search = utf8_strlen (search); if (!string || !search || (length_search == 0)) return NULL; while (string[0]) { if (string_strncasecmp (string, search, length_search) == 0) return (c...
Exec Code
0
string_strcasestr (const char *string, const char *search) { int length_search; length_search = utf8_strlen (search); if (!string || !search || (length_search == 0)) return NULL; while (string[0]) { if (string_strncasecmp (string, search, length_search) == 0) return (c...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,827
string_strcmp_ignore_chars (const char *string1, const char *string2, const char *chars_ignored, int case_sensitive) { int diff; if (!string1 && !string2) return 0; if (!string1 && string2) return -1; if (string1 && !string2) return 1; while (str...
Exec Code
0
string_strcmp_ignore_chars (const char *string1, const char *string2, const char *chars_ignored, int case_sensitive) { int diff; if (!string1 && !string2) return 0; if (!string1 && string2) return -1; if (string1 && !string2) return 1; while (str...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,828
string_strip (const char *string, int left, int right, const char *chars) { const char *ptr_start, *ptr_end; if (!string) return NULL; if (!string[0]) return strdup (string); ptr_start = string; ptr_end = string + strlen (string) - 1; if (left) { while (ptr_start[...
Exec Code
0
string_strip (const char *string, int left, int right, const char *chars) { const char *ptr_start, *ptr_end; if (!string) return NULL; if (!string[0]) return strdup (string); ptr_start = string; ptr_end = string + strlen (string) - 1; if (left) { while (ptr_start[...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,829
string_strncasecmp (const char *string1, const char *string2, int max) { int count, diff; if (!string1 || !string2) return (string1) ? 1 : ((string2) ? -1 : 0); count = 0; while ((count < max) && string1[0] && string2[0]) { diff = utf8_charcasecmp (string1, string2); if (di...
Exec Code
0
string_strncasecmp (const char *string1, const char *string2, int max) { int count, diff; if (!string1 || !string2) return (string1) ? 1 : ((string2) ? -1 : 0); count = 0; while ((count < max) && string1[0] && string2[0]) { diff = utf8_charcasecmp (string1, string2); if (di...
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,830
string_strndup (const char *string, int length) { char *result; if ((int)strlen (string) < length) return strdup (string); result = malloc (length + 1); if (!result) return NULL; memcpy (result, string, length); result[length] = '\0'; return result; }
Exec Code
0
string_strndup (const char *string, int length) { char *result; if ((int)strlen (string) < length) return strdup (string); result = malloc (length + 1); if (!result) return NULL; memcpy (result, string, length); result[length] = '\0'; return result; }
@@ -1138,6 +1138,196 @@ string_split (const char *string, const char *separators, int keep_eol, } /* + * string_split_shell: split a string like the shell does for a command with + * arguments. + * Note: result must be freed with string_free_split. + * Thi...
CWE-20
null
null
5,831
T1_ToBool( PS_Parser parser ) { return ps_tobool( &parser->cursor, parser->limit ); }
Overflow
0
T1_ToBool( PS_Parser parser ) { return ps_tobool( &parser->cursor, parser->limit ); }
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,832
T1_ToString( PS_Parser parser ) { return ps_tostring( &parser->cursor, parser->limit, parser->memory ); }
Overflow
0
T1_ToString( PS_Parser parser ) { return ps_tostring( &parser->cursor, parser->limit, parser->memory ); }
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,833
ps_parser_done( PS_Parser parser ) { FT_UNUSED( parser ); }
Overflow
0
ps_parser_done( PS_Parser parser ) { FT_UNUSED( parser ); }
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,834
ps_parser_init( PS_Parser parser, FT_Byte* base, FT_Byte* limit, FT_Memory memory ) { parser->error = FT_Err_Ok; parser->base = base; parser->limit = limit; parser->cursor = base; parser->memory = memory; parser->funcs = ps_par...
Overflow
0
ps_parser_init( PS_Parser parser, FT_Byte* base, FT_Byte* limit, FT_Memory memory ) { parser->error = FT_Err_Ok; parser->base = base; parser->limit = limit; parser->cursor = base; parser->memory = memory; parser->funcs = ps_par...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,835
ps_parser_load_field( PS_Parser parser, const T1_Field field, void** objects, FT_UInt max_objects, FT_ULong* pflags ) { T1_TokenRec token; FT_Byte* cur; FT_Byte* limi...
Overflow
0
ps_parser_load_field( PS_Parser parser, const T1_Field field, void** objects, FT_UInt max_objects, FT_ULong* pflags ) { T1_TokenRec token; FT_Byte* cur; FT_Byte* limi...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,836
ps_parser_load_field_table( PS_Parser parser, const T1_Field field, void** objects, FT_UInt max_objects, FT_ULong* pflags ) { T1_TokenRec elements[T1_MAX_TABLE_E...
Overflow
0
ps_parser_load_field_table( PS_Parser parser, const T1_Field field, void** objects, FT_UInt max_objects, FT_ULong* pflags ) { T1_TokenRec elements[T1_MAX_TABLE_E...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,837
ps_parser_skip_spaces( PS_Parser parser ) { skip_spaces( &parser->cursor, parser->limit ); }
Overflow
0
ps_parser_skip_spaces( PS_Parser parser ) { skip_spaces( &parser->cursor, parser->limit ); }
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,838
ps_parser_to_bytes( PS_Parser parser, FT_Byte* bytes, FT_Offset max_bytes, FT_ULong* pnum_bytes, FT_Bool delimiters ) { FT_Error error = FT_Err_Ok; FT_Byte* cur; ps_parser_skip_spaces( parser ); cur =...
Overflow
0
ps_parser_to_bytes( PS_Parser parser, FT_Byte* bytes, FT_Offset max_bytes, FT_ULong* pnum_bytes, FT_Bool delimiters ) { FT_Error error = FT_Err_Ok; FT_Byte* cur; ps_parser_skip_spaces( parser ); cur =...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,839
ps_parser_to_fixed( PS_Parser parser, FT_Int power_ten ) { ps_parser_skip_spaces( parser ); return PS_Conv_ToFixed( &parser->cursor, parser->limit, power_ten ); }
Overflow
0
ps_parser_to_fixed( PS_Parser parser, FT_Int power_ten ) { ps_parser_skip_spaces( parser ); return PS_Conv_ToFixed( &parser->cursor, parser->limit, power_ten ); }
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,840
ps_parser_to_fixed_array( PS_Parser parser, FT_Int max_values, FT_Fixed* values, FT_Int power_ten ) { ps_parser_skip_spaces( parser ); return ps_tofixedarray( &parser->cursor, parser->limit, ...
Overflow
0
ps_parser_to_fixed_array( PS_Parser parser, FT_Int max_values, FT_Fixed* values, FT_Int power_ten ) { ps_parser_skip_spaces( parser ); return ps_tofixedarray( &parser->cursor, parser->limit, ...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,841
ps_parser_to_int( PS_Parser parser ) { ps_parser_skip_spaces( parser ); return PS_Conv_ToInt( &parser->cursor, parser->limit ); }
Overflow
0
ps_parser_to_int( PS_Parser parser ) { ps_parser_skip_spaces( parser ); return PS_Conv_ToInt( &parser->cursor, parser->limit ); }
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,842
ps_table_add( PS_Table table, FT_Int idx, void* object, FT_UInt length ) { if ( idx < 0 || idx >= table->max_elems ) { FT_ERROR(( "ps_table_add: invalid index\n" )); return FT_THROW( Invalid_Argument ); } /* grow the base block i...
Overflow
0
ps_table_add( PS_Table table, FT_Int idx, void* object, FT_UInt length ) { if ( idx < 0 || idx >= table->max_elems ) { FT_ERROR(( "ps_table_add: invalid index\n" )); return FT_THROW( Invalid_Argument ); } /* grow the base block i...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,843
ps_table_new( PS_Table table, FT_Int count, FT_Memory memory ) { FT_Error error; table->memory = memory; if ( FT_NEW_ARRAY( table->elements, count ) || FT_NEW_ARRAY( table->lengths, count ) ) goto Exit; table->max_elems = count; table->i...
Overflow
0
ps_table_new( PS_Table table, FT_Int count, FT_Memory memory ) { FT_Error error; table->memory = memory; if ( FT_NEW_ARRAY( table->elements, count ) || FT_NEW_ARRAY( table->lengths, count ) ) goto Exit; table->max_elems = count; table->i...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,844
ps_table_release( PS_Table table ) { FT_Memory memory = table->memory; if ( (FT_ULong)table->init == 0xDEADBEEFUL ) { FT_FREE( table->block ); FT_FREE( table->elements ); FT_FREE( table->lengths ); table->init = 0; } }
Overflow
0
ps_table_release( PS_Table table ) { FT_Memory memory = table->memory; if ( (FT_ULong)table->init == 0xDEADBEEFUL ) { FT_FREE( table->block ); FT_FREE( table->elements ); FT_FREE( table->lengths ); table->init = 0; } }
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,845
ps_tofixedarray( FT_Byte* *acur, FT_Byte* limit, FT_Int max_values, FT_Fixed* values, FT_Int power_ten ) { FT_Byte* cur = *acur; FT_Int count = 0; FT_Byte c, ender; if ( cur >= limit ) goto Exit; ...
Overflow
0
ps_tofixedarray( FT_Byte* *acur, FT_Byte* limit, FT_Int max_values, FT_Fixed* values, FT_Int power_ten ) { FT_Byte* cur = *acur; FT_Int count = 0; FT_Byte c, ender; if ( cur >= limit ) goto Exit; ...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,846
ps_tostring( FT_Byte** cursor, FT_Byte* limit, FT_Memory memory ) { FT_Byte* cur = *cursor; FT_UInt len = 0; FT_Int count; FT_String* result; FT_Error error; /* XXX: some stupid fonts have a `Notice' or `Copyright' string */ /* ...
Overflow
0
ps_tostring( FT_Byte** cursor, FT_Byte* limit, FT_Memory memory ) { FT_Byte* cur = *cursor; FT_UInt len = 0; FT_Int count; FT_String* result; FT_Error error; /* XXX: some stupid fonts have a `Notice' or `Copyright' string */ /* ...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,847
reallocate_t1_table( PS_Table table, FT_Offset new_size ) { FT_Memory memory = table->memory; FT_Byte* old_base = table->block; FT_Error error; /* allocate new base block */ if ( FT_ALLOC( table->block, new_size ) ) { table->block = old_base; re...
Overflow
0
reallocate_t1_table( PS_Table table, FT_Offset new_size ) { FT_Memory memory = table->memory; FT_Byte* old_base = table->block; FT_Error error; /* allocate new base block */ if ( FT_ALLOC( table->block, new_size ) ) { table->block = old_base; re...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,848
skip_comment( FT_Byte* *acur, FT_Byte* limit ) { FT_Byte* cur = *acur; while ( cur < limit ) { if ( IS_PS_NEWLINE( *cur ) ) break; cur++; } *acur = cur; }
Overflow
0
skip_comment( FT_Byte* *acur, FT_Byte* limit ) { FT_Byte* cur = *acur; while ( cur < limit ) { if ( IS_PS_NEWLINE( *cur ) ) break; cur++; } *acur = cur; }
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,849
skip_literal_string( FT_Byte* *acur, FT_Byte* limit ) { FT_Byte* cur = *acur; FT_Int embed = 0; FT_Error error = FT_ERR( Invalid_File_Format ); unsigned int i; while ( cur < limit ) { FT_Byte c = *cur; cur++; if ( c == '\\...
Overflow
0
skip_literal_string( FT_Byte* *acur, FT_Byte* limit ) { FT_Byte* cur = *acur; FT_Int embed = 0; FT_Error error = FT_ERR( Invalid_File_Format ); unsigned int i; while ( cur < limit ) { FT_Byte c = *cur; cur++; if ( c == '\\...
@@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outlin...
CWE-119
null
null
5,850
CtcpHandler::CtcpHandler(CoreNetwork *parent) : CoreBasicHandler(parent), XDELIM("\001"), _ignoreListManager(parent->ignoreListManager()) { QByteArray MQUOTE = QByteArray("\020"); ctcpMDequoteHash[MQUOTE + '0'] = QByteArray(1, '\000'); ctcpMDequoteHash[MQUOTE + 'n'] = QByteArray(1, '\n'); ctcpMDequot...
DoS
0
CtcpHandler::CtcpHandler(CoreNetwork *parent) : CoreBasicHandler(parent), XDELIM("\001"), _ignoreListManager(parent->ignoreListManager()) { QByteArray MQUOTE = QByteArray("\020"); ctcpMDequoteHash[MQUOTE + '0'] = QByteArray(1, '\000'); ctcpMDequoteHash[MQUOTE + 'n'] = QByteArray(1, '\n'); ctcpMDequot...
@@ -129,6 +129,7 @@ void CtcpHandler::parse(Message::Type messageType, const QString &prefix, const int xdelimPos = -1; int xdelimEndPos = -1; int spacePos = -1; + QList<QByteArray> replies; while((xdelimPos = dequotedMessage.indexOf(XDELIM)) != -1) { if(xdelimPos > 0) displayMsg(messageType, t...
CWE-399
null
null
5,851
QByteArray CtcpHandler::lowLevelDequote(const QByteArray &message) { QByteArray dequotedMessage; QByteArray messagepart; QHash<QByteArray, QByteArray>::iterator ctcpquote; for(int i = 0; i < message.size(); i++) { messagepart = message.mid(i,1); if(i+1 < message.size()) { for(ctcpquote = ctcpMDeq...
DoS
0
QByteArray CtcpHandler::lowLevelDequote(const QByteArray &message) { QByteArray dequotedMessage; QByteArray messagepart; QHash<QByteArray, QByteArray>::iterator ctcpquote; for(int i = 0; i < message.size(); i++) { messagepart = message.mid(i,1); if(i+1 < message.size()) { for(ctcpquote = ctcpMDeq...
@@ -129,6 +129,7 @@ void CtcpHandler::parse(Message::Type messageType, const QString &prefix, const int xdelimPos = -1; int xdelimEndPos = -1; int spacePos = -1; + QList<QByteArray> replies; while((xdelimPos = dequotedMessage.indexOf(XDELIM)) != -1) { if(xdelimPos > 0) displayMsg(messageType, t...
CWE-399
null
null
5,852
QByteArray CtcpHandler::lowLevelQuote(const QByteArray &message) { QByteArray quotedMessage = message; QHash<QByteArray, QByteArray> quoteHash = ctcpMDequoteHash; QByteArray MQUOTE = QByteArray("\020"); quoteHash.remove(MQUOTE + MQUOTE); quotedMessage.replace(MQUOTE, MQUOTE + MQUOTE); QHash<QByteArray, QB...
DoS
0
QByteArray CtcpHandler::lowLevelQuote(const QByteArray &message) { QByteArray quotedMessage = message; QHash<QByteArray, QByteArray> quoteHash = ctcpMDequoteHash; QByteArray MQUOTE = QByteArray("\020"); quoteHash.remove(MQUOTE + MQUOTE); quotedMessage.replace(MQUOTE, MQUOTE + MQUOTE); QHash<QByteArray, QB...
@@ -129,6 +129,7 @@ void CtcpHandler::parse(Message::Type messageType, const QString &prefix, const int xdelimPos = -1; int xdelimEndPos = -1; int spacePos = -1; + QList<QByteArray> replies; while((xdelimPos = dequotedMessage.indexOf(XDELIM)) != -1) { if(xdelimPos > 0) displayMsg(messageType, t...
CWE-399
null
null
5,853
QByteArray CtcpHandler::xdelimDequote(const QByteArray &message) { QByteArray dequotedMessage; QByteArray messagepart; QHash<QByteArray, QByteArray>::iterator xdelimquote; for(int i = 0; i < message.size(); i++) { messagepart = message.mid(i,1); if(i+1 < message.size()) { for(xdelimquote = ctcpXD...
DoS
0
QByteArray CtcpHandler::xdelimDequote(const QByteArray &message) { QByteArray dequotedMessage; QByteArray messagepart; QHash<QByteArray, QByteArray>::iterator xdelimquote; for(int i = 0; i < message.size(); i++) { messagepart = message.mid(i,1); if(i+1 < message.size()) { for(xdelimquote = ctcpXD...
@@ -129,6 +129,7 @@ void CtcpHandler::parse(Message::Type messageType, const QString &prefix, const int xdelimPos = -1; int xdelimEndPos = -1; int spacePos = -1; + QList<QByteArray> replies; while((xdelimPos = dequotedMessage.indexOf(XDELIM)) != -1) { if(xdelimPos > 0) displayMsg(messageType, t...
CWE-399
null
null
5,854
add_mlist(struct mlist *mlp, struct magic_map *map, size_t idx) { struct mlist *ml; if ((ml = CAST(struct mlist *, emalloc(sizeof(*ml)))) == NULL) return -1; ml->map = idx == 0 ? map : NULL; ml->magic = map->magic[idx]; ml->nmagic = map->nmagic[idx]; mlp->prev->next = ml; ml->prev = mlp->prev; ml->next = m...
DoS Mem. Corr.
0
add_mlist(struct mlist *mlp, struct magic_map *map, size_t idx) { struct mlist *ml; if ((ml = CAST(struct mlist *, emalloc(sizeof(*ml)))) == NULL) return -1; ml->map = idx == 0 ? map : NULL; ml->magic = map->magic[idx]; ml->nmagic = map->nmagic[idx]; mlp->prev->next = ml; ml->prev = mlp->prev; ml->next = m...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,855
apprentice_compile(struct magic_set *ms, struct magic_map *map, const char *fn) { static const size_t nm = sizeof(*map->nmagic) * MAGIC_SETS; static const size_t m = sizeof(**map->magic); int fd = -1; size_t len; char *dbname; int rv = -1; uint32_t i; php_stream *stream; TSRMLS_FETCH(); dbname = mkdbname(ms...
DoS Mem. Corr.
0
apprentice_compile(struct magic_set *ms, struct magic_map *map, const char *fn) { static const size_t nm = sizeof(*map->nmagic) * MAGIC_SETS; static const size_t m = sizeof(**map->magic); int fd = -1; size_t len; char *dbname; int rv = -1; uint32_t i; php_stream *stream; TSRMLS_FETCH(); dbname = mkdbname(ms...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,856
apprentice_map(struct magic_set *ms, const char *fn) { uint32_t *ptr; uint32_t version, entries, nentries; int needsbyteswap; char *dbname = NULL; struct magic_map *map; size_t i; php_stream *stream = NULL; php_stream_statbuf st; TSRMLS_FETCH(); if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))...
DoS Mem. Corr.
0
apprentice_map(struct magic_set *ms, const char *fn) { uint32_t *ptr; uint32_t version, entries, nentries; int needsbyteswap; char *dbname = NULL; struct magic_map *map; size_t i; php_stream *stream = NULL; php_stream_statbuf st; TSRMLS_FETCH(); if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,857
apprentice_sort(const void *a, const void *b) { const struct magic_entry *ma = CAST(const struct magic_entry *, a); const struct magic_entry *mb = CAST(const struct magic_entry *, b); size_t sa = apprentice_magic_strength(ma->mp); size_t sb = apprentice_magic_strength(mb->mp); if (sa == sb) return 0; else if (s...
DoS Mem. Corr.
0
apprentice_sort(const void *a, const void *b) { const struct magic_entry *ma = CAST(const struct magic_entry *, a); const struct magic_entry *mb = CAST(const struct magic_entry *, b); size_t sa = apprentice_magic_strength(ma->mp); size_t sb = apprentice_magic_strength(mb->mp); if (sa == sb) return 0; else if (s...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,858
apprentice_unmap(struct magic_map *map) { if (map == NULL) return; if (map->p != php_magic_database) { if (map->p == NULL) { int j; for (j = 0; j < MAGIC_SETS; j++) { if (map->magic[j]) { efree(map->magic[j]); } } } else { efree(map->p); } } efree(map); }
DoS Mem. Corr.
0
apprentice_unmap(struct magic_map *map) { if (map == NULL) return; if (map->p != php_magic_database) { if (map->p == NULL) { int j; for (j = 0; j < MAGIC_SETS; j++) { if (map->magic[j]) { efree(map->magic[j]); } } } else { efree(map->p); } } efree(map); }
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,859
bs1(struct magic *m) { m->cont_level = swap2(m->cont_level); m->offset = swap4((uint32_t)m->offset); m->in_offset = swap4((uint32_t)m->in_offset); m->lineno = swap4((uint32_t)m->lineno); if (IS_LIBMAGIC_STRING(m->type)) { m->str_range = swap4(m->str_range); m->str_flags = swap4(m->str_flags); } else { m->v...
DoS Mem. Corr.
0
bs1(struct magic *m) { m->cont_level = swap2(m->cont_level); m->offset = swap4((uint32_t)m->offset); m->in_offset = swap4((uint32_t)m->in_offset); m->lineno = swap4((uint32_t)m->lineno); if (IS_LIBMAGIC_STRING(m->type)) { m->str_range = swap4(m->str_range); m->str_flags = swap4(m->str_flags); } else { m->v...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,860
byteswap(struct magic *magic, uint32_t nmagic) { uint32_t i; for (i = 0; i < nmagic; i++) bs1(&magic[i]); }
DoS Mem. Corr.
0
byteswap(struct magic *magic, uint32_t nmagic) { uint32_t i; for (i = 0; i < nmagic; i++) bs1(&magic[i]); }
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,861
check_format(struct magic_set *ms, struct magic *m) { char *ptr; for (ptr = m->desc; *ptr; ptr++) if (*ptr == '%') break; if (*ptr == '\0') { /* No format string; ok */ return 1; } assert(file_nformats == file_nnames); if (m->type >= file_nformats) { file_magwarn(ms, "Internal error inconsistency be...
DoS Mem. Corr.
0
check_format(struct magic_set *ms, struct magic *m) { char *ptr; for (ptr = m->desc; *ptr; ptr++) if (*ptr == '%') break; if (*ptr == '\0') { /* No format string; ok */ return 1; } assert(file_nformats == file_nnames); if (m->type >= file_nformats) { file_magwarn(ms, "Internal error inconsistency be...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,862
check_format_type(const char *ptr, int type) { int quad = 0; if (*ptr == '\0') { /* Missing format string; bad */ return -1; } switch (type) { case FILE_FMT_QUAD: quad = 1; /*FALLTHROUGH*/ case FILE_FMT_NUM: if (*ptr == '-') ptr++; if (*ptr == '.') ptr++; while (isdigit((unsigned char)*ptr)) ...
DoS Mem. Corr.
0
check_format_type(const char *ptr, int type) { int quad = 0; if (*ptr == '\0') { /* Missing format string; bad */ return -1; } switch (type) { case FILE_FMT_QUAD: quad = 1; /*FALLTHROUGH*/ case FILE_FMT_NUM: if (*ptr == '-') ptr++; if (*ptr == '.') ptr++; while (isdigit((unsigned char)*ptr)) ...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,863
cmpstrp(const void *p1, const void *p2) { return strcmp(*(char *const *)p1, *(char *const *)p2); }
DoS Mem. Corr.
0
cmpstrp(const void *p1, const void *p2) { return strcmp(*(char *const *)p1, *(char *const *)p2); }
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,864
coalesce_entries(struct magic_set *ms, struct magic_entry *me, uint32_t nme, struct magic **ma, uint32_t *nma) { uint32_t i, mentrycount = 0; size_t slen; for (i = 0; i < nme; i++) mentrycount += me[i].cont_count; slen = sizeof(**ma) * mentrycount; if ((*ma = CAST(struct magic *, emalloc(slen))) == NULL) {...
DoS Mem. Corr.
0
coalesce_entries(struct magic_set *ms, struct magic_entry *me, uint32_t nme, struct magic **ma, uint32_t *nma) { uint32_t i, mentrycount = 0; size_t slen; for (i = 0; i < nme; i++) mentrycount += me[i].cont_count; slen = sizeof(**ma) * mentrycount; if ((*ma = CAST(struct magic *, emalloc(slen))) == NULL) {...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,865
eatsize(const char **p) { const char *l = *p; if (LOWCASE(*l) == 'u') l++; switch (LOWCASE(*l)) { case 'l': /* long */ case 's': /* short */ case 'h': /* short */ case 'b': /* char/byte */ case 'c': /* char/byte */ l++; /*FALLTHROUGH*/ default: break; } *p = l; }
DoS Mem. Corr.
0
eatsize(const char **p) { const char *l = *p; if (LOWCASE(*l) == 'u') l++; switch (LOWCASE(*l)) { case 'l': /* long */ case 's': /* short */ case 'h': /* short */ case 'b': /* char/byte */ case 'c': /* char/byte */ l++; /*FALLTHROUGH*/ default: break; } *p = l; }
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,866
file_apprentice(struct magic_set *ms, const char *fn, int action) { char *p, *mfn; int file_err, errs = -1; size_t i; file_reset(ms); /* XXX disabling default magic loading so the compiled in data is used */ #if 0 if ((fn = magic_getpath(fn, action)) == NULL) return -1; #endif init_file_tables(); if (fn ==...
DoS Mem. Corr.
0
file_apprentice(struct magic_set *ms, const char *fn, int action) { char *p, *mfn; int file_err, errs = -1; size_t i; file_reset(ms); /* XXX disabling default magic loading so the compiled in data is used */ #if 0 if ((fn = magic_getpath(fn, action)) == NULL) return -1; #endif init_file_tables(); if (fn ==...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,867
file_magicfind(struct magic_set *ms, const char *name, struct mlist *v) { uint32_t i, j; struct mlist *mlist, *ml; mlist = ms->mlist[1]; for (ml = mlist->next; ml != mlist; ml = ml->next) { struct magic *ma = ml->magic; uint32_t nma = ml->nmagic; for (i = 0; i < nma; i++) { if (ma[i].type != FILE_NAME) ...
DoS Mem. Corr.
0
file_magicfind(struct magic_set *ms, const char *name, struct mlist *v) { uint32_t i, j; struct mlist *mlist, *ml; mlist = ms->mlist[1]; for (ml = mlist->next; ml != mlist; ml = ml->next) { struct magic *ma = ml->magic; uint32_t nma = ml->nmagic; for (i = 0; i < nma; i++) { if (ma[i].type != FILE_NAME) ...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,868
file_ms_alloc(int flags) { struct magic_set *ms; size_t i, len; if ((ms = CAST(struct magic_set *, ecalloc((size_t)1, sizeof(struct magic_set)))) == NULL) return NULL; if (magic_setflags(ms, flags) == -1) { errno = EINVAL; goto free; } ms->o.buf = ms->o.pbuf = NULL; len = (ms->c.len = 10) * sizeof(...
DoS Mem. Corr.
0
file_ms_alloc(int flags) { struct magic_set *ms; size_t i, len; if ((ms = CAST(struct magic_set *, ecalloc((size_t)1, sizeof(struct magic_set)))) == NULL) return NULL; if (magic_setflags(ms, flags) == -1) { errno = EINVAL; goto free; } ms->o.buf = ms->o.pbuf = NULL; len = (ms->c.len = 10) * sizeof(...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,869
file_ms_free(struct magic_set *ms) { size_t i; if (ms == NULL) return; for (i = 0; i < MAGIC_SETS; i++) mlist_free(ms->mlist[i]); if (ms->o.pbuf) { efree(ms->o.pbuf); } if (ms->o.buf) { efree(ms->o.buf); } if (ms->c.li) { efree(ms->c.li); } efree(ms); }
DoS Mem. Corr.
0
file_ms_free(struct magic_set *ms) { size_t i; if (ms == NULL) return; for (i = 0; i < MAGIC_SETS; i++) mlist_free(ms->mlist[i]); if (ms->o.pbuf) { efree(ms->o.pbuf); } if (ms->o.buf) { efree(ms->o.buf); } if (ms->c.li) { efree(ms->c.li); } efree(ms); }
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,870
file_pstring_get_length(const struct magic *m, const char *s) { size_t len = 0; switch (m->str_flags & PSTRING_LEN) { case PSTRING_1_LE: len = *s; break; case PSTRING_2_LE: len = (s[1] << 8) | s[0]; break; case PSTRING_2_BE: len = (s[0] << 8) | s[1]; break; case PSTRING_4_LE: len = (s[3] << 24) | (...
DoS Mem. Corr.
0
file_pstring_get_length(const struct magic *m, const char *s) { size_t len = 0; switch (m->str_flags & PSTRING_LEN) { case PSTRING_1_LE: len = *s; break; case PSTRING_2_LE: len = (s[1] << 8) | s[0]; break; case PSTRING_2_BE: len = (s[0] << 8) | s[1]; break; case PSTRING_4_LE: len = (s[3] << 24) | (...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,871
file_pstring_length_size(const struct magic *m) { switch (m->str_flags & PSTRING_LEN) { case PSTRING_1_LE: return 1; case PSTRING_2_LE: case PSTRING_2_BE: return 2; case PSTRING_4_LE: case PSTRING_4_BE: return 4; default: abort(); /* Impossible */ return 1; } }
DoS Mem. Corr.
0
file_pstring_length_size(const struct magic *m) { switch (m->str_flags & PSTRING_LEN) { case PSTRING_1_LE: return 1; case PSTRING_2_LE: case PSTRING_2_BE: return 2; case PSTRING_4_LE: case PSTRING_4_BE: return 4; default: abort(); /* Impossible */ return 1; } }
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,872
file_showstr(FILE *fp, const char *s, size_t len) { char c; for (;;) { if (len == ~0U) { c = *s++; if (c == '\0') break; } else { if (len-- == 0) break; c = *s++; } if (c >= 040 && c <= 0176) /* TODO isprint && !iscntrl */ (void) fputc(c, fp); else { (void) fputc('\\', fp); ...
DoS Mem. Corr.
0
file_showstr(FILE *fp, const char *s, size_t len) { char c; for (;;) { if (len == ~0U) { c = *s++; if (c == '\0') break; } else { if (len-- == 0) break; c = *s++; } if (c >= 040 && c <= 0176) /* TODO isprint && !iscntrl */ (void) fputc(c, fp); else { (void) fputc('\\', fp); ...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,873
file_signextend(struct magic_set *ms, struct magic *m, uint64_t v) { if (!(m->flag & UNSIGNED)) { switch(m->type) { /* * Do not remove the casts below. They are * vital. When later compared with the data, * the sign extension must have happened. */ case FILE_BYTE: v = (signed char) v; break; ...
DoS Mem. Corr.
0
file_signextend(struct magic_set *ms, struct magic *m, uint64_t v) { if (!(m->flag & UNSIGNED)) { switch(m->type) { /* * Do not remove the casts below. They are * vital. When later compared with the data, * the sign extension must have happened. */ case FILE_BYTE: v = (signed char) v; break; ...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,874
get_type(const struct type_tbl_s *tbl, const char *l, const char **t) { const struct type_tbl_s *p; for (p = tbl; p->len; p++) { if (strncmp(l, p->name, p->len) == 0) { if (t) *t = l + p->len; break; } } return p->type; }
DoS Mem. Corr.
0
get_type(const struct type_tbl_s *tbl, const char *l, const char **t) { const struct type_tbl_s *p; for (p = tbl; p->len; p++) { if (strncmp(l, p->name, p->len) == 0) { if (t) *t = l + p->len; break; } } return p->type; }
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,875
getstr(struct magic_set *ms, struct magic *m, const char *s, int warn) { const char *origs = s; char *p = m->value.s; size_t plen = sizeof(m->value.s); char *origp = p; char *pmax = p + plen - 1; int c; int val; while ((c = *s++) != '\0') { if (isspace((unsigned char) c)) break; if (p >= pmax) { fi...
DoS Mem. Corr.
0
getstr(struct magic_set *ms, struct magic *m, const char *s, int warn) { const char *origs = s; char *p = m->value.s; size_t plen = sizeof(m->value.s); char *origp = p; char *pmax = p + plen - 1; int c; int val; while ((c = *s++) != '\0') { if (isspace((unsigned char) c)) break; if (p >= pmax) { fi...
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,876
hextoint(int c) { if (!isascii((unsigned char) c)) return -1; if (isdigit((unsigned char) c)) return c - '0'; if ((c >= 'a') && (c <= 'f')) return c + 10 - 'a'; if (( c>= 'A') && (c <= 'F')) return c + 10 - 'A'; return -1; }
DoS Mem. Corr.
0
hextoint(int c) { if (!isascii((unsigned char) c)) return -1; if (isdigit((unsigned char) c)) return c - '0'; if ((c >= 'a') && (c <= 'f')) return c + 10 - 'a'; if (( c>= 'A') && (c <= 'F')) return c + 10 - 'A'; return -1; }
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,877
magic_entry_free(struct magic_entry *me, uint32_t nme) { uint32_t i; if (me == NULL) return; for (i = 0; i < nme; i++) efree(me[i].mp); efree(me); }
DoS Mem. Corr.
0
magic_entry_free(struct magic_entry *me, uint32_t nme) { uint32_t i; if (me == NULL) return; for (i = 0; i < nme; i++) efree(me[i].mp); efree(me); }
@@ -1197,7 +1197,6 @@ apprentice_load(struct magic_set *ms, const char *fn, int action) if ((filearr = CAST(char **, erealloc(filearr, mlen))) == NULL) { file_oomem(ms, mlen); - ...
CWE-17
null
null
5,878
ZEND_API zval *_zend_ts_hash_add_or_update(TsHashTable *ht, zend_string *key, zval *pData, int flag ZEND_FILE_LINE_DC) { zval *retval; begin_write(ht); retval = _zend_hash_add_or_update(TS_HASH(ht), key, pData, flag ZEND_FILE_LINE_RELAY_CC); end_write(ht); return retval; }
DoS
0
ZEND_API zval *_zend_ts_hash_add_or_update(TsHashTable *ht, zend_string *key, zval *pData, int flag ZEND_FILE_LINE_DC) { zval *retval; begin_write(ht); retval = _zend_hash_add_or_update(TS_HASH(ht), key, pData, flag ZEND_FILE_LINE_RELAY_CC); end_write(ht); return retval; }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,879
ZEND_API zval *_zend_ts_hash_index_add_or_update(TsHashTable *ht, zend_ulong h, zval *pData, int flag ZEND_FILE_LINE_DC) { zval *retval; begin_write(ht); retval = _zend_hash_index_add_or_update(TS_HASH(ht), h, pData, flag ZEND_FILE_LINE_RELAY_CC); end_write(ht); return retval; }
DoS
0
ZEND_API zval *_zend_ts_hash_index_add_or_update(TsHashTable *ht, zend_ulong h, zval *pData, int flag ZEND_FILE_LINE_DC) { zval *retval; begin_write(ht); retval = _zend_hash_index_add_or_update(TS_HASH(ht), h, pData, flag ZEND_FILE_LINE_RELAY_CC); end_write(ht); return retval; }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,880
ZEND_API void _zend_ts_hash_init(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC) { #ifdef ZTS ht->mx_reader = tsrm_mutex_alloc(); ht->mx_writer = tsrm_mutex_alloc(); ht->reader = 0; #endif _zend_hash_init(TS_HASH(ht), nSize, pDestructor, persistent ZEND_FILE_LINE_RELAY_...
DoS
0
ZEND_API void _zend_ts_hash_init(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC) { #ifdef ZTS ht->mx_reader = tsrm_mutex_alloc(); ht->mx_writer = tsrm_mutex_alloc(); ht->reader = 0; #endif _zend_hash_init(TS_HASH(ht), nSize, pDestructor, persistent ZEND_FILE_LINE_RELAY_...
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,881
ZEND_API void _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC) { #ifdef ZTS ht->mx_reader = tsrm_mutex_alloc(); ht->mx_writer = tsrm_mutex_alloc(); ht->reader = 0; #endif _zend_hash_init_ex(TS_HASH(ht), nSize, pDestructor...
DoS
0
ZEND_API void _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC) { #ifdef ZTS ht->mx_reader = tsrm_mutex_alloc(); ht->mx_writer = tsrm_mutex_alloc(); ht->reader = 0; #endif _zend_hash_init_ex(TS_HASH(ht), nSize, pDestructor...
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,882
ZEND_API zval *_zend_ts_hash_str_update(TsHashTable *ht, const char *key, size_t len, zval *pData ZEND_FILE_LINE_DC) { zval *retval; begin_write(ht); retval = zend_hash_str_update(TS_HASH(ht), key, len, pData); end_write(ht); return retval; }
DoS
0
ZEND_API zval *_zend_ts_hash_str_update(TsHashTable *ht, const char *key, size_t len, zval *pData ZEND_FILE_LINE_DC) { zval *retval; begin_write(ht); retval = zend_hash_str_update(TS_HASH(ht), key, len, pData); end_write(ht); return retval; }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,883
static void begin_read(TsHashTable *ht) { #ifdef ZTS tsrm_mutex_lock(ht->mx_reader); if ((++(ht->reader)) == 1) { tsrm_mutex_lock(ht->mx_writer); } tsrm_mutex_unlock(ht->mx_reader); #endif }
DoS
0
static void begin_read(TsHashTable *ht) { #ifdef ZTS tsrm_mutex_lock(ht->mx_reader); if ((++(ht->reader)) == 1) { tsrm_mutex_lock(ht->mx_writer); } tsrm_mutex_unlock(ht->mx_reader); #endif }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,884
static void end_write(TsHashTable *ht) { #ifdef ZTS tsrm_mutex_unlock(ht->mx_writer); #endif }
DoS
0
static void end_write(TsHashTable *ht) { #ifdef ZTS tsrm_mutex_unlock(ht->mx_writer); #endif }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,885
ZEND_API void zend_ts_hash_apply(TsHashTable *ht, apply_func_t apply_func) { begin_write(ht); zend_hash_apply(TS_HASH(ht), apply_func); end_write(ht); }
DoS
0
ZEND_API void zend_ts_hash_apply(TsHashTable *ht, apply_func_t apply_func) { begin_write(ht); zend_hash_apply(TS_HASH(ht), apply_func); end_write(ht); }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,886
ZEND_API void zend_ts_hash_apply_with_argument(TsHashTable *ht, apply_func_arg_t apply_func, void *argument) { begin_write(ht); zend_hash_apply_with_argument(TS_HASH(ht), apply_func, argument); end_write(ht); }
DoS
0
ZEND_API void zend_ts_hash_apply_with_argument(TsHashTable *ht, apply_func_arg_t apply_func, void *argument) { begin_write(ht); zend_hash_apply_with_argument(TS_HASH(ht), apply_func, argument); end_write(ht); }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,887
ZEND_API void zend_ts_hash_apply_with_arguments(TsHashTable *ht, apply_func_args_t apply_func, int num_args, ...) { va_list args; va_start(args, num_args); begin_write(ht); zend_hash_apply_with_arguments(TS_HASH(ht), apply_func, num_args, args); end_write(ht); va_end(args); }
DoS
0
ZEND_API void zend_ts_hash_apply_with_arguments(TsHashTable *ht, apply_func_args_t apply_func, int num_args, ...) { va_list args; va_start(args, num_args); begin_write(ht); zend_hash_apply_with_arguments(TS_HASH(ht), apply_func, num_args, args); end_write(ht); va_end(args); }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,888
ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, zend_bool ordered) { int retval; begin_read(ht1); begin_read(ht2); retval = zend_hash_compare(TS_HASH(ht1), TS_HASH(ht2), compar, ordered); end_read(ht2); end_read(ht1); return retval; }
DoS
0
ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, zend_bool ordered) { int retval; begin_read(ht1); begin_read(ht2); retval = zend_hash_compare(TS_HASH(ht1), TS_HASH(ht2), compar, ordered); end_read(ht2); end_read(ht1); return retval; }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,889
ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor) { begin_read(source); begin_write(target); zend_hash_copy(TS_HASH(target), TS_HASH(source), pCopyConstructor); end_write(target); end_read(source); }
DoS
0
ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor) { begin_read(source); begin_write(target); zend_hash_copy(TS_HASH(target), TS_HASH(source), pCopyConstructor); end_write(target); end_read(source); }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,890
ZEND_API void zend_ts_hash_copy_to_hash(HashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor) { begin_read(source); zend_hash_copy(target, TS_HASH(source), pCopyConstructor); end_read(source); }
DoS
0
ZEND_API void zend_ts_hash_copy_to_hash(HashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor) { begin_read(source); zend_hash_copy(target, TS_HASH(source), pCopyConstructor); end_read(source); }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,891
ZEND_API int zend_ts_hash_del(TsHashTable *ht, zend_string *key) { int retval; begin_write(ht); retval = zend_hash_del(TS_HASH(ht), key); end_write(ht); return retval; }
DoS
0
ZEND_API int zend_ts_hash_del(TsHashTable *ht, zend_string *key) { int retval; begin_write(ht); retval = zend_hash_del(TS_HASH(ht), key); end_write(ht); return retval; }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,892
ZEND_API void zend_ts_hash_destroy(TsHashTable *ht) { begin_write(ht); zend_hash_destroy(TS_HASH(ht)); end_write(ht); #ifdef ZTS tsrm_mutex_free(ht->mx_reader); tsrm_mutex_free(ht->mx_writer); #endif }
DoS
0
ZEND_API void zend_ts_hash_destroy(TsHashTable *ht) { begin_write(ht); zend_hash_destroy(TS_HASH(ht)); end_write(ht); #ifdef ZTS tsrm_mutex_free(ht->mx_reader); tsrm_mutex_free(ht->mx_writer); #endif }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,893
ZEND_API zval *zend_ts_hash_find(TsHashTable *ht, zend_string *key) { zval *retval; begin_read(ht); retval = zend_hash_find(TS_HASH(ht), key); end_read(ht); return retval; }
DoS
0
ZEND_API zval *zend_ts_hash_find(TsHashTable *ht, zend_string *key) { zval *retval; begin_read(ht); retval = zend_hash_find(TS_HASH(ht), key); end_read(ht); return retval; }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,894
ZEND_API int zend_ts_hash_index_del(TsHashTable *ht, zend_ulong h) { int retval; begin_write(ht); retval = zend_hash_index_del(TS_HASH(ht), h); end_write(ht); return retval; }
DoS
0
ZEND_API int zend_ts_hash_index_del(TsHashTable *ht, zend_ulong h) { int retval; begin_write(ht); retval = zend_hash_index_del(TS_HASH(ht), h); end_write(ht); return retval; }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,895
ZEND_API int zend_ts_hash_index_exists(TsHashTable *ht, zend_ulong h) { int retval; begin_read(ht); retval = zend_hash_index_exists(TS_HASH(ht), h); end_read(ht); return retval; }
DoS
0
ZEND_API int zend_ts_hash_index_exists(TsHashTable *ht, zend_ulong h) { int retval; begin_read(ht); retval = zend_hash_index_exists(TS_HASH(ht), h); end_read(ht); return retval; }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,896
ZEND_API void zend_ts_hash_merge(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, int overwrite) { begin_read(source); begin_write(target); zend_hash_merge(TS_HASH(target), TS_HASH(source), pCopyConstructor, overwrite); end_write(target); end_read(source); }
DoS
0
ZEND_API void zend_ts_hash_merge(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, int overwrite) { begin_read(source); begin_write(target); zend_hash_merge(TS_HASH(target), TS_HASH(source), pCopyConstructor, overwrite); end_write(target); end_read(source); }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,897
ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, merge_checker_func_t pMergeSource, void *pParam) { begin_read(source); begin_write(target); zend_hash_merge_ex(TS_HASH(target), TS_HASH(source), pCopyConstructor, pMergeSource, pParam); end_write(target)...
DoS
0
ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, merge_checker_func_t pMergeSource, void *pParam) { begin_read(source); begin_write(target); zend_hash_merge_ex(TS_HASH(target), TS_HASH(source), pCopyConstructor, pMergeSource, pParam); end_write(target)...
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,898
ZEND_API zval *zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag) { zval *retval; begin_read(ht); retval = zend_hash_minmax(TS_HASH(ht), compar, flag); end_read(ht); return retval; }
DoS
0
ZEND_API zval *zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag) { zval *retval; begin_read(ht); retval = zend_hash_minmax(TS_HASH(ht), compar, flag); end_read(ht); return retval; }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null
5,899
ZEND_API int zend_ts_hash_num_elements(TsHashTable *ht) { int retval; begin_read(ht); retval = zend_hash_num_elements(TS_HASH(ht)); end_read(ht); return retval; }
DoS
0
ZEND_API int zend_ts_hash_num_elements(TsHashTable *ht) { int retval; begin_read(ht); retval = zend_hash_num_elements(TS_HASH(ht)); end_read(ht); return retval; }
@@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) #ifdef ZTS tsrm_mutex_free(ht->mx_reader); - tsrm_mutex_free(ht->mx_reader); + tsrm_mutex_free(ht->mx_writer); #endif }
null
null
null