libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v0.17-309-g243f5f6

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 13 Apr 2012 14:50:56 +0200 (CEST)
The branch, master has been updated
       via  243f5f66d2f3eca83c64211263da97237dc96795 (commit)
      from  6162087977a2040b3f2a265b3b510e15adcbd77f (commit)


- Log -----------------------------------------------------------------
commit 243f5f66d2f3eca83c64211263da97237dc96795
Author: Anders Larsen <al@xxxxxxxxxxx>
Date:   Mon Apr 9 17:29:20 2012 +0200

    ftdi_eeprom: Fix segmentation fault after --flash_eeprom
    
    Allocate a buffer if it's not already available (hint: it was only allocated
    by --read-eeprom)
    
    Signed-off-by: Anders Larsen <al@xxxxxxxxxxx>

-----------------------------------------------------------------------

Summary of changes:
 ftdi_eeprom/main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ftdi_eeprom/main.c b/ftdi_eeprom/main.c
index 0ffffd7..94cd7ec 100644
--- 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);


hooks/post-receive
-- 
A library to talk to FTDI chips

--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • A library to talk to FTDI chips branch, master, updated. v0.17-309-g243f5f6, libftdi-git <=