forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit24ea53d
committed
Avoid overflow in fe_utils' printTable()
The original code would miscalculate the total number of cells when thetable to print has more than ~4 billion cells, leading to an unnecessaryerror. Repair by changing some computations to be 64-bits wide. Addsome necessary overflow checks.Author: Hongxu Ma <interma@outlook.com>Discussion:https://postgr.es/m/TYBP286MB0351B057B101C90D7C1239E6B4E2A@TYBP286MB0351.JPNP286.PROD.OUTLOOK.COM1 parente83aa9f commit24ea53d
2 files changed
+23
-9
lines changedLines changed: 22 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3172 | 3172 |
| |
3173 | 3173 |
| |
3174 | 3174 |
| |
| 3175 | + | |
| 3176 | + | |
3175 | 3177 |
| |
3176 | 3178 |
| |
3177 | 3179 |
| |
3178 | 3180 |
| |
3179 | 3181 |
| |
3180 | 3182 |
| |
3181 | 3183 |
| |
3182 |
| - | |
| 3184 | + | |
| 3185 | + | |
| 3186 | + | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
3183 | 3194 |
| |
3184 | 3195 |
| |
3185 | 3196 |
| |
| |||
3249 | 3260 |
| |
3250 | 3261 |
| |
3251 | 3262 |
| |
| 3263 | + | |
| 3264 | + | |
3252 | 3265 |
| |
3253 | 3266 |
| |
3254 | 3267 |
| |
3255 | 3268 |
| |
3256 |
| - | |
| 3269 | + | |
| 3270 | + | |
3257 | 3271 |
| |
3258 |
| - | |
3259 |
| - | |
3260 |
| - | |
| 3272 | + | |
| 3273 | + | |
3261 | 3274 |
| |
3262 | 3275 |
| |
3263 | 3276 |
| |
| |||
3273 | 3286 |
| |
3274 | 3287 |
| |
3275 | 3288 |
| |
3276 |
| - | |
| 3289 | + | |
3277 | 3290 |
| |
3278 | 3291 |
| |
3279 | 3292 |
| |
| |||
3341 | 3354 |
| |
3342 | 3355 |
| |
3343 | 3356 |
| |
3344 |
| - | |
| 3357 | + | |
3345 | 3358 |
| |
3346 |
| - | |
| 3359 | + | |
| 3360 | + | |
3347 | 3361 |
| |
3348 | 3362 |
| |
3349 | 3363 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
171 | 171 |
| |
172 | 172 |
| |
173 | 173 |
| |
174 |
| - | |
| 174 | + | |
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
|
0 commit comments
Comments
(0)