From a149cfca72e4710a157a7b8fa7b3d128ac59df07 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 7 Apr 2025 16:37:49 +0600 Subject: [PATCH] Crash fix --- source/ubl-settings-update.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index f547fb9..833db08 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -1416,7 +1416,12 @@ char *yon_password_hash_get(password_window *window){ const char *encription = gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->EncryptionCombo)); const char *hash = gtk_entry_get_text(GTK_ENTRY(window->PasswordHashEntry)); if (!yon_char_is_empty(hash)){ - char *final = yon_char_unite(encription,"|",hash); + if (strlen(hash)!=128||strlen(hash)!=64){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),INCORRECT_HASH_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(window->PasswordHashEntry); + return NULL; + } + char *final = yon_char_unite(encription,"|",hash,NULL); return final; } else { const char *password = gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));