quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

commit 5903841fd1322fb6995fcaad4e3fbfacc6412835
parent 4293027ad91df273b35f94cfd9929862ea6abf00
Author: Fabrice Bellard <fabrice@bellard.org>
Date:   Thu, 11 Jan 2024 15:28:41 +0100

fixed uninitialized harnessbuf

Diffstat:
Mquickjs/run-test262.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/quickjs/run-test262.c b/quickjs/run-test262.c @@ -1517,7 +1517,7 @@ void update_stats(JSRuntime *rt, const char *filename) { #undef update } -int run_test_buf(const char *filename, char *harness, namelist_t *ip, +int run_test_buf(const char *filename, const char *harness, namelist_t *ip, char *buf, size_t buf_len, const char* error_type, int eval_flags, BOOL is_negative, BOOL is_async, BOOL can_block) @@ -1601,6 +1601,8 @@ int run_test(const char *filename, int index) if (p) { snprintf(harnessbuf, sizeof(harnessbuf), "%.*s%s", (int)(p - filename), filename, "harness"); + } else { + pstrcpy(harnessbuf, sizeof(harnessbuf), ""); } harness = harnessbuf; } @@ -1688,6 +1690,8 @@ int run_test(const char *filename, int index) if (p) { snprintf(harnessbuf, sizeof(harnessbuf), "%.*s%s", (int)(p - filename), filename, "test/harness"); + } else { + pstrcpy(harnessbuf, sizeof(harnessbuf), ""); } harness = harnessbuf; }