https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5b326e74cd23d2965ccfc…
commit 5b326e74cd23d2965ccfc5ade3f6325e7e3c9e1d
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Aug 7 18:33:53 2019 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Aug 7 18:49:18 2019 +0200
[FREELDR] Don't call twice strlen() implicitly (in the min() macro).
---
boot/freeldr/freeldr/linuxboot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/boot/freeldr/freeldr/linuxboot.c b/boot/freeldr/freeldr/linuxboot.c
index 6ddc8b99c30..b1378df2fc0 100644
--- a/boot/freeldr/freeldr/linuxboot.c
+++ b/boot/freeldr/freeldr/linuxboot.c
@@ -248,7 +248,8 @@ LinuxParseIniSection(
if (LinuxCommandLine)
{
RemoveQuotes(LinuxCommandLine);
- LinuxCommandLineSize = min(strlen(LinuxCommandLine) + 1, 260);
+ LinuxCommandLineSize = (ULONG)strlen(LinuxCommandLine) + 1;
+ LinuxCommandLineSize = min(LinuxCommandLineSize, 260);
}
return TRUE;