Avoid overflow in fe_utils' printTable()
Alvaro Herrera <alvherre@alvh.no-ip.org>
Avoid overflow in fe_utils' printTable() The original code would miscalculate the total number of cells when the table to print has more than ~4 billion cells, leading to an unnecessary error. Repair by changing some computations to be 64-bits wide. Add some necessary overflow checks. Author: Hongxu Ma <interma@outlook.com> Discussion: https://postgr.es/m/TYBP286MB0351B057B101C90D7C1239E6B4E2A@TYBP286MB0351.JPNP286.PROD.OUTLOOK.COM
Files
| Path | Change | +/− |
|---|---|---|
| src/fe_utils/print.c | modified | +22 −8 |
| src/include/fe_utils/print.h | modified | +1 −1 |
Discussion
- PSQL error: total cell count of XXX exceeded 16 messages · 2023-08-26 → 2023-11-21