Skip to content

gh-150913: Fix sqlite3.Blob validation for empty slice assignment#150915

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
ever0de:gh-150913-fix-blob-empty-slice-validation
Jun 4, 2026
Merged

gh-150913: Fix sqlite3.Blob validation for empty slice assignment#150915
serhiy-storchaka merged 1 commit into
python:mainfrom
ever0de:gh-150913-fix-blob-empty-slice-validation

Conversation

@ever0de
Copy link
Copy Markdown
Contributor

@ever0de ever0de commented Jun 4, 2026

ass_subscript_slice() returned early when the computed slice length was zero, bypassing validation performed for non-empty slices.

Move validation before the empty-slice fast path so that invalid assignments raise the appropriate exception regardless of slice length.

ass_subscript_slice() returned early when the computed slice length
was zero, bypassing validation performed for non-empty slices.

Move validation before the empty-slice fast path so that invalid
assignments raise the appropriate exception regardless of slice
length.
@ever0de ever0de force-pushed the gh-150913-fix-blob-empty-slice-validation branch from 9fd8656 to e7fdb62 Compare June 4, 2026 12:53
@ever0de ever0de marked this pull request as ready for review June 4, 2026 12:55
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 4, 2026
@serhiy-storchaka serhiy-storchaka merged commit fc9c4db into python:main Jun 4, 2026
67 checks passed
@miss-islington-app
Copy link
Copy Markdown

Thanks @ever0de for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Jun 4, 2026

GH-150923 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 4, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Jun 4, 2026

GH-150924 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jun 4, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Jun 4, 2026

GH-150925 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jun 4, 2026
serhiy-storchaka pushed a commit that referenced this pull request Jun 4, 2026
…ent (GH-150915) (GH-150925)

ass_subscript_slice() returned early when the computed slice length
was zero, bypassing validation performed for non-empty slices.
(cherry picked from commit fc9c4db)

Co-authored-by: Jiseok CHOI <jiseok.dev@gmail.com>
serhiy-storchaka pushed a commit that referenced this pull request Jun 4, 2026
…ent (GH-150915) (GH-150924)

ass_subscript_slice() returned early when the computed slice length
was zero, bypassing validation performed for non-empty slices.
(cherry picked from commit fc9c4db)

Co-authored-by: Jiseok CHOI <jiseok.dev@gmail.com>
serhiy-storchaka pushed a commit that referenced this pull request Jun 4, 2026
…ent (GH-150915) (GH-150923)

ass_subscript_slice() returned early when the computed slice length
was zero, bypassing validation performed for non-empty slices.
(cherry picked from commit fc9c4db)

Co-authored-by: Jiseok CHOI <jiseok.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants