From feddcb4f4fc94a3bfd1858f1c5d37062fc9c1f3a Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Wed, 22 Aug 2012 14:57:00 +0800 Subject: [PATCH] sbvarsign: Fix invalid sizeof() for zeroing timestamp data Signed-off-by: Jeremy Kerr --- src/sbvarsign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbvarsign.c b/src/sbvarsign.c index 5017203..c1e0c84 100644 --- a/src/sbvarsign.c +++ b/src/sbvarsign.c @@ -208,7 +208,7 @@ static int set_timestamp(EFI_TIME *timestamp) /* copy to our EFI-specific time structure. Other fields (Nanosecond, * TimeZone, Daylight and Pad) are defined to be zero */ - memset(timestamp, 0, sizeof(timestamp)); + memset(timestamp, 0, sizeof(*timestamp)); timestamp->Year = tm->tm_year; timestamp->Month = tm->tm_mon; timestamp->Day = tm->tm_mday;