aboutsummaryrefslogtreecommitdiff
path: root/src/target/target.c
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-13 00:33:55 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-13 00:33:55 +0000
commit16c77cf3cac6e568813bbf88af7a6e3c32f5fbc6 (patch)
tree2da14514d5d55b5820729bcec1f3b35e462e56d4 /src/target/target.c
parent890973acc46bcf21031a28ac5ac97154989dc3c4 (diff)
Improve handle_verify_image_command_internal command argument handling:
- Use parse_u32 to ensure address parses properly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2234 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/target.c')
-rw-r--r--src/target/target.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/target/target.c b/src/target/target.c
index ded4d55d..5a7ac3bc 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2366,8 +2366,12 @@ static int handle_verify_image_command_internal(struct command_context_s *cmd_ct
if (argc >= 2)
{
+ u32 addr;
+ retval = parse_u32(args[1], &addr);
+ if (ERROR_OK != retval)
+ return ERROR_COMMAND_SYNTAX_ERROR;
+ image.base_address = addr;
image.base_address_set = 1;
- image.base_address = strtoul(args[1], NULL, 0);
}
else
{