Fix issues reported by klocwork (#1060)

Fix issues reported by klocwork, fix host_tool compile error,
and update build script of benchmark jetstream
This commit is contained in:
Wenyong Huang
2022-03-24 17:34:22 +08:00
committed by GitHub
parent 7262aebf77
commit 5264ce4118
7 changed files with 31 additions and 13 deletions

View File

@ -224,6 +224,8 @@ on_rsp_byte_arrive(unsigned char ch, rsp_recv_context_t *ctx)
if (ctx->size_in_phase == 2) {
ctx->size_in_phase = 0;
bh_assert(ctx->receive_index >= 3);
if ((hex(ctx->receive_buffer[ctx->receive_index - 2]) << 4
| hex(ctx->receive_buffer[ctx->receive_index - 1]))
!= ctx->check_sum) {