[coreboot] [commit] r4946 - trunk/util/nvramtool
svn at coreboot.org
svn at coreboot.org
Tue Nov 17 12:52:18 CET 2009
Author: oxygene
Date: 2009-11-17 12:52:18 +0100 (Tue, 17 Nov 2009)
New Revision: 4946
Modified:
trunk/util/nvramtool/cmos_lowlevel.c
Log:
Initialize memory before using it. put_bits wants it that way.
Trivial.
Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi at coresystems.de>
Modified: trunk/util/nvramtool/cmos_lowlevel.c
===================================================================
--- trunk/util/nvramtool/cmos_lowlevel.c 2009-11-16 17:29:22 UTC (rev 4945)
+++ trunk/util/nvramtool/cmos_lowlevel.c 2009-11-17 11:52:18 UTC (rev 4946)
@@ -93,7 +93,7 @@
result = 0;
if (e->config == CMOS_ENTRY_STRING)
- { char *newstring = malloc((length+7)/8);
+ { char *newstring = calloc(1, (length+7)/8);
unsigned usize = (8 * sizeof(unsigned long long));
if(!newstring) { out_of_memory(); }
More information about the coreboot
mailing list