]> www.infradead.org Git - users/borneoa/openocd-next.git/commit
helper: configuration: check for empty search dirs
authorAntonio Borneo <borneo.antonio@gmail.com>
Thu, 22 May 2025 00:02:19 +0000 (02:02 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 7 Jun 2025 09:58:53 +0000 (09:58 +0000)
commit40e6c98dfc46a7ce7bf5e029c7c69491f8d8c58f
treee7bed8b1e1346a43305a2627ebfbe91cf0af56c2
parent3fbca95ae13b8caea3194a85bc4b2a29ebe31a66
helper: configuration: check for empty search dirs

The function find_file() is supposed to be called when the search
dirs in 'script_search_dirs' has already been populated.

This is not the case when the command 'ocd_find' is used in one of
the embedded scripts 'startup.tcl'. It then triggers SIGSEGV.

Check for 'script_search_dirs' and eventually skip searching in
the dirs.

Change-Id: I9e75a8739c94de72041fb64487910d60dffcb2bd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8931
Tested-by: jenkins
src/helper/configuration.c