From 362bca1c4a7d0a9c11e5e7f27a80315b8f49efd5 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 6 Apr 2014 13:22:21 +0000 Subject: [PATCH] [FREELDR] Don't call strlen to get max len of an uninit string CID #731721 CID #731722 svn path=/trunk/; revision=62652 --- reactos/boot/freeldr/freeldr/disk/disk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/disk/disk.c b/reactos/boot/freeldr/freeldr/disk/disk.c index 67e962706bb..c6e061c2089 100644 --- a/reactos/boot/freeldr/freeldr/disk/disk.c +++ b/reactos/boot/freeldr/freeldr/disk/disk.c @@ -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; }