forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2bb6bdb
committed
Protect against overflow of ltree.numlevel and lquery.numlevel.
These uint16 fields could be overflowed by excessively long input,producing strange results. Complain for invalid input.Likewise check for out-of-range values of the repeat counts in lquery.(We don't try too hard on that one, notably not bothering to detectif atoi's result has overflowed.)Also detect length overflow in ltree_concat.In passing, be more consistent about whether "syntax error" messagesinclude the type name. Also, clarify the documentation about whatthe size limit is.This has been broken for a long time, so back-patch to all supportedbranches.Nikita Glukhov, reviewed by Benjie Gillam and Tomas VondraDiscussion:https://postgr.es/m/CAP_rww=waX2Oo6q+MbMSiZ9ktdj6eaJj0cQzNu=Ry2cCDij5fw@mail.gmail.com1 parent1d377f2 commit2bb6bdb
File tree
6 files changed
+104
-21
lines changed- contrib/ltree
- expected
- sql
- doc/src/sgml
6 files changed
+104
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
460 | 506 | | |
461 | 507 | | |
462 | 508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
| 233 | + | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
361 | 370 | | |
362 | 371 | | |
363 | 372 | | |
| |||
367 | 376 | | |
368 | 377 | | |
369 | 378 | | |
370 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
371 | 389 | | |
372 | 390 | | |
373 | 391 | | |
374 | 392 | | |
375 | | - | |
| 393 | + | |
376 | 394 | | |
377 | 395 | | |
378 | 396 | | |
| |||
422 | 440 | | |
423 | 441 | | |
424 | 442 | | |
425 | | - | |
| 443 | + | |
426 | 444 | | |
427 | 445 | | |
428 | 446 | | |
| |||
432 | 450 | | |
433 | 451 | | |
434 | 452 | | |
435 | | - | |
| 453 | + | |
436 | 454 | | |
437 | 455 | | |
438 | 456 | | |
| |||
444 | 462 | | |
445 | 463 | | |
446 | 464 | | |
447 | | - | |
| 465 | + | |
448 | 466 | | |
449 | 467 | | |
450 | 468 | | |
451 | | - | |
| 469 | + | |
452 | 470 | | |
453 | 471 | | |
454 | 472 | | |
| |||
468 | 486 | | |
469 | 487 | | |
470 | 488 | | |
471 | | - | |
472 | | - | |
| 489 | + | |
| 490 | + | |
473 | 491 | | |
474 | 492 | | |
475 | 493 | | |
| |||
593 | 611 | | |
594 | 612 | | |
595 | 613 | | |
596 | | - | |
| 614 | + | |
597 | 615 | | |
598 | 616 | | |
599 | 617 | | |
600 | 618 | | |
601 | 619 | | |
602 | 620 | | |
603 | 621 | | |
604 | | - | |
| 622 | + | |
605 | 623 | | |
606 | 624 | | |
607 | 625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
277 | 284 | | |
278 | 285 | | |
279 | 286 | | |
280 | | - | |
| 287 | + | |
281 | 288 | | |
282 | 289 | | |
283 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
93 | 104 | | |
94 | 105 | | |
95 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
0 commit comments
Comments
(0)