We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef63cca commit c466657Copy full SHA for c466657
Modules/_xxtestfuzz/fuzzer.c
@@ -56,13 +56,11 @@ static int fuzz_builtin_int(const char* data, size_t size) {
56
base = -base;
57
}
58
59
- PyObject* s = PyUnicode_FromStringAndSize(data, size);
+ PyObject* s = PyUnicode_DecodeUTF8(data, size, "replace");
60
if (s == NULL) {
61
- if (PyErr_ExceptionMatches(PyExc_UnicodeDecodeError)) {
62
- PyErr_Clear();
63
- }
64
return 0;
65
+
66
PyObject* l = PyLong_FromUnicodeObject(s, base);
67
if (l == NULL && PyErr_ExceptionMatches(PyExc_ValueError)) {
68
PyErr_Clear();
0 commit comments