Skip to content

Commit

Permalink
sessions: validate_arg doesn't call probe_session
Browse files Browse the repository at this point in the history
  • Loading branch information
qpernil committed Nov 15, 2024
1 parent 11b7912 commit af037bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1599,8 +1599,7 @@ static int validate_arg(yubihsm_context *ctx, char type, const char *value,
if (type == 'b') {
parsed->b = (uint8_t) num;
} else if (type == 'e') {
if (num >= sizeof(ctx->sessions) / sizeof(ctx->sessions[0]) ||
!probe_session(ctx, num)) {
if (num >= sizeof(ctx->sessions) / sizeof(ctx->sessions[0]) || ctx->sessions[num] == NULL) {
return -1;
}
parsed->e = ctx->sessions[num];
Expand Down

0 comments on commit af037bc

Please sign in to comment.