Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32f2eb4 commit 013024eCopy full SHA for 013024e
1 file changed
Python/traceback.c
@@ -509,13 +509,13 @@ _Py_DumpDecimal(int fd, unsigned long value)
509
static void
510
dump_hexadecimal(int fd, unsigned long value, Py_ssize_t width)
511
{
512
- Py_ssize_t size = sizeof(unsigned long) * 2;
513
- char buffer[size + 1], *ptr, *end;
+ char buffer[sizeof(unsigned long) * 2 + 1], *ptr, *end;
+ const Py_ssize_t size = Py_ARRAY_LENGTH(buffer) - 1;
514
515
if (width > size)
516
width = size;
517
518
- end = &buffer[Py_ARRAY_LENGTH(buffer) - 1];
+ end = &buffer[size];
519
ptr = end;
520
*ptr = '\0';
521
do {
0 commit comments