This is an automated email from Gerrit.

Andrey Yurovsky ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/2276

-- gerrit

commit 85b9b7d63e249170b6d7cb7351735d52980d9e68
Author: Andrey Yurovsky <[email protected]>
Date:   Thu Aug 28 11:54:29 2014 -0700

    stm32lx: don't allow part_info to be uninitialized
    
    It's possible for us to fail to read the part ID code so make sure that
    part_info is initialized to NULL before attempting to do so, otherwise
    we could proceed and use it uninitialized and then segfault.
    
    Change-Id: I0a3f3d3947690b66f0981b5046340449521e0b33
    Signed-off-by: Jack Peel <[email protected]>
    Signed-off-by: Andrey Yurovsky <[email protected]>

diff --git a/src/flash/nor/stm32lx.c b/src/flash/nor/stm32lx.c
index f7074c3..eee9f54 100644
--- a/src/flash/nor/stm32lx.c
+++ b/src/flash/nor/stm32lx.c
@@ -624,6 +624,7 @@ static int stm32lx_probe(struct flash_bank *bank)
        uint32_t second_bank_base;
 
        stm32lx_info->probed = 0;
+       stm32lx_info->part_info = NULL;
 
        int retval = stm32lx_read_id_code(bank->target, &device_id);
        if (retval != ERROR_OK)

-- 

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to