1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[loc] fix truncation of notification messages

This commit is contained in:
Pete Batard 2019-05-15 13:42:33 +01:00
parent 2ff6da49f0
commit 2607dfabc1
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
2 changed files with 8 additions and 9 deletions

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326 IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.6.1532" CAPTION "Rufus 3.6.1533"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0 FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -394,8 +394,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,6,1532,0 FILEVERSION 3,6,1533,0
PRODUCTVERSION 3,6,1532,0 PRODUCTVERSION 3,6,1533,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -413,13 +413,13 @@ BEGIN
VALUE "Comments", "https://akeo.ie" VALUE "Comments", "https://akeo.ie"
VALUE "CompanyName", "Akeo Consulting" VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.6.1532" VALUE "FileVersion", "3.6.1533"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2019 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2019 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus-3.6.exe" VALUE "OriginalFilename", "rufus-3.6.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.6.1532" VALUE "ProductVersion", "3.6.1533"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -811,19 +811,18 @@ BOOL Notification(int type, const char* dont_display_setting, const notification
{ {
BOOL ret; BOOL ret;
va_list args; va_list args;
const int max_msg_size = 1024;
dialog_showing++; dialog_showing++;
szMessageText = (char*)malloc(max_msg_size); szMessageText = (char*)malloc(LOC_MESSAGE_SIZE);
if (szMessageText == NULL) if (szMessageText == NULL)
return FALSE; return FALSE;
szMessageTitle = safe_strdup(title); szMessageTitle = safe_strdup(title);
if (szMessageTitle == NULL) if (szMessageTitle == NULL)
return FALSE; return FALSE;
va_start(args, format); va_start(args, format);
safe_vsnprintf(szMessageText, max_msg_size -1, format, args); safe_vsnprintf(szMessageText, LOC_MESSAGE_SIZE - 1, format, args);
va_end(args); va_end(args);
szMessageText[max_msg_size -1] = 0; szMessageText[LOC_MESSAGE_SIZE - 1] = 0;
notification_more_info = more_info; notification_more_info = more_info;
notification_is_question = FALSE; notification_is_question = FALSE;
notification_dont_display_setting = dont_display_setting; notification_dont_display_setting = dont_display_setting;