Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/debugpy/_vendored/pydevd/setup_pydevd_cython.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,16 @@ def build_extension(dir_name, extension_name, target_pydevd_name, force_cython,
c_file_contents = c_file_contents.replace(r"_pydevd_bundle\\pydevd_cython.pxd", "_pydevd_bundle/pydevd_cython.pxd")
c_file_contents = c_file_contents.replace(r"_pydevd_bundle\\pydevd_cython.pyx", "_pydevd_bundle/pydevd_cython.pyx")

# Suppress Flawfinder false positive (CWE-120) in the Cython 3.x
# CIntToPyUnicode boilerplate (`__Pyx____Pyx_PyUnicode_From_int`): the destination
# `dpos` is a stack buffer of size `sizeof(int)*3+2`, and `dpos -= 2` immediately
# precedes a 2-byte memcpy from the 128-byte constant table `DIGIT_PAIRS_8`
# indexed by `digit_pos * 2` where `digit_pos = abs(remaining % 64)`.
c_file_contents = c_file_contents.replace(
" memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);\n",
" memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); /* Flawfinder: ignore */\n",
)

# Suppress Flawfinder false positive (CWE-120/CWE-20) in the
# Cython 3.x ModuleStateLookup boilerplate (`__Pyx_State_ConvertFromInterpIdAsIndex`):
# `read` is a bounded pointer iterator (not POSIX read()), and the loop is
Expand Down
Loading