mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Patch [ 1583506 ] tarfile.py: 100-char filenames are truncated
This commit is contained in:
parent
e97c759660
commit
a32e0a099b
2 changed files with 28 additions and 1 deletions
|
@ -136,7 +136,7 @@ TOEXEC = 0001 # execute/search by other
|
|||
def stn(s, length):
|
||||
"""Convert a python string to a null-terminated string buffer.
|
||||
"""
|
||||
return s[:length-1] + (length - len(s) - 1) * NUL + NUL
|
||||
return s[:length] + (length - len(s)) * NUL
|
||||
|
||||
def nti(s):
|
||||
"""Convert a number field to a python number.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue