Correct the size of tmp array

The snprintf using it should work with any int, which means this string
has to fit ",-2147483648\0", which is 12 characters + a null terminator.

Otherwise it could lead to a buffer overflow, corrupting other variables
on the stack, and maybe causing a crash too?
pull/592/head
Zsolt Parragi 2025-12-05 19:44:58 +00:00
parent 71b045b3a4
commit 3a647a2486
1 changed files with 1 additions and 1 deletions

View File

@ -3774,7 +3774,7 @@ intarray_get_datum(int32 arr[], int len)
{
int j;
char str[1024];
char tmp[10];
char tmp[13];
str[0] = '\0';