This is an automated email from Gerrit.

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

-- gerrit

commit b299bce44354b49ee348af0b6898932bb034431a
Author: Spencer Oliver <[email protected]>
Date:   Wed May 23 12:31:16 2012 +0100

    target: fix segfault in arm7_9 8/16bit read
    
    Seems I5347352e7595686634bd0de13fcf6de6e55027b0 introduced an issue when
    reading 8/16 bit data - the in buffer was always set to 32bits.
    
    Change-Id: Ife2bb6a20fcb3ec0e486655512164f25ae9196b4
    Signed-off-by: Spencer Oliver <[email protected]>

diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index 377c302..2721502 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -223,7 +223,7 @@ static int arm7tdmi_clock_data_in_endianness(struct 
arm_jtag *jtag_info,
        fields[0].out_value = NULL;
        fields[0].in_value = NULL;
 
-       fields[1].num_bits = 32;
+       fields[1].num_bits = size * 8;
        fields[1].out_value = NULL;
        fields[1].in_value = in;
 
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index 380dca5..e8ad932 100644
--- a/src/target/arm9tdmi.c
+++ b/src/target/arm9tdmi.c
@@ -272,7 +272,7 @@ int arm9tdmi_clock_data_in_endianness(struct arm_jtag 
*jtag_info,
        if (retval != ERROR_OK)
                return retval;
 
-       fields[0].num_bits = 32;
+       fields[0].num_bits = size * 8;
        fields[0].out_value = NULL;
        fields[0].in_value = in;
 

-- 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to