Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions android/app/src/main/cpp/dislocker/encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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 */
Expand Down Expand Up @@ -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;
}
Expand Down