mirror of
https://github.com/reactos/reactos.git
synced 2025-05-27 13:08:23 +00:00
[NTOS] Fix a NULL-pointer access bug.
This commit is contained in:
parent
fefb982d64
commit
bf6b5e1ceb
1 changed files with 2 additions and 1 deletions
|
@ -1392,7 +1392,6 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
BOOLEAN IsValid, IsEmpty = TRUE;
|
BOOLEAN IsValid, IsEmpty = TRUE;
|
||||||
PVOID MbrBuffer;
|
PVOID MbrBuffer;
|
||||||
PIO_STACK_LOCATION IoStackLocation;
|
PIO_STACK_LOCATION IoStackLocation;
|
||||||
PBOOT_SECTOR_INFO BootSectorInfo = (PBOOT_SECTOR_INFO)Buffer;
|
|
||||||
UCHAR PartitionType;
|
UCHAR PartitionType;
|
||||||
LARGE_INTEGER HiddenSectors64;
|
LARGE_INTEGER HiddenSectors64;
|
||||||
VolumeOffset.QuadPart = Offset.QuadPart = 0;
|
VolumeOffset.QuadPart = Offset.QuadPart = 0;
|
||||||
|
@ -1723,6 +1722,8 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
if ((DiskGeometry.MediaType == RemovableMedia) &&
|
if ((DiskGeometry.MediaType == RemovableMedia) &&
|
||||||
(j == 0) && (MbrFound) && (IsEmpty))
|
(j == 0) && (MbrFound) && (IsEmpty))
|
||||||
{
|
{
|
||||||
|
PBOOT_SECTOR_INFO BootSectorInfo = (PBOOT_SECTOR_INFO)Buffer;
|
||||||
|
|
||||||
/* Read the jump bytes to detect super-floppy */
|
/* Read the jump bytes to detect super-floppy */
|
||||||
if ((BootSectorInfo->JumpByte[0] == 0xeb) ||
|
if ((BootSectorInfo->JumpByte[0] == 0xeb) ||
|
||||||
(BootSectorInfo->JumpByte[0] == 0xe9))
|
(BootSectorInfo->JumpByte[0] == 0xe9))
|
||||||
|
|
Loading…
Reference in a new issue