Skip to content

Commit

Permalink
Merge branch 'main' into coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers committed Nov 19, 2023
2 parents 28a9b9f + 80ea918 commit 7020208
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build:
runs-on: macos-12
runs-on: ubuntu-22.04
timeout-minutes: 20

env:
Expand All @@ -21,7 +21,7 @@ jobs:

- name: Test in FreeBSD
id: test
uses: vmactions/freebsd-vm@v0
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
Expand Down
6 changes: 5 additions & 1 deletion src/httpauth/digest.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,13 @@ static int digest_response(struct httpauth_digest_enc_resp *resp,
uint8_t *hash1 = NULL;
uint8_t *hash2 = NULL;
struct mbuf *mb = NULL;
size_t hashstringl = (resp->hash_length * 2) + 1;
int err = 0, n = 0;

if (!resp || !resp->hashh)
return EINVAL;

size_t hashstringl = (resp->hash_length * 2) + 1;

mb = mbuf_alloc(str_len(user) + str_len(passwd) + chall->realm.l + 2);
if (!mb)
return ENOMEM;
Expand Down Expand Up @@ -961,6 +962,9 @@ int httpauth_digest_response_full(struct httpauth_digest_enc_resp **presp,
goto out;
}

if (err)
goto out;

err = digest_response(resp, chall, method, user, passwd, entitybody);

out:
Expand Down

0 comments on commit 7020208

Please sign in to comment.