mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-29 22:15:21 -04:00
[misc] fix coverity warnings in drive.c
* Also apply minor fixes to rufus.loc and _set_git_hooks.sh
This commit is contained in:
parent
6513b5e0b4
commit
4a8c5be9c5
4 changed files with 12 additions and 11 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue