From 1077197170cbdce90a24aa0ff3e6b94c36552877 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Mon, 20 Jun 2011 15:16:05 +0200 Subject: [PATCH] Add missing check for NULL product string --- src/ftdi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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) -- 1.7.1