From: Uwe Bonnes Date: Wed, 15 Sep 2010 15:32:48 +0000 (+0200) Subject: EEPROM: Null out buffer after allocation X-Git-Tag: v1.0rc1~133^2~55 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=d45d6648ad017652e18aefc65c1300c5392b2f8e EEPROM: Null out buffer after allocation --- 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 */