Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue36365

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Objects/structseq.c: warning: 'strncpy' specified bound depends on the length of the source argument
Type:Stage:resolved
Components:Interpreter CoreVersions:Python 3.8
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: vstinner
Priority:normalKeywords:patch

Created on2019-03-19 14:57 byvstinner, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 12440mergedvstinner,2019-03-19 14:58
PR 12451mergedvstinner,2019-03-19 23:15
Messages (3)
msg338361 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2019-03-19 14:57
Warning seen on Fedora 29 with GCC 8.3.1 20190223 (Red Hat 8.3.1-2):Objects/structseq.c: In function 'structseq_repr':Objects/structseq.c:187:5: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]     strncpy(pbuf, typ->tp_name, len);     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Objects/structseq.c:185:11: note: length computed here     len = strlen(typ->tp_name) > TYPE_MAXSIZE ? TYPE_MAXSIZE :           ^~~~~~~~~~~~~~~~~~~~Attached PR rewrites structseq_repr() using _PyUnicodeWriter for better performance and remove the arbitrary limit of 512 bytes.
msg338416 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2019-03-19 23:05
New changesetc70ab02df2894c34da2223fc3798c0404b41fd79 by Victor Stinner in branch 'master':bpo-36365: Rewrite structseq_repr() using _PyUnicodeWriter (GH-12440)https://github.com/python/cpython/commit/c70ab02df2894c34da2223fc3798c0404b41fd79
msg338419 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2019-03-19 23:32
New changesetea3592d7ef6308bf9f6c7d86556f9b36f5ca0060 by Victor Stinner in branch '3.7':bpo-36365: Fix compiler warning in structseq.c (GH-12451)https://github.com/python/cpython/commit/ea3592d7ef6308bf9f6c7d86556f9b36f5ca0060
History
DateUserActionArgs
2022-04-11 14:59:12adminsetgithub: 80546
2019-03-19 23:32:21vstinnersetmessages: +msg338419
2019-03-19 23:15:24vstinnersetpull_requests: +pull_request12405
2019-03-19 23:06:20vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-03-19 23:05:55vstinnersetmessages: +msg338416
2019-03-19 14:58:53vstinnersetkeywords: +patch
stage: patch review
pull_requests: +pull_request12395
2019-03-19 14:57:37vstinnercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp