-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-123378: Ensure results of
PyUnicode*Error_Get{Start,End}
are cla…
…mped (GH-123380) Co-authored-by: Sergey B Kirpichev <[email protected]>
- Loading branch information
1 parent
ad9d059
commit bc0f2e9
Showing
7 changed files
with
492 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
Misc/NEWS.d/next/C_API/2024-08-27-09-07-56.gh-issue-123378.JJ6n_u.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Ensure that the value of :attr:`UnicodeEncodeError.start <UnicodeError.start>` | ||
retrieved by :c:func:`PyUnicodeEncodeError_GetStart` lie in | ||
``[0, max(0, objlen - 1)]`` where *objlen* is the length of | ||
:attr:`UnicodeEncodeError.object <UnicodeError.object>`. Similar | ||
arguments apply to :exc:`UnicodeDecodeError` and :exc:`UnicodeTranslateError` | ||
and their corresponding C interface. Patch by Bénédikt Tran. |
6 changes: 6 additions & 0 deletions
6
Misc/NEWS.d/next/C_API/2024-12-02-16-10-36.gh-issue-123378.Q6YRwe.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Ensure that the value of :attr:`UnicodeEncodeError.end <UnicodeError.end>` | ||
retrieved by :c:func:`PyUnicodeEncodeError_GetEnd` lies in ``[min(1, objlen), | ||
max(min(1, objlen), objlen)]`` where *objlen* is the length of | ||
:attr:`UnicodeEncodeError.object <UnicodeError.object>`. Similar arguments | ||
apply to :exc:`UnicodeDecodeError` and :exc:`UnicodeTranslateError` and their | ||
corresponding C interface. Patch by Bénédikt Tran. |
Oops, something went wrong.