Show More
@@ -31,12 +31,12 b' extern "C" int LLVMFuzzerInitialize(int ' | |||
|
31 | 31 | strncpy(cpypath, pypath.c_str(), pypath.size()); |
|
32 | 32 | setenv("PYTHONPATH", cpypath, 1); |
|
33 | 33 | Py_SetPythonHome(cpypath); |
|
34 | Py_InitializeEx(0); | |
|
34 | 35 | return 0; |
|
35 | 36 | } |
|
36 | 37 | |
|
37 | 38 | int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) |
|
38 | 39 | { |
|
39 | Py_InitializeEx(0); | |
|
40 | 40 | initparsers(); |
|
41 | 41 | PyObject *mtext = |
|
42 | 42 | PyBytes_FromStringAndSize((const char *)Data, (Py_ssize_t)Size); |
@@ -69,7 +69,6 b' except Exception as e:' | |||
|
69 | 69 | Py_DECREF(code); |
|
70 | 70 | Py_DECREF(locals); |
|
71 | 71 | Py_DECREF(mtext); |
|
72 | Py_Finalize(); | |
|
73 | 72 | return 0; // Non-zero return values are reserved for future use. |
|
74 | 73 | } |
|
75 | 74 | } |
General Comments 0
You need to be logged in to leave comments.
Login now