[COMMITTERS] pgsql: Avoid integer overflow while sifting-up a heap in tuplesort.c.

2017-07-12 Thread Tom Lane
Avoid integer overflow while sifting-up a heap in tuplesort.c. If the number of tuples in the heap exceeds approximately INT_MAX/2, this loop's calculation "2*i+1" could overflow, resulting in a crash. Fix it by using unsigned int rather than int for the relevant local variables; that shouldn't co

[COMMITTERS] pgsql: Avoid integer overflow while sifting-up a heap in tuplesort.c.

2017-07-12 Thread Tom Lane
Avoid integer overflow while sifting-up a heap in tuplesort.c. If the number of tuples in the heap exceeds approximately INT_MAX/2, this loop's calculation "2*i+1" could overflow, resulting in a crash. Fix it by using unsigned int rather than int for the relevant local variables; that shouldn't co

[COMMITTERS] pgsql: Avoid integer overflow while sifting-up a heap in tuplesort.c.

2017-07-12 Thread Tom Lane
Avoid integer overflow while sifting-up a heap in tuplesort.c. If the number of tuples in the heap exceeds approximately INT_MAX/2, this loop's calculation "2*i+1" could overflow, resulting in a crash. Fix it by using unsigned int rather than int for the relevant local variables; that shouldn't co

[COMMITTERS] pgsql: Avoid integer overflow while sifting-up a heap in tuplesort.c.

2017-07-12 Thread Tom Lane
Avoid integer overflow while sifting-up a heap in tuplesort.c. If the number of tuples in the heap exceeds approximately INT_MAX/2, this loop's calculation "2*i+1" could overflow, resulting in a crash. Fix it by using unsigned int rather than int for the relevant local variables; that shouldn't co