Last change
on this file since 454 was 439, checked in by coas-nagasima, 4 years ago |
mrubyを2.1.1に更新
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
391 bytes
|
Line | |
---|
1 | #include <stdlib.h>
|
---|
2 | #include <string.h>
|
---|
3 | #include <mruby.h>
|
---|
4 | #include <mruby/compile.h>
|
---|
5 |
|
---|
6 | int LLVMFuzzerTestOneInput(uint8_t *Data, size_t size) {
|
---|
7 | if (size < 1) {
|
---|
8 | return 0;
|
---|
9 | }
|
---|
10 | char *code = malloc(size+1);
|
---|
11 | memcpy(code, Data, size);
|
---|
12 | code[size] = '\0';
|
---|
13 | mrb_state *mrb = mrb_open();
|
---|
14 | mrb_load_string(mrb, code);
|
---|
15 | mrb_close(mrb);
|
---|
16 | free(code);
|
---|
17 | return 0;
|
---|
18 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.