Skip to content

Commit 014507d

Browse files
committed
common BUGFIX avoid overflow
... even though it's harmless.
1 parent c5996da commit 014507d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ly_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ ly_strncmp(const char *refstr, const char *str, size_t str_len)
7474
LY_ERR
7575
ly_strntou8(const char *nptr, size_t len, uint8_t *ret)
7676
{
77-
uint8_t num = 0, dig, dec_pow;
77+
uint8_t num = 0, dig;
78+
uint16_t dec_pow;
7879

7980
if (len > 3) {
8081
/* overflow for sure */

0 commit comments

Comments
 (0)