- Notifications
You must be signed in to change notification settings - Fork28
Commit32f628b
committed
Fix assorted inconsistencies in our calls of readlink().
Ensure that we null-terminate the result string (one place in pg_rewind).Be paranoid about out-of-range results from readlink() (should not happen,but there is no good reason for some call sites to be careful about it andothers not). Consistently use the whole buffer, not sometimes one byteless. Ensure we emit an appropriate errcode() in all cases. Spell theerror messages the same way.The only serious bug here is the missing null-termination in pg_rewind,which is new code, so no need for a back-patch.Abhijit Menon-Sen and Tom Lane1 parentf46edf4 commit32f628b
File tree
4 files changed
+18
-19
lines changed- src
- backend
- replication
- storage/file
- utils/adt
- bin/pg_rewind
4 files changed
+18
-19
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1028 | 1028 |
| |
1029 | 1029 |
| |
1030 | 1030 |
| |
1031 |
| - | |
| 1031 | + | |
| 1032 | + | |
1032 | 1033 |
| |
1033 | 1034 |
| |
1034 | 1035 |
| |
|
Lines changed: 4 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2517 | 2517 |
| |
2518 | 2518 |
| |
2519 | 2519 |
| |
2520 |
| - | |
| 2520 | + | |
2521 | 2521 |
| |
2522 | 2522 |
| |
2523 | 2523 |
| |
2524 | 2524 |
| |
2525 | 2525 |
| |
2526 |
| - | |
2527 |
| - | |
| 2526 | + | |
2528 | 2527 |
| |
2529 |
| - | |
| 2528 | + | |
| 2529 | + | |
2530 | 2530 |
| |
2531 |
| - | |
2532 | 2531 |
| |
2533 | 2532 |
| |
2534 | 2533 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
374 | 374 |
| |
375 | 375 |
| |
376 | 376 |
| |
377 |
| - | |
| 377 | + | |
| 378 | + | |
378 | 379 |
| |
379 |
| - | |
| 380 | + | |
380 | 381 |
| |
381 |
| - | |
| 382 | + | |
| 383 | + | |
382 | 384 |
| |
383 | 385 |
| |
384 | 386 |
| |
|
Lines changed: 7 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
115 |
| - | |
| 115 | + | |
116 | 116 |
| |
117 |
| - | |
118 |
| - | |
119 |
| - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
120 | 120 |
| |
121 |
| - | |
122 |
| - | |
123 |
| - | |
124 |
| - | |
125 |
| - | |
| 121 | + | |
| 122 | + | |
126 | 123 |
| |
127 |
| - | |
| 124 | + | |
128 | 125 |
| |
129 | 126 |
| |
130 | 127 |
| |
|
0 commit comments
Comments
(0)