This is an automated email from Gerrit. Paul Fertser ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/4356
-- gerrit commit dc5874e05eacf129f1b42f66209a2a14b9bd1574 Author: Paul Fertser <[email protected]> Date: Thu Jan 18 11:59:10 2018 +0300 svf: improve robustness when processing invalid SVF files Uninitialized argument value warnings reported by clang static analizer. Change-Id: I30af4900f517ffc0a7282689b58c7a224cdc080a Signed-off-by: Paul Fertser <[email protected]> diff --git a/src/svf/svf.c b/src/svf/svf.c index 1d686ba..223af7e 100644 --- a/src/svf/svf.c +++ b/src/svf/svf.c @@ -741,6 +741,9 @@ parse_char: pos++; } + if (num == 0) + return ERROR_FAIL; + *num_of_argu = num; return ERROR_OK; @@ -1313,7 +1316,7 @@ XXR_common: * SEC]] [ENDSTATE end_state] */ /* RUNTEST [run_state] min_time SEC [MAXIMUM max_time SEC] [ENDSTATE * end_state] */ - if ((num_of_argu < 3) && (num_of_argu > 11)) { + if ((num_of_argu < 3) || (num_of_argu > 11)) { LOG_ERROR("invalid parameter of %s", argus[0]); return ERROR_FAIL; } -- ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
