summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-hwdb.c
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2018-03-27 20:30:02 +0300
committerGitHub <noreply@github.com>2018-03-27 20:30:02 +0300
commit1700f4f42c569adb7c15bb403f840263c9a5a88d (patch)
tree70995ae7c06e25c923a6e13765e78dd5324b7b50 /src/udev/udevadm-hwdb.c
parente64c2d0b5fbd8ab75d8f73f5820696ee15c8c6f0 (diff)
parent94ac201ac2dd8228038f0451d81aee897aa007f6 (diff)
downloadsystemd-1700f4f42c569adb7c15bb403f840263c9a5a88d.tar.gz
Merge pull request #8576 from keszybz/oss-fuzz
oss-fuzz adjustments and other cleanups
Diffstat (limited to 'src/udev/udevadm-hwdb.c')
-rw-r--r--src/udev/udevadm-hwdb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
index 3a5b138b31..f17e0d7946 100644
--- a/src/udev/udevadm-hwdb.c
+++ b/src/udev/udevadm-hwdb.c
@@ -114,7 +114,9 @@ static struct trie_node *node_lookup(const struct trie_node *node, uint8_t c) {
struct trie_child_entry search;
search.c = c;
- child = bsearch(&search, node->children, node->children_count, sizeof(struct trie_child_entry), trie_children_cmp);
+ child = bsearch_safe(&search,
+ node->children, node->children_count, sizeof(struct trie_child_entry),
+ trie_children_cmp);
if (child)
return child->child;
return NULL;