mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-04 08:29:50 -04:00
[ui] fix more potential notification message truncation
* Some Thai UTF-8 notification messages went over the buffer size limit we used for vsnprintf()
* Also, revert part of 645184f11e
and use LRE+PDF marks instead:
Don't handle in the code what is better handled in the loc file.
This commit is contained in:
parent
d6e6f46029
commit
8238de67e1
4 changed files with 20 additions and 27 deletions
12
src/stdfn.c
12
src/stdfn.c
|
@ -463,7 +463,6 @@ BOOL FileIO(BOOL save, char* path, char** buffer, DWORD* size)
|
|||
HANDLE handle;
|
||||
BOOL r;
|
||||
BOOL ret = FALSE;
|
||||
char* ltr_path;
|
||||
|
||||
// Change the owner from admin to regular user
|
||||
sid = GetSID();
|
||||
|
@ -506,16 +505,7 @@ BOOL FileIO(BOOL save, char* path, char** buffer, DWORD* size)
|
|||
goto out;
|
||||
}
|
||||
|
||||
// Ensure that the path is always displayed LTR
|
||||
// Use of sizeof gets us the extra char needed for NUL terminator
|
||||
ltr_path = malloc(safe_strlen(path) + sizeof(LEFT_TO_RIGHT_EMBEDDING) + sizeof(POP_DIRECTIONAL_FORMATTING));
|
||||
if (ltr_path == NULL) {
|
||||
PrintInfoDebug(0, save ? MSG_216 : MSG_215, path);
|
||||
} else {
|
||||
sprintf(ltr_path, "%s%s%s", LEFT_TO_RIGHT_EMBEDDING, path, POP_DIRECTIONAL_FORMATTING);
|
||||
PrintInfoDebug(0, save ? MSG_216 : MSG_215, ltr_path);
|
||||
free(ltr_path);
|
||||
}
|
||||
PrintInfoDebug(0, save?MSG_216:MSG_215, path);
|
||||
ret = TRUE;
|
||||
|
||||
out:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue