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

Possible loss of large text data in_curses.window.{instr,getstr} #134209

Closed
Assignees
zydtiger
Labels
extension-modulesC modules in the Modules dirsprinttype-bugAn unexpected behavior, bug, or error
@picnixz

Description

@picnixz

Bug report

Bug description:

_curses.window.instr is meant to extract a string of characters between two positions and we have a maximum number of allowed characters which is 1023. However, this limit isnot enforced, namely we do the following:

winnstr(self->win,rtn,Py_MIN(n,1023));

IOW, we cannot return more than 1023 characters in a single API call. This should be documented and enforced at runtime, so that users may know that they need multiple API calls, or we should allocate heap memory instead (currently the buffer holding the output is allocated on the stack).

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

Labels

extension-modulesC modules in the Modules dirsprinttype-bugAn unexpected behavior, bug, or error

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp