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 
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)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 }
19