git://developer.intra2net.com
/
libftdi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
ftdi_eeprom: Fix segmentation fault after --flash_eeprom
[libftdi]
/
ftdi_eeprom
/
main.c
diff --git
a/ftdi_eeprom/main.c
b/ftdi_eeprom/main.c
index
0ffffd7
..
94cd7ec
100644
(file)
--- a/
ftdi_eeprom/main.c
+++ b/
ftdi_eeprom/main.c
@@
-346,6
+346,8
@@
int main(int argc, char *argv[])
else
printf ("Writing to file: %s\n", filename);
+ if (eeprom_buf == NULL)
+ eeprom_buf = malloc(my_eeprom_size);
ftdi_get_eeprom_buf(ftdi, eeprom_buf, my_eeprom_size);
fwrite(eeprom_buf, my_eeprom_size, 1, fp);