forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6d3a9a6
committed
Fix corner case bug in numeric to_char() some more.
The band-aid applied in commitf0bedf3 turns out to still needsome work: it made sure we didn't set Np->last_relevant too small(to the left of the decimal point), but it didn't prevent settingit too large (off the end of the partially-converted string).This could result in fetching data beyond the end of the allocatedspace, which with very bad luck could cause a SIGSEGV, thoughI don't see any hazard of interesting memory disclosure.Per bug #17839 from Thiago Nunes. The bug's pretty ancient,so back-patch to all supported versions.Discussion:https://postgr.es/m/17839-aada50db24d7b0da@postgresql.org1 parentc25a929 commit6d3a9a6
File tree
3 files changed
+16
-2
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+16
-2
lines changedLines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4983 | 4983 |
| |
4984 | 4984 |
| |
4985 | 4985 |
| |
4986 |
| - | |
| 4986 | + | |
| 4987 | + | |
| 4988 | + | |
4987 | 4989 |
| |
4988 | 4990 |
| |
4989 | 4991 |
| |
| 4992 | + | |
4990 | 4993 |
| |
4991 | 4994 |
| |
4992 |
| - | |
| 4995 | + | |
| 4996 | + | |
| 4997 | + | |
| 4998 | + | |
| 4999 | + | |
4993 | 5000 |
| |
4994 | 5001 |
| |
4995 | 5002 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1266 | 1266 |
| |
1267 | 1267 |
| |
1268 | 1268 |
| |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
1269 | 1275 |
| |
1270 | 1276 |
| |
1271 | 1277 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
799 | 799 |
| |
800 | 800 |
| |
801 | 801 |
| |
| 802 | + | |
802 | 803 |
| |
803 | 804 |
| |
804 | 805 |
| |
|
0 commit comments
Comments
(0)