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
parent
71b045b3a4
commit
3a647a2486
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue