Skip to content

Commit

Permalink
fix null pointer exception in sts_get_pass_target_token_in_hdr_name
Browse files Browse the repository at this point in the history
return default when not set

Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
  • Loading branch information
zandbelt committed Dec 7, 2020
1 parent 6d47e62 commit d5417d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sts.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ char sts_get_pass_target_token_in(oauth2_sts_cfg_t *cfg)

const char *sts_get_pass_target_token_in_hdr_name(oauth2_sts_cfg_t *cfg)
{
if (cfg->pass_target_token_in.header.name == NULL)
return STS_TARGET_TOKEN_HEADER_NAME_DEFAULT;
return cfg->pass_target_token_in.header.name;
}

Expand Down

0 comments on commit d5417d0

Please sign in to comment.