Skip to content

Commit 2418cbd

Browse files
Drop PyCF_SOURCE_IS_UTF8
1 parent 702aa3f commit 2418cbd

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

Modules/_xxtestfuzz/fuzzer.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -533,27 +533,24 @@ static int fuzz_pycompile(const char* data, size_t size) {
533533
unsigned char flags_byte = (unsigned char) data[2];
534534
PyCompilerFlags flags = _PyCompilerFlags_INIT;
535535
if (flags_byte & 0x01) {
536-
flags.cf_flags |= PyCF_SOURCE_IS_UTF8;
537-
}
538-
if (flags_byte & 0x02) {
539536
flags.cf_flags |= PyCF_DONT_IMPLY_DEDENT;
540537
}
541-
if (flags_byte & 0x04) {
538+
if (flags_byte & 0x02) {
542539
flags.cf_flags |= PyCF_ONLY_AST;
543540
}
544-
if (flags_byte & 0x08) {
541+
if (flags_byte & 0x04) {
545542
flags.cf_flags |= PyCF_IGNORE_COOKIE;
546543
}
547-
if (flags_byte & 0x10) {
544+
if (flags_byte & 0x08) {
548545
flags.cf_flags |= PyCF_TYPE_COMMENTS;
549546
}
550-
if (flags_byte & 0x20) {
547+
if (flags_byte & 0x10) {
551548
flags.cf_flags |= PyCF_ALLOW_TOP_LEVEL_AWAIT;
552549
}
553-
if (flags_byte & 0x40) {
550+
if (flags_byte & 0x20) {
554551
flags.cf_flags |= PyCF_ALLOW_INCOMPLETE_INPUT;
555552
}
556-
if (flags_byte & 0x80) {
553+
if (flags_byte & 0x40) {
557554
flags.cf_flags |= PyCF_OPTIMIZED_AST;
558555
}
559556

0 commit comments

Comments
 (0)