From d45d6648ad017652e18aefc65c1300c5392b2f8e Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Wed, 15 Sep 2010 17:32:48 +0200 Subject: [PATCH] EEPROM: Null out buffer after allocation --- src/ftdi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/ftdi.c b/src/ftdi.c index 16af24e..c9492f5 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -105,6 +105,7 @@ int ftdi_init(struct ftdi_context *ftdi) if (eeprom == 0) ftdi_error_return(-2, "Can't malloc struct ftdi_eeprom"); + memset(eeprom, 0, sizeof(struct ftdi_eeprom); ftdi->eeprom = eeprom; /* All fine. Now allocate the readbuffer */ -- 1.7.1