Skip to content

Commit e597ce2

Browse files
committed
code: correct strstr assignments to compile with glibc 2.43
closes #73; thanks @Saur2000 Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
1 parent 4540b88 commit e597ce2

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

ChangeLog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
03/25/2026
2-
- use strncasecmp on content type when obtaining a token from POST; closes #72; thanks @roubert
2+
- proto: use strncasecmp on content type when obtaining a token from POST; closes #72; thanks @roubert
3+
- code: correct strstr assignments to compile with glibc 2.43; closes #73; thanks @Saur2000
34

45
02/03/2026
56
- code: assign strstr to char instead of const char to compile with globc 2.43

src/jose.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ char *oauth2_jose_jwt_header_peek(oauth2_log_t *log,
993993
{
994994
char *input = NULL, *result = NULL;
995995
json_t *json = NULL;
996-
char *p = NULL;
996+
const char *p = NULL;
997997
size_t result_len;
998998
char *rv = NULL;
999999

test/check_openidc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ _oauth2_check_openidc_idtoken_create(oauth2_log_t *log, cjose_jwk_t *jwk,
226226
static char *oauth2_check_openidc_serve_post(const char *request)
227227
{
228228
oauth2_nv_list_t *params = NULL;
229-
char *data = NULL;
229+
const char *data = NULL;
230230
const char *code = NULL;
231231
const char *sep = "****";
232232
char *rv = NULL;
@@ -235,7 +235,7 @@ static char *oauth2_check_openidc_serve_post(const char *request)
235235
if (strncmp(request, token_endpoint_path,
236236
strlen(token_endpoint_path)) == 0) {
237237
request += strlen(token_endpoint_path) + 5;
238-
data = strstr((char *)request, sep);
238+
data = strstr(request, sep);
239239
if (data == NULL)
240240
goto error;
241241
data += strlen(sep);
@@ -821,7 +821,7 @@ static void _openidc_verify_authentication_request_state(
821821
{
822822
bool rc = false;
823823
const char *location = NULL;
824-
char *state = NULL;
824+
const char *state = NULL;
825825

826826
ck_assert_ptr_ne(NULL, response);
827827
ck_assert_uint_eq(oauth2_http_response_status_code_get(_log, response),

0 commit comments

Comments
 (0)