Skip to content
This repository was archived by the owner on Apr 15, 2022. It is now read-only.

Commit 8c47e53

Browse files
committed
Fixes coverity error.
1 parent ddda778 commit 8c47e53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/jwt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ jwk2pubkey (const json_t *jwk, uint8_t pubkey[YACL_P256_COORD_SIZE*2])
363363
strlen (json_string_value (j_y)),
364364
(char **)&y);
365365

366-
if (x_len <= 0 || y_len <= 0 || x_len > 256 || y_len > 256)
366+
if (x_len <= 0 || y_len <= 0 || x_len > YACL_P256_COORD_SIZE
367+
|| y_len > YACL_P256_COORD_SIZE)
367368
goto OUT;
368369

369370
memcpy (pubkey, x, x_len);

0 commit comments

Comments
 (0)