fix(ui,db): harden NULL handling, fix CWE-134, optimize iterations
Some checks failed
CI Code / Code Coverage (push) Failing after 10m34s
CI Code / Check spelling (push) Failing after 10m47s
CI Code / Check coding style (push) Failing after 11m4s
CI Code / Linux (ubuntu) (push) Failing after 11m19s
CI Code / Linux (debian) (push) Failing after 11m28s
CI Code / Linux (arch) (push) Failing after 11m38s
Some checks failed
CI Code / Code Coverage (push) Failing after 10m34s
CI Code / Check spelling (push) Failing after 10m47s
CI Code / Check coding style (push) Failing after 11m4s
CI Code / Linux (ubuntu) (push) Failing after 11m19s
CI Code / Linux (debian) (push) Failing after 11m28s
CI Code / Linux (arch) (push) Failing after 11m38s
security(CWE-134): fix format string injections + add CI check fix(ui): subwindow lifecycle, newwin/newpad guards, fallback timestamps fix(db): sqlite cleanup on failures, sqlite3_close_v2 fix(xmpp): queued_messages loop, barejid leak perf(core): g_hash_table_iter_init instead of g_hash_table_get_keys refactor(ui): CLAMP macro in _check_subwin_width test: XEP-0012 and XEP-0045 functional tests Author: jabber.developer2 Closes #58, #85
This commit is contained in:
@@ -149,15 +149,14 @@ callbacks_remove(const char* const plugin_name)
|
||||
{
|
||||
GHashTable* command_hash = g_hash_table_lookup(p_commands, plugin_name);
|
||||
if (command_hash) {
|
||||
GList* commands = g_hash_table_get_keys(command_hash);
|
||||
GList* curr = commands;
|
||||
while (curr) {
|
||||
char* command = curr->data;
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
g_hash_table_iter_init(&iter, command_hash);
|
||||
while (g_hash_table_iter_next(&iter, &key, &value)) {
|
||||
char* command = (char*)key;
|
||||
cmd_ac_remove(command);
|
||||
cmd_ac_remove_help(&command[1]);
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
g_list_free(commands);
|
||||
}
|
||||
|
||||
g_hash_table_remove(p_commands, plugin_name);
|
||||
@@ -165,13 +164,12 @@ callbacks_remove(const char* const plugin_name)
|
||||
|
||||
GHashTable* tag_to_win_cb_hash = g_hash_table_lookup(p_window_callbacks, plugin_name);
|
||||
if (tag_to_win_cb_hash) {
|
||||
GList* tags = g_hash_table_get_keys(tag_to_win_cb_hash);
|
||||
GList* curr = tags;
|
||||
while (curr) {
|
||||
wins_close_plugin(curr->data);
|
||||
curr = g_list_next(curr);
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
g_hash_table_iter_init(&iter, tag_to_win_cb_hash);
|
||||
while (g_hash_table_iter_next(&iter, &key, &value)) {
|
||||
wins_close_plugin(key);
|
||||
}
|
||||
g_list_free(tags);
|
||||
}
|
||||
|
||||
g_hash_table_remove(p_window_callbacks, plugin_name);
|
||||
|
||||
Reference in New Issue
Block a user