mirror of
https://github.com/bluekitchen/btstack.git
synced 2024-12-29 09:26:08 +00:00
21 lines
486 B
C
21 lines
486 B
C
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
#include "classic/hfp.h"
|
|
|
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|
// test ad iterator by calling simple function that uses it
|
|
if (size < 1) return 0;
|
|
|
|
int is_handsfree = data[0] & 1;
|
|
hfp_connection_t hfp_connection;
|
|
memset(&hfp_connection, 0, sizeof(hfp_connection_t));
|
|
|
|
uint32_t i;
|
|
for (i = 1; i < size; i++){
|
|
hfp_parse(&hfp_connection, data[i], is_handsfree);
|
|
}
|
|
|
|
return 0;
|
|
}
|