verify the part is a Blackfin before we try using the bfin command on it and segfaulting

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1884 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 14 years ago
parent 938c7f2971
commit 3b66533b37

@ -1,3 +1,8 @@
2011-02-19 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_bfin.c (cmd_bfin_run): Make sure the part is a Blackfin before
we try calling functions that don't exist and segfault.
2011-02-18 Mike Frysinger <vapier@gentoo.org>
* src/bfin/bfin-part.c (_bfin_part_init): Add missing "void" to param list.

@ -70,6 +70,12 @@ cmd_bfin_run (urj_chain_t *chain, char *params[])
return URJ_STATUS_FAIL;
}
if (!part_is_bfin (chain, chain->active_part))
{
urj_error_set (URJ_ERROR_ILLEGAL_STATE, "not a Blackfin part");
return URJ_STATUS_FAIL;
}
assert (chain->active_part >= 0 && chain->active_part < chain->parts->len);
if (strcmp (params[1], "emulation") == 0)

Loading…
Cancel
Save