Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.10] gh-98740: Fix validation of conditional expressions in RE (GH-98764)#99046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedNov 3, 2022
edited by bedevere-bot
Loading

In very rare circumstances the JUMP opcode could be confused with the argument of the opcode in the "then" part which doesn't end with the JUMP opcode. This led to incorrect detection of the final JUMP opcode and incorrect calculation of the size of the subexpression.

NOTE: Changed return value of functions _validate_inner() and _validate_charset() in Modules/_sre/sre.c. Now they return 0 on success, -1 on failure, and 1 if the last op is JUMP (which usually is a failure). Previously they returned 1 on success and 0 on failure..
(cherry picked from commite9ac890)

pythonGH-98764)In very rare circumstances the JUMP opcode could be confused with theargument of the opcode in the "then" part which doesn't end with theJUMP opcode. This led to incorrect detection of the final JUMP opcodeand incorrect calculation of the size of the subexpression.NOTE: Changed return value of functions _validate_inner() and_validate_charset() in Modules/_sre/sre.c.  Now they return 0 on success,-1 on failure, and 1 if the last op is JUMP (which usually is a failure).Previously they returned 1 on success and 0 on failure..(cherry picked from commite9ac890)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp