From: Zach W. <zw...@us...> - 2009-11-20 16:13:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 153848e6cc79241a8da51c1b601c13722b5380a6 (commit) from a1777fc6493b4c1879ef133c565327212859d37c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 153848e6cc79241a8da51c1b601c13722b5380a6 Author: Zachary T Welch <zw...@su...> Date: Thu Nov 19 18:11:30 2009 -0800 fix flash/nand name parsing Start driver.num check from end, and make sure the numeric part is actually a number. Fix problems trying to parse bank names. diff --git a/src/flash/common.c b/src/flash/common.c index 253ed9d..072e691 100644 --- a/src/flash/common.c +++ b/src/flash/common.c @@ -25,9 +25,11 @@ unsigned get_flash_name_index(const char *name) { - const char *index = strchr(name, '.'); + const char *index = strrchr(name, '.'); if (NULL == index) return 0; + if (index[1] < '0' || index[1] > '9') + return ~0U; unsigned requested; int retval = parse_uint(index + 1, &requested); // detect parsing error by forcing past end of bank list ----------------------------------------------------------------------- Summary of changes: src/flash/common.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |