summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pydoc/test_pydoc.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-07 16:23:34 (GMT)
committerGitHub <noreply@github.com>2024-06-07 16:23:34 (GMT)
commitafef6b57376af65ec43ba7ffb8c6f41986afe04b (patch)
tree0423b3040e36bbc9eb6ba5aacb2f69f5b9f11103 /Lib/test/test_pydoc/test_pydoc.py
parent18359f202de00d7fabf27605528c77a619b7b13d (diff)
downloadcpython-afef6b57376af65ec43ba7ffb8c6f41986afe04b.zip
cpython-afef6b57376af65ec43ba7ffb8c6f41986afe04b.tar.gz
cpython-afef6b57376af65ec43ba7ffb8c6f41986afe04b.tar.bz2
[3.13] gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (GH-120228) (#120238)
gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (GH-120228) Don't hardcode 'dest' in HAVE_SUBOFFSETS_IN_LAST_DIM() macro of memoryobject.c, but use its 'view' parameter instead. Fix the Coverity issue: Error: COPY_PASTE_ERROR (CWE-398): Python-3.12.2/Objects/memoryobject.c:273:14: original: ""dest->suboffsets + (dest->ndim - 1)"" looks like the original copy. Python-3.12.2/Objects/memoryobject.c:274:14: copy_paste_error: ""dest"" in ""src->suboffsets + (dest->ndim - 1)"" looks like a copy-paste error. Python-3.12.2/Objects/memoryobject.c:274:14: remediation: Should it say ""src"" instead? GH- 272| assert(dest->ndim > 0 && src->ndim > 0); GH- 273| return (!HAVE_SUBOFFSETS_IN_LAST_DIM(dest) && GH- 274|-> !HAVE_SUBOFFSETS_IN_LAST_DIM(src) && GH- 275| dest->strides[dest->ndim-1] == dest->itemsize && GH- 276| src->strides[src->ndim-1] == src->itemsize); (cherry picked from commit 90b75405260467814c93738a3325645918d4ea51) Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/test/test_pydoc/test_pydoc.py')
0 files changed, 0 insertions, 0 deletions