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

Incorrect error handling for APIs that can raise exceptions #105375

Closed
Assignees
erlend-aasland
Labels
3.11only security fixes3.12only security fixes3.13bugs and security fixestopic-C-APItype-bugAn unexpected behavior, bug, or error
@erlend-aasland

Description

@erlend-aasland

For example, in the collation callback twostr objects (string1 andstring2) are created usingPyUnicode_FromStringAndSize. Error handling should happen directly after each call toPyUnicode_FromStringAndSize:

string1=PyUnicode_FromStringAndSize((constchar*)text1_data,text1_length);
string2=PyUnicode_FromStringAndSize((constchar*)text2_data,text2_length);
if (!string1|| !string2) {
gotofinally;/* failed to allocate strings */
}

Other cases where error handling is not done immediately after the API has been used:

I might have missed some; I did not do a complete audit yet.

Linked PRs

Metadata

Metadata

Labels

3.11only security fixes3.12only security fixes3.13bugs and security fixestopic-C-APItype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp