forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit124331b
committed
Reject out-of-range numeric timezone specifications.
In commit631dc39, we started to handlesimple numeric timezone offsets via the zic library instead of the oldCTimeZone/HasCTZSet kluge. However, we overlooked the fact that the ziccode will reject UTC offsets exceeding a week (which seems a bit arbitrary,but not because it's too tight ...). This led to possibly settingsession_timezone to NULL, which results in crashes in most timezone-relatedoperations as of 9.4, and crashes in a small number of places even beforethat. So check for NULL return from pg_tzset_offset() and report anappropriate error message. Per bug #11014 from Duncan Gillis.Back-patch to all supported branches, like the previous patch.(Unfortunately, as of today that no longer includes 8.4.)1 parent972a21d commit124331b
2 files changed
+10
-0
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
388 | 388 |
| |
389 | 389 |
| |
390 | 390 |
| |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
391 | 398 |
| |
392 | 399 |
| |
393 | 400 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1333 | 1333 |
| |
1334 | 1334 |
| |
1335 | 1335 |
| |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
1336 | 1339 |
| |
1337 | 1340 |
| |
1338 | 1341 |
| |
|
0 commit comments
Comments
(0)