[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:
Pierre Schweitzer 2014-04-06 13:22:21 +00:00
parent d141ce54b6
commit 362bca1c4a

View file

@ -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;
}