forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6e5a39c
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 parent391aa8a commit6e5a39c
2 files changed
+37
-11
lines changedLines changed: 34 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
241 | 241 |
| |
242 | 242 |
| |
243 | 243 |
| |
| 244 | + | |
| 245 | + | |
244 | 246 |
| |
245 | 247 |
| |
246 | 248 |
| |
| |||
294 | 296 |
| |
295 | 297 |
| |
296 | 298 |
| |
297 |
| - | |
298 |
| - | |
299 |
| - | |
| 299 | + | |
| 300 | + | |
300 | 301 |
| |
301 |
| - | |
| 302 | + | |
302 | 303 |
| |
303 |
| - | |
| 304 | + | |
304 | 305 |
| |
305 |
| - | |
| 306 | + | |
306 | 307 |
| |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
307 | 321 |
| |
308 | 322 |
| |
309 | 323 |
| |
| |||
316 | 330 |
| |
317 | 331 |
| |
318 | 332 |
| |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
319 | 345 |
| |
320 | 346 |
| |
321 |
| - | |
322 |
| - | |
323 |
| - | |
| 347 | + | |
| 348 | + | |
324 | 349 |
| |
325 | 350 |
| |
326 | 351 |
| |
| |||
352 | 377 |
| |
353 | 378 |
| |
354 | 379 |
| |
355 |
| - | |
356 |
| - | |
357 | 380 |
| |
358 | 381 |
| |
359 | 382 |
| |
|
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)