]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/fuzz/fuzz-bus-label.c
Merge pull request #17549 from yuwata/tiny-fixes
[thirdparty/systemd.git] / src / fuzz / fuzz-bus-label.c
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2
3 #include <errno.h>
4
5 #include "alloc-util.h"
6 #include "bus-label.h"
7 #include "fuzz.h"
8
9 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
10 _cleanup_free_ char *unescaped = NULL, *escaped = NULL;
11
12 unescaped = bus_label_unescape_n((const char*)data, size);
13 assert_se(unescaped != NULL);
14 escaped = bus_label_escape(unescaped);
15 assert_se(escaped != NULL);
16
17 return 0;
18 }