Commit b64441e
Reading a specially prepared small Plist file could cause OOM because file's
read(n) preallocates a bytes object for reading the specified amount of
data. Now plistlib reads large data by chunks, therefore the upper limit of
consumed memory is proportional to the size of the input file.
(cherry picked from commit 694922c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 29c657a commit b64441e
File tree
3 files changed
+59
-14
lines changed- Lib
- test
- Misc/NEWS.d/next/Security
3 files changed
+59
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
508 | 511 | | |
509 | 512 | | |
510 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
511 | 526 | | |
512 | | - | |
| 527 | + | |
513 | 528 | | |
514 | 529 | | |
515 | 530 | | |
516 | | - | |
| 531 | + | |
517 | 532 | | |
518 | 533 | | |
519 | 534 | | |
| |||
573 | 588 | | |
574 | 589 | | |
575 | 590 | | |
576 | | - | |
577 | | - | |
578 | | - | |
| 591 | + | |
579 | 592 | | |
580 | 593 | | |
581 | 594 | | |
582 | | - | |
583 | | - | |
584 | | - | |
| 595 | + | |
585 | 596 | | |
586 | 597 | | |
587 | 598 | | |
588 | 599 | | |
589 | | - | |
590 | | - | |
591 | | - | |
| 600 | + | |
592 | 601 | | |
593 | 602 | | |
594 | 603 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
906 | | - | |
907 | | - | |
| 906 | + | |
908 | 907 | | |
909 | 908 | | |
910 | 909 | | |
| |||
916 | 915 | | |
917 | 916 | | |
918 | 917 | | |
919 | | - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
920 | 923 | | |
921 | 924 | | |
922 | 925 | | |
| |||
1024 | 1027 | | |
1025 | 1028 | | |
1026 | 1029 | | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
1027 | 1058 | | |
1028 | 1059 | | |
1029 | 1060 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments