mirror of
https://github.com/reactos/reactos.git
synced 2024-10-22 05:46:19 +00:00
[FREELDR]
Don't call strlen to get max len of an uninit string CID #731721 CID #731722 svn path=/trunk/; revision=62652
This commit is contained in:
parent
d141ce54b6
commit
362bca1c4a
|
@ -114,7 +114,7 @@ DiskGetBootPath(char *BootPath, unsigned Size)
|
|||
{
|
||||
/* This is a floppy */
|
||||
|
||||
if (Size <= sizeof(Path) + 7 + strlen(Device))
|
||||
if (Size <= sizeof(Path) + 7 + sizeof(Device))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ DiskGetBootPath(char *BootPath, unsigned Size)
|
|||
|
||||
FrldrBootPartition = BootPartition;
|
||||
|
||||
if (Size <= sizeof(Path) + 18 + strlen(Device) + strlen(Partition))
|
||||
if (Size <= sizeof(Path) + 18 + sizeof(Device) + sizeof(Partition))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ DiskGetBootPath(char *BootPath, unsigned Size)
|
|||
{
|
||||
/* This is a CD-ROM drive */
|
||||
|
||||
if (Size <= sizeof(Path) + 7 + strlen(Device))
|
||||
if (Size <= sizeof(Path) + 7 + sizeof(Device))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue