target: fix segfault in arm7_9 8/16bit read
authorSpencer Oliver <spen@spen-soft.co.uk>
Wed, 23 May 2012 11:31:16 +0000 (12:31 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Fri, 25 May 2012 12:09:11 +0000 (12:09 +0000)
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 <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/660
Tested-by: jenkins
Reviewed-by: Mathias K├╝ster <kesmtp@freenet.de>
src/target/arm7tdmi.c
src/target/arm9tdmi.c

index 377c3022301d06ee10fcb5a4c1a525a7a33cd70a..2721502f3914e856dbba84258d94cad456fd06c5 100644 (file)
@@ -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;
 
index 380dca5608b610d55e112852473d88dbc1bf9135..e8ad93289cc18eead404bf14c460f83fee50bff4 100644 (file)
@@ -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;
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)