Skip to content

Commit

Permalink
fix check for UTF-8 characters. Found by PVS-Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Dec 19, 2019
1 parent e1b6b40 commit a73791d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/util/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ inline size_t fr_utf8_char(uint8_t const *str, ssize_t inlen)
}

if ((str[0] >= 0xf1) && /* 6 */
(str[1] <= 0xf3) &&
(str[0] <= 0xf3) &&
(str[1] >= 0x80) &&
(str[1] <= 0xbf) &&
(str[2] >= 0x80) &&
Expand Down

0 comments on commit a73791d

Please sign in to comment.