mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Fixes for possible buffer overflows in sprintf() usages.
This commit is contained in:
parent
5107b4cf5f
commit
d4c0a9c59b
8 changed files with 17 additions and 22 deletions
|
@ -135,7 +135,7 @@ weakref_repr(PyWeakReference *self)
|
|||
(long)(self));
|
||||
}
|
||||
else {
|
||||
sprintf(buffer, "<weakref at %#lx; to '%s' at %#lx>",
|
||||
sprintf(buffer, "<weakref at %#lx; to '%.50s' at %#lx>",
|
||||
(long)(self), PyWeakref_GET_OBJECT(self)->ob_type->tp_name,
|
||||
(long)(PyWeakref_GET_OBJECT(self)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue