[misc] fix coverity warnings in drive.c

* Also apply minor fixes to rufus.loc and _set_git_hooks.sh
This commit is contained in:
Pete Batard 2018-05-15 10:23:45 +01:00
parent 6513b5e0b4
commit 4a8c5be9c5
4 changed files with 12 additions and 11 deletions

View File

@ -8,11 +8,11 @@ fi
echo 'Creating pre-commit git hook...'
echo '#!/bin/sh' > .git/hooks/pre-commit
echo 'if [ -x ./_pre-commit.sh ]; then' >> .git/hooks/pre-commit
echo ' source ./_pre-commit.sh' >> .git/hooks/pre-commit
echo ' . ./_pre-commit.sh' >> .git/hooks/pre-commit
echo 'fi' >> .git/hooks/pre-commit
echo 'Creating post-commit git hook...'
echo '#!/bin/sh' > .git/hooks/post-commit
echo 'if [ -x ./_post-commit.sh ]; then' >> .git/hooks/post-commit
echo ' source ./_post-commit.sh' >> .git/hooks/post-commit
echo ' . ./_post-commit.sh' >> .git/hooks/post-commit
echo 'fi' >> .git/hooks/post-commit

View File

@ -352,7 +352,7 @@ t MSG_116 "This image uses Grub %s but the application only includes the install
"automatically if present. If no match can be found online, then the default version will be used."
t MSG_117 "Standard Windows installation"
# Only translate if Microsoft has a specific name for http://en.wikipedia.org/wiki/Windows_To_Go in your language
# Otherwise, you can add a parenthesis eg. "Windows To Go (hint at what it does)" and/or use the tooltip (MSG_200)
# Otherwise, you can add a parenthesis eg. "Windows To Go (hint at what it does)"
t MSG_118 "Windows To Go"
t MSG_119 "advanced drive properties"
t MSG_120 "advanced format options"

View File

@ -794,9 +794,10 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
// Check the FAT label to see if we're dealing with an UEFI_NTFS partition
buf = calloc(SelectedDrive.SectorSize, 1);
if (buf != NULL) {
SetFilePointerEx(hPhysical, DriveLayout->PartitionEntry[i].StartingOffset, NULL, FILE_BEGIN);
ReadFile(hPhysical, buf, SelectedDrive.SectorSize, &size, NULL);
isUefiNtfs = (strncmp(&buf[0x2B], "UEFI_NTFS", 9) == 0);
if (SetFilePointerEx(hPhysical, DriveLayout->PartitionEntry[i].StartingOffset, NULL, FILE_BEGIN) &&
ReadFile(hPhysical, buf, SelectedDrive.SectorSize, &size, NULL)) {
isUefiNtfs = (strncmp(&buf[0x2B], "UEFI_NTFS", 9) == 0);
}
free(buf);
}
}

View File

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