summaryrefslogtreecommitdiffstats
path: root/Lib/secrets.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-12-01 01:46:40 (GMT)
committerGitHub <noreply@github.com>2018-12-01 01:46:40 (GMT)
commit989052047eea7f35da0d7ca268791b2442ee1553 (patch)
tree6ec7ed8a81dfeac902e36e0677185a465df3107b /Lib/secrets.py
parent503ce5c482cb267b0770bc46c315d5cf822bdca9 (diff)
downloadcpython-989052047eea7f35da0d7ca268791b2442ee1553.zip
cpython-989052047eea7f35da0d7ca268791b2442ee1553.tar.gz
cpython-989052047eea7f35da0d7ca268791b2442ee1553.tar.bz2
Fix compiler warning in structseq_repr() (GH-10841)
Replace strncpy() with memcpy() in structseq_repr() to fix the following compiler warning: 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 : The function writes the terminating NUL byte later.
Diffstat (limited to 'Lib/secrets.py')
0 files changed, 0 insertions, 0 deletions