Skip to content

Commit 493407e

Browse files
committed
Merge branch 'master' of github.com:fluent/fluent-bit
2 parents 9903e9b + 92828e3 commit 493407e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* Fluent Bit
2+
* ==========
3+
* Copyright (C) 2019-2020 The Fluent Bit Authors
4+
* Copyright (C) 2015-2018 Treasure Data Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
#include <stdlib.h>
19+
#include <stdint.h>
20+
21+
int flb_pack_json(char*, int, char**, size_t*, int*);
22+
23+
int LLVMFuzzerTestOneInput(unsigned char *data, size_t size)
24+
{
25+
/* json packer */
26+
char *out_buf = NULL;
27+
size_t out_size;
28+
int root_type;
29+
int ret = flb_pack_json((char*)data, size, &out_buf, &out_size, &root_type);
30+
31+
if (ret == 0) {
32+
free(out_buf);
33+
}
34+
35+
return 0;
36+
}

0 commit comments

Comments
 (0)