From: Uwe Bonnes Date: Mon, 20 Jun 2011 13:16:05 +0000 (+0200) Subject: Add missing check for NULL product string X-Git-Tag: v1.0rc1~125 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=1077197170cbdce90a24aa0ff3e6b94c36552877 Add missing check for NULL product string --- diff --git a/src/ftdi.c b/src/ftdi.c index 5cb3ca5..0893421 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -2226,6 +2226,7 @@ int ftdi_eeprom_initdefaults(struct ftdi_context *ftdi, char * manufacturer, if (eeprom->product) free (eeprom->product); eeprom->product = NULL; + if(product) { eeprom->product = malloc(strlen(product)+1); if (eeprom->product)