Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
more fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch committed Sep 21, 2023
1 parent a24b6cb commit b3cc3c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions crypto/hmac256-internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
*/

#include <string.h>
#include <strings.h>

#include "hmac256_i.h"

Expand Down Expand Up @@ -83,7 +82,7 @@ void hmac_sha256_final(struct hmac_sha256_ctx *ctx, uint8_t *mac,
// we need to pad the "ctx_inside" state because `sha256_compress` expects a padded input
uint64_t bit_len = __builtin_bswap64(SHA256_DIGEST_SIZE * 8 + 512);
block[SHA256_DIGEST_SIZE] = 0x80;
bzero(block + SHA256_DIGEST_SIZE + 1, SHA256_BLOCK_SIZE - SHA256_DIGEST_SIZE - 1);
memset(block + SHA256_DIGEST_SIZE + 1, 0, SHA256_BLOCK_SIZE - SHA256_DIGEST_SIZE - 1);
memcpy(block + SHA256_BLOCK_SIZE - sizeof(bit_len), &bit_len, sizeof(bit_len));

sha256_compress(&ctx->ctx_outside, block);
Expand Down
2 changes: 0 additions & 2 deletions util/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ int aio_bh_poll(AioContext *ctx)

/* Synchronizes with QSLIST_INSERT_HEAD_ATOMIC in aio_bh_enqueue(). */
QSLIST_MOVE_ATOMIC(&slice.bh_list, &ctx->bh_list);
#ifdef WIN32
#pragma GCC diagnostic warning "-Wdangling-pointer"
#endif
QSIMPLEQ_INSERT_TAIL(&ctx->bh_slice_list, &slice, next);

while ((s = QSIMPLEQ_FIRST(&ctx->bh_slice_list))) {
Expand Down

0 comments on commit b3cc3c1

Please sign in to comment.