Line  | Count  | Source  | 
1  |  | /* Copyright 2022 Google LLC  | 
2  |  | Licensed under the Apache License, Version 2.0 (the "License");  | 
3  |  | you may not use this file except in compliance with the License.  | 
4  |  | You may obtain a copy of the License at  | 
5  |  |       http://www.apache.org/licenses/LICENSE-2.0  | 
6  |  | Unless required by applicable law or agreed to in writing, software  | 
7  |  | distributed under the License is distributed on an "AS IS" BASIS,  | 
8  |  | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  | 
9  |  | See the License for the specific language governing permissions and  | 
10  |  | limitations under the License.  | 
11  |  | */  | 
12  |  | #include <config.h>  | 
13  |  |  | 
14  |  | #include <stdint.h>  | 
15  |  | #include <string.h>  | 
16  |  | #include <stdlib.h>  | 
17  |  | #include <syslog.h>  | 
18  |  |  | 
19  |  | #include "bluetooth.h"  | 
20  |  | #include "sdp.h"  | 
21  |  | #include "sdp_lib.h"  | 
22  |  | #include "sdp-xml.h"  | 
23  |  |  | 
24  | 606k  | void empty_func(void *d, const char *s) { | 
25  | 606k  |   return;  | 
26  | 606k  | }  | 
27  |  |  | 
28  | 313  | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { | 
29  | 313  |   sdp_record_t *rec;  | 
30  | 313  |   rec = sdp_xml_parse_record(data, size);  | 
31  | 313  |   if (rec != NULL) { | 
32  | 182  |     convert_sdp_record_to_xml(rec, 0, empty_func);  | 
33  | 182  |     sdp_record_free(rec);  | 
34  | 182  |   }  | 
35  |  |  | 
36  | 313  |   return 0;  | 
37  | 313  | }  |