X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=src%2Fftdi.c;h=ccbb4872f7706b16cb9a86da033c624b0f8dbe9b;hp=64257da1cce3292bbda9c7bc118fd43e02d1f2cb;hb=3bc0387ed13b23a14c1012d37c2a926218c9f9f7;hpb=45a3ebd502c405488935ac61e502296942b9b83a diff --git a/src/ftdi.c b/src/ftdi.c index 64257da..ccbb487 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -3025,7 +3025,7 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, int verbose) unsigned char manufacturer_size = 0, product_size = 0, serial_size = 0; int eeprom_size; struct ftdi_eeprom *eeprom; - unsigned char *buf = ftdi->eeprom->buf; + unsigned char *buf = NULL; if (ftdi == NULL) ftdi_error_return(-1,"No context"); @@ -3034,6 +3034,7 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, int verbose) eeprom = ftdi->eeprom; eeprom_size = eeprom->size; + buf = ftdi->eeprom->buf; // Addr 02: Vendor ID eeprom->vendor_id = buf[0x02] + (buf[0x03] << 8);