This is an automated email from Gerrit.
?yvind Harboe ([email protected]) just uploaded a new patch set to Gerrit,
which you can find at http://openocd.zylin.com/169
-- gerrit
commit 164c80717215dcbc72f403e52eacd498c0b56b8b
Author: Ãyvind Harboe <[email protected]>
Date: Sat Nov 5 13:13:50 2011 +0100
disassembly: fix access to undefined memory pointer upon unknown instruction
return error message instead. Found by clang.
Change-Id: Ica109d077206236a12d007e77cc78061ffd05834
Signed-off-by: Ãyvind Harboe <[email protected]>
diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c
index 36566c9..188b6ba 100644
--- a/src/target/arm_disassembler.c
+++ b/src/target/arm_disassembler.c
@@ -280,13 +280,13 @@ static int evaluate_ldc_stc_mcrr_mrrc(uint32_t opcode,
{
instruction->type = ARM_MCRR;
mnemonic = "MCRR";
- }
-
- /* MRRC */
- if ((opcode & 0x0ff00000) == 0x0c500000)
- {
+ } else if ((opcode & 0x0ff00000) == 0x0c500000) {
+ /* MRRC */
instruction->type = ARM_MRRC;
mnemonic = "MRRC";
+ } else {
+ LOG_ERROR("Unknown instruction");
+ return ERROR_FAIL;
}
snprintf(instruction->text, 128,
--
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Openocd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel