Use strnlen()

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-01-25 16:14:36 +00:00
parent 36e9a5d57d
commit 4047abee33
2 changed files with 4 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ struct node {
_pure_ static inline size_t
db_size(const uint8_t *a)
{
return (a[0] ?: str_len((char *)a + 1)) + 1;
return (a[0] ?: str_len((char *)a + 1, 4096)) + 1;
}
_pure_ static inline size_t