Skip to content

Commit

Permalink
common BUGFIX avoid overflow
Browse files Browse the repository at this point in the history
... even though it's harmless.
  • Loading branch information
michalvasko committed Jun 26, 2024
1 parent c5996da commit 014507d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ly_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ ly_strncmp(const char *refstr, const char *str, size_t str_len)
LY_ERR
ly_strntou8(const char *nptr, size_t len, uint8_t *ret)
{
uint8_t num = 0, dig, dec_pow;
uint8_t num = 0, dig;
uint16_t dec_pow;

if (len > 3) {
/* overflow for sure */
Expand Down

0 comments on commit 014507d

Please sign in to comment.