From 3bb4d191d712b268b3769425461df7708a6d975f Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 21 Jun 2005 16:18:23 +0000 Subject: [PATCH] Corrected buffer size calculation from MAX(bufsize,realsize) to MIN(bufsize,realsize) while copying boot params. --- kernel/start.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/start.c b/kernel/start.c index 21ccbfccf..06ac5fdb4 100755 --- a/kernel/start.c +++ b/kernel/start.c @@ -49,7 +49,7 @@ U16_t parmoff, parmsize; /* boot parameters offset and length */ /* Copy the boot parameters to kernel memory. */ kinfo.params_base = seg2phys(mds) + parmoff; - kinfo.params_size = MAX(parmsize,sizeof(params)-2); + kinfo.params_size = MIN(parmsize,sizeof(params)-2); phys_copy(kinfo.params_base, vir2phys(params), kinfo.params_size); /* Record miscellaneous information for user-space servers. */