We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a92d06 commit a42da3bCopy full SHA for a42da3b
1 file changed
src/image.c
@@ -149,12 +149,13 @@ static int image_hash(struct wolfBoot_image *img, uint8_t *hash)
149
{
150
uint8_t *stored_sha, *end_sha;
151
uint8_t stored_sha_len;
152
- uint8_t *p = get_img_hdr(img);
+ uint8_t *p;
153
int blksz;
154
uint32_t position = 0;
155
wc_Sha256 sha256_ctx;
156
if (!img)
157
return -1;
158
+ p = get_img_hdr(img);
159
stored_sha_len = get_header(img, HDR_SHA256, &stored_sha);
160
if (stored_sha_len != SHA256_DIGEST_SIZE)
161
0 commit comments