summaryrefslogtreecommitdiffstats
path: root/lib/unwarminder/backtrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unwarminder/backtrace.c')
-rw-r--r--lib/unwarminder/backtrace.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/unwarminder/backtrace.c b/lib/unwarminder/backtrace.c
index 4e1609137c..294b7f66f4 100644
--- a/lib/unwarminder/backtrace.c
+++ b/lib/unwarminder/backtrace.c
@@ -23,6 +23,7 @@
***************************************************************************/
#include "backtrace.h"
+#include "safe_read.h"
/***************************************************************************
* Prototypes
@@ -86,20 +87,17 @@ static Boolean CliReport(void *data, Int32 address)
static Boolean CliReadW(const Int32 a, Int32 *v)
{
- *v = *(Int32 *)a;
- return TRUE;
+ return safe_read32((uint32_t *)a, (uint32_t *)v);
}
static Boolean CliReadH(const Int32 a, Int16 *v)
{
- *v = *(Int16 *)a;
- return TRUE;
+ return safe_read16((void *)a, (uint16_t *)v);
}
static Boolean CliReadB(const Int32 a, Int8 *v)
{
- *v = *(Int8 *)a;
- return TRUE;
+ return safe_read8((void *)a, (uint8_t *)v);
}
Boolean CliInvalidateW(const Int32 a)