From 51ea58e13505c8fb73cca759ad5043ce91b1a612 Mon Sep 17 00:00:00 2001 From: anupamme Date: Thu, 30 Jul 2026 04:39:37 +0000 Subject: [PATCH] fix: utils.custom.buffer-overflow-strcpy security vulnerability Automated security fix generated by OrbisAI Security --- android/app/src/main/cpp/dislocker/encoding.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/cpp/dislocker/encoding.c b/android/app/src/main/cpp/dislocker/encoding.c index c8de357..af67d8c 100644 --- a/android/app/src/main/cpp/dislocker/encoding.c +++ b/android/app/src/main/cpp/dislocker/encoding.c @@ -152,7 +152,7 @@ char* getlocalcharset() { return NULL; } /* A copy, otherwise not possible to set the locale back to original value */ - strcpy(current_locale, cl); + memcpy(current_locale, cl, strlen(cl)+1); dis_printf(L_DEBUG, "Program's locale: %s\n", current_locale); /* Set the locale from environment */ @@ -169,7 +169,7 @@ char* getlocalcharset() { return NULL; } /* A copy, otherwise not possible to use it */ - strcpy(new_locale, nl); + memcpy(new_locale, nl, strlen(nl)+1); dis_printf(L_DEBUG, "Environment's locale: %s\n", new_locale); /* Sets program's original locale */ @@ -224,7 +224,7 @@ char* getlocalcharset() { return NULL; } /* A copy, otherwise not possible to use it */ - strcpy(local_charset, character_sets_list[local_charset_index]); + memcpy(local_charset, character_sets_list[local_charset_index], strlen(character_sets_list[local_charset_index])+1); return local_charset; }