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 use of the C API in getpath_joinpath() #97758

Closed
Labels
3.11only security fixes3.12only security fixestype-bugAn unexpected behavior, bug, or errortype-crashA hard crash of the interpreter, possibly with a core dump
@serhiy-storchaka

Description

@serhiy-storchaka

If thegetpath.joinpath() is called without arguments, it tries to return an empty string and callsPyUnicode_FromString(NULL) for this, which causes a crash. The correct way of creating an empty string isPyUnicode_FromStringAndSize(NULL, 0), orPyUnicode_FromString(""), orPyUnicode_FromStringAndSize("", 0).

Alternatively, the function could raise a TypeError instead of returning an empty string.

@zooba@vstinner

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixes3.12only security fixestype-bugAn unexpected behavior, bug, or errortype-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp