fix: bsdl folder error printed uninitialized buffer
In cmd_autoinit, when find_first_file fails to open ./bsdl_files/ the error path printed `filename` — which is only populated inside the directory-walk loop. Outside that loop it is uninitialized stack content, leading to garbage in the error message (and a confusing diagnostic when bs is launched from a directory without a bsdl_files/ subfolder, e.g. build/). Print `scanfolder` (the actual path that was attempted) instead. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1571,7 +1571,7 @@ static int cmd_autoinit(script_ctx *ctx, char *line)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ctx->script_printf(ctx, MSG_ERROR, "Can't access the bsdl sub folder ! : %s\n", filename);
|
ctx->script_printf(ctx, MSG_ERROR, "Can't access the bsdl sub folder ! : %s\n", scanfolder);
|
||||||
return JTAG_CORE_ACCESS_ERROR;
|
return JTAG_CORE_ACCESS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user