-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit e99f1b4
uri: Fix normalization memory management for uri_parser_php_parse_url.c (#19600)
There were two issues with the previous implementation of normalization:
- `php_raw_url_decode_ex()` would be used to modify a string with RC >1.
- The return value of `php_raw_url_decode_ex()` was not used, resulting in
incorrect string lengths when percent-encoded characters are decoded.
Additionally there was a bogus assertion that verified that strings returned
from the read handlers are RC =2, which was not the case for the
`parse_url`-based parser when repeatedly retrieving a component even without
normalization happening. Remove that assertion, since its usefulness is
questionable. Any obvious data type issues with read handlers should be
detectable when testing during development.1 parent 423960a commit e99f1b4
File tree
6 files changed
+149
-29
lines changed- ext
- uri
- tests
- zend_test
6 files changed
+149
-29
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
137 | 137 |
| |
138 | 138 |
| |
139 | 139 |
| |
140 | - | ||
141 | - | ||
142 | - | ||
143 | - | ||
144 | - | ||
140 | + | ||
145 | 141 |
| |
146 | 142 |
| |
147 | 143 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
52 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 | - | ||
24 | + | ||
25 | 25 |
| |
26 | - | ||
27 | - | ||
28 | - | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
29 | 32 |
| |
30 | - | ||
31 | - | ||
32 | - | ||
33 | + | ||
33 | 34 |
| |
34 | - | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
35 | 39 |
| |
36 | 40 |
| |
37 | 41 |
| |
38 | 42 |
| |
39 | 43 |
| |
40 | 44 |
| |
41 | 45 |
| |
42 | - | ||
43 | - | ||
46 | + | ||
44 | 47 |
| |
45 | 48 |
| |
46 | 49 |
| |
| |||
53 | 56 |
| |
54 | 57 |
| |
55 | 58 |
| |
56 | - | ||
57 | - | ||
59 | + | ||
58 | 60 |
| |
59 | 61 |
| |
60 | 62 |
| |
| |||
67 | 69 |
| |
68 | 70 |
| |
69 | 71 |
| |
70 | - | ||
71 | - | ||
72 | + | ||
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
| |||
81 | 82 |
| |
82 | 83 |
| |
83 | 84 |
| |
84 | - | ||
85 | - | ||
85 | + | ||
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
| |||
96 | 96 |
| |
97 | 97 |
| |
98 | 98 |
| |
99 | - | ||
100 | 99 |
| |
101 | 100 |
| |
102 | 101 |
| |
| |||
109 | 108 |
| |
110 | 109 |
| |
111 | 110 |
| |
112 | - | ||
113 | - | ||
111 | + | ||
114 | 112 |
| |
115 | 113 |
| |
116 | 114 |
| |
| |||
123 | 121 |
| |
124 | 122 |
| |
125 | 123 |
| |
126 | - | ||
127 | - | ||
124 | + | ||
128 | 125 |
| |
129 | 126 |
| |
130 | 127 |
| |
| |||
137 | 134 |
| |
138 | 135 |
| |
139 | 136 |
| |
140 | - | ||
141 | - | ||
137 | + | ||
142 | 138 |
| |
143 | 139 |
| |
144 | 140 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 | + | ||
43 | 44 |
| |
44 | 45 |
| |
45 | 46 |
| |
| |||
724 | 725 |
| |
725 | 726 |
| |
726 | 727 |
| |
728 | + | ||
729 | + | ||
730 | + | ||
731 | + | ||
732 | + | ||
733 | + | ||
734 | + | ||
735 | + | ||
736 | + | ||
737 | + | ||
738 | + | ||
739 | + | ||
740 | + | ||
741 | + | ||
742 | + | ||
743 | + | ||
744 | + | ||
745 | + | ||
746 | + | ||
747 | + | ||
748 | + | ||
749 | + | ||
750 | + | ||
751 | + | ||
752 | + | ||
753 | + | ||
754 | + | ||
755 | + | ||
756 | + | ||
757 | + | ||
758 | + | ||
759 | + | ||
760 | + | ||
761 | + | ||
762 | + | ||
763 | + | ||
764 | + | ||
765 | + | ||
766 | + | ||
767 | + | ||
768 | + | ||
769 | + | ||
770 | + | ||
771 | + | ||
772 | + | ||
773 | + | ||
774 | + | ||
775 | + | ||
776 | + | ||
777 | + | ||
778 | + | ||
779 | + | ||
780 | + | ||
781 | + | ||
782 | + | ||
783 | + | ||
784 | + | ||
785 | + | ||
786 | + | ||
787 | + | ||
788 | + | ||
789 | + | ||
790 | + | ||
791 | + | ||
792 | + | ||
793 | + | ||
727 | 794 |
| |
728 | 795 |
| |
729 | 796 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
342 | 342 |
| |
343 | 343 |
| |
344 | 344 |
| |
345 | + | ||
346 | + | ||
345 | 347 |
| |
346 | 348 |
| |
347 | 349 |
| |
|
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments