9922ff9de609d6d4096c0e56137c2c674c3c8bdb
6 #include <libubox/blob.h>
7 #include <libubox/blobmsg.h>
11 #include "libubus-internal.h"
13 static void _ubus_validate_hdr(const uint8_t *data
, size_t size
)
15 if (size
> sizeof(struct ubus_msghdr
))
18 ubus_validate_hdr((struct ubus_msghdr
*) data
);
21 static void _ubus_parse_msg(const uint8_t *data
, size_t size
)
23 struct blob_attr
*attr
= (struct blob_attr
*) data
;
25 if (size
< sizeof(struct blob_attr
*))
28 if (blob_pad_len(attr
) > UBUS_MAX_MSGLEN
)
34 int LLVMFuzzerTestOneInput(const uint8_t *data
, size_t size
)
36 _ubus_validate_hdr(data
, size
);
37 _ubus_parse_msg(data
, size
);