Skip to content

Commit

Permalink
Fix corner case converting text to int
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Bertin <sbertin@telular.com>
  • Loading branch information
sbertin-telular committed Feb 5, 2019
1 parent fdd1528 commit 5e9b23a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ int utils_textToInt(uint8_t * buffer,
i++;
}

if (result > INT64_MAX) return 0;
if (result > INT64_MAX + (uint64_t)(sign == -1 ? 1 : 0)) return 0;

if (sign == -1)
{
Expand Down

0 comments on commit 5e9b23a

Please sign in to comment.