mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-10 18:50:50 +00:00
Compare commits
758
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3548b2e2c5 | ||
|
|
1fc3514734 | ||
|
|
ff729aabf7 | ||
|
|
4d6bae896d | ||
|
|
0988ae3c43 | ||
|
|
572d6437bc | ||
|
|
c730329bb0 | ||
|
|
645f84e41b | ||
|
|
86ca788cc7 | ||
|
|
f8e693248f | ||
|
|
dec7bad635 | ||
|
|
7e3e1837c8 | ||
|
|
9762609cec | ||
|
|
e0c014dead | ||
|
|
f419d614ba | ||
|
|
c6ad98975e | ||
|
|
880a6cee00 | ||
|
|
11e84180ef | ||
|
|
14cebefb05 | ||
|
|
015ee3b2c8 | ||
|
|
b26749b4e9 | ||
|
|
068fc008c6 | ||
|
|
b7d76b41e0 | ||
|
|
b477a84026 | ||
|
|
61d80d75ba | ||
|
|
ef7286a42f | ||
|
|
ccffec74d0 | ||
|
|
7d890eef82 | ||
|
|
302ad0d648 | ||
|
|
eae0610042 | ||
|
|
ba27e0888a | ||
|
|
b4b3a65f55 | ||
|
|
5799ebdb0c | ||
|
|
5f224412fa | ||
|
|
54cba5aa91 | ||
|
|
f2cef8afc4 | ||
|
|
ddc8d16245 | ||
|
|
9fe8c58130 | ||
|
|
4c1e2bbd6f | ||
|
|
2abc4c2f6f | ||
|
|
c20b2ab0bd | ||
|
|
f3f824823d | ||
|
|
860b3ffe75 | ||
|
|
254d299d07 | ||
|
|
ffa8461bfe | ||
|
|
a88eca53f7 | ||
|
|
fd50bf2085 | ||
|
|
777b6679a4 | ||
|
|
52d8779c43 | ||
|
|
ead076bac6 | ||
|
|
cc30524c89 | ||
|
|
0c996613c0 | ||
|
|
a6f1533789 | ||
|
|
a2a1cef1a2 | ||
|
|
683b4f7a2b | ||
|
|
b81b8bf77d | ||
|
|
2d9d2cadad | ||
|
|
8f89cfb548 | ||
|
|
11d0558928 | ||
|
|
282a6659aa | ||
|
|
41a9c681a0 | ||
|
|
25be12a3bc | ||
|
|
c7c939b5d8 | ||
|
|
c7614a8c19 | ||
|
|
b47d6b32ba | ||
|
|
d0e58bf6eb | ||
|
|
bd39495332 | ||
|
|
5cf4f7395b | ||
|
|
88f7f3c00f | ||
|
|
c8f285d190 | ||
|
|
f4809424cd | ||
|
|
55dbd8cf46 | ||
|
|
a5d45bae85 | ||
|
|
cfdccdb805 | ||
|
|
86b4252c8e | ||
|
|
53ba768ed8 | ||
|
|
4539d799bb | ||
|
|
2cb7a678a1 | ||
|
|
8b70dd202a | ||
|
|
152f73f92a | ||
|
|
1916bb223e | ||
|
|
3728e50e9f | ||
|
|
63f3962a90 | ||
|
|
d640e446ab | ||
|
|
864575251a | ||
|
|
9c28393067 | ||
|
|
0bff7cfadd | ||
|
|
8b093dee21 | ||
|
|
10251b20c3 | ||
|
|
d9d21b2037 | ||
|
|
02b8362ec2 | ||
|
|
cf91b163e1 | ||
|
|
ec7e479562 | ||
|
|
86428169d3 | ||
|
|
ad7eeba3c1 | ||
|
|
be8f089a13 | ||
|
|
899c8f485a | ||
|
|
896d0fcd41 | ||
|
|
40f8010a13 | ||
|
|
b383ddf1e5 | ||
|
|
977ce78d82 | ||
|
|
bcf5853eaa | ||
|
|
97b8798520 | ||
|
|
66e1ac23c1 | ||
|
|
555db7dc4e | ||
|
|
2032470e41 | ||
|
|
4323a7aced | ||
|
|
0398cc22a9 | ||
|
|
c819cf9d6b | ||
|
|
b2b018d5f7 | ||
|
|
5910d8d4f4 | ||
|
|
2019062cfc | ||
|
|
e3b9b1e6dc | ||
|
|
a213c10ef2 | ||
|
|
f0df7dbc8f | ||
|
|
79ed100c19 | ||
|
|
26b37f1792 | ||
|
|
5cf2f87fa7 | ||
|
|
157ddd9577 | ||
|
|
88f46b162b | ||
|
|
9a38ca8d50 | ||
|
|
6b2b195267 | ||
|
|
bcc87ba68e | ||
|
|
91ce8041a3 | ||
|
|
d80ff39189 | ||
|
|
be4053cea0 | ||
|
|
ff41bfc878 | ||
|
|
b7903f9778 | ||
|
|
9cbd7a24b6 | ||
|
|
250393f925 | ||
|
|
b741d3315b | ||
|
|
4420b43907 | ||
|
|
dfce6bf5d6 | ||
|
|
5f31c81f07 | ||
|
|
896ac689c9 | ||
|
|
b8d453d8d4 | ||
|
|
75d8af715c | ||
|
|
ed1f058591 | ||
|
|
b7dbcbd41f | ||
|
|
8fe87e7fea | ||
|
|
a614f8edea | ||
|
|
a19d5c520c | ||
|
|
1ac611f24f | ||
|
|
d86b6ea35c | ||
|
|
e6cf7d7745 | ||
|
|
08f4b3c3ac | ||
|
|
f826ea093f | ||
|
|
8992da2451 | ||
|
|
34ab5650bc | ||
|
|
7e8276ca68 | ||
|
|
405ebfcd18 | ||
|
|
974324676b | ||
|
|
2996eeeed0 | ||
|
|
b025b9d0cf | ||
|
|
d372b33c9b | ||
|
|
4662151ea7 | ||
|
|
9a86784859 | ||
|
|
bc0972e78d | ||
|
|
7a0f4cfdde | ||
|
|
ffcfa6f920 | ||
|
|
ad2bee193d | ||
|
|
a44a1dc194 | ||
|
|
ce2082d24f | ||
|
|
91e1df704e | ||
|
|
e427182279 | ||
|
|
ad641950b3 | ||
|
|
5b3f4d25ea | ||
|
|
36fa17a5fa | ||
|
|
84fe2cc890 | ||
|
|
e886272577 | ||
|
|
cc90ac54be | ||
|
|
5e36306feb | ||
|
|
c3f34796a0 | ||
|
|
2418791731 | ||
|
|
84b1c568f4 | ||
|
|
5e23a047ac | ||
|
|
a62d4e2c43 | ||
|
|
4af92aca87 | ||
|
|
b8e946b02e | ||
|
|
af516750ff | ||
|
|
055ecbc628 | ||
|
|
2178b1d02d | ||
|
|
f1ef8b327f | ||
|
|
041dd77135 | ||
|
|
d93892de7a | ||
|
|
02cda8fd94 | ||
|
|
5d81fe6f12 | ||
|
|
fed1f2d124 | ||
|
|
cce4764f13 | ||
|
|
4cba4c6193 | ||
|
|
34bd1c941b | ||
|
|
e793539678 | ||
|
|
5c001d42d4 | ||
|
|
df138c5719 | ||
|
|
f072662621 | ||
|
|
0a65b661e4 | ||
|
|
a8948d0808 | ||
|
|
d8ba49a2c7 | ||
|
|
592917f91f | ||
|
|
1c4e48650c | ||
|
|
b408028b88 | ||
|
|
6176b96a23 | ||
|
|
c56ff2bf75 | ||
|
|
d3780f1f90 | ||
|
|
11a202ef50 | ||
|
|
280e3a4ec8 | ||
|
|
3faebe2bec | ||
|
|
fef691b142 | ||
|
|
26cb570615 | ||
|
|
79e44c394f | ||
|
|
f0d6059389 | ||
|
|
c7be96b08f | ||
|
|
a2bfad051d | ||
|
|
f8cc363841 | ||
|
|
bccd1e672f | ||
|
|
b5b8ea1050 | ||
|
|
a18cede1c5 | ||
|
|
b55e69285b | ||
|
|
51a5e98af6 | ||
|
|
f464ffd780 | ||
|
|
b9babd22e0 | ||
|
|
cda14b995c | ||
|
|
503358c179 | ||
|
|
c4cc43169c | ||
|
|
ba8333cdb0 | ||
|
|
c467e81c86 | ||
|
|
17c0ff1194 | ||
|
|
59eaa7c877 | ||
|
|
fc74503792 | ||
|
|
0e3a650e74 | ||
|
|
10e8da1738 | ||
|
|
7d04e0fb2e | ||
|
|
d24d5b62c1 | ||
|
|
baacc2cb13 | ||
|
|
7907dc4d66 | ||
|
|
d206206c10 | ||
|
|
9ecb67d5a4 | ||
|
|
5ebdc46aa0 | ||
|
|
bde0e8c2a1 | ||
|
|
8ca457f64d | ||
|
|
e883892664 | ||
|
|
b8cdc731b8 | ||
|
|
a37e84e549 | ||
|
|
f4a44f18b8 | ||
|
|
a39bcfc5ee | ||
|
|
9a2365412e | ||
|
|
335a11b14b | ||
|
|
7cae4ff02c | ||
|
|
7881158690 | ||
|
|
018a9b321f | ||
|
|
c975320eb9 | ||
|
|
8e65ce35b9 | ||
|
|
4e6f27f4db | ||
|
|
494c170e6f | ||
|
|
fed5923dbc | ||
|
|
deac80eb9a | ||
|
|
c56ff39c05 | ||
|
|
83542dcf3b | ||
|
|
6ecc9f1d9d | ||
|
|
d9810af45a | ||
|
|
e118a0794a | ||
|
|
db1e425b1a | ||
|
|
c1ac325228 | ||
|
|
52d541a314 | ||
|
|
45b3fa4dee | ||
|
|
15213768e6 | ||
|
|
9b233b7e5e | ||
|
|
8779a9aad5 | ||
|
|
4fc49c04df | ||
|
|
60c5f9910f | ||
|
|
d57b278ad1 | ||
|
|
e59b6dc0ae | ||
|
|
1fa8ecd082 | ||
|
|
238caeb63c | ||
|
|
ec4a1d576b | ||
|
|
43ec708882 | ||
|
|
38ca8cb7a1 | ||
|
|
35abf3f20c | ||
|
|
59e0930d37 | ||
|
|
b548d9ad2e | ||
|
|
1f5327a602 | ||
|
|
13a9555342 | ||
|
|
5ebb0e520f | ||
|
|
ed6ce83101 | ||
|
|
303dd7f346 | ||
|
|
428dddd3e8 | ||
|
|
fa05f038cb | ||
|
|
9b98cf7865 | ||
|
|
abe6362716 | ||
|
|
7511f972fd | ||
|
|
a331f43f8c | ||
|
|
692b3bcd88 | ||
|
|
aab49e934d | ||
|
|
6074da9809 | ||
|
|
8d5e953a19 | ||
|
|
c0e046a130 | ||
|
|
ad0371ac7e | ||
|
|
b4b0aaae93 | ||
|
|
dbc727373c | ||
|
|
c4f9b01422 | ||
|
|
4054890b26 | ||
|
|
158d8a6b08 | ||
|
|
213119c83f | ||
|
|
0a90643e53 | ||
|
|
4b04bf8793 | ||
|
|
339508d6ac | ||
|
|
72911237b5 | ||
|
|
773e85a788 | ||
|
|
2f7bd57f93 | ||
|
|
60cca8b9c9 | ||
|
|
e7ff3e839b | ||
|
|
e052da3a6b | ||
|
|
0298b92b69 | ||
|
|
decc394a20 | ||
|
|
f6655b62d8 | ||
|
|
0037598252 | ||
|
|
63e11f9025 | ||
|
|
d90003b549 | ||
|
|
a7761262f7 | ||
|
|
c2f33fb129 | ||
|
|
bf9120ecae | ||
|
|
91ad40d9bb | ||
|
|
c3547f1935 | ||
|
|
1d2f619049 | ||
|
|
16a592b13a | ||
|
|
86d2fafded | ||
|
|
4aac4da673 | ||
|
|
6fb0e4a401 | ||
|
|
d4d36fba28 | ||
|
|
3cd50ca714 | ||
|
|
8fc9df3f67 | ||
|
|
cfea8e5d04 | ||
|
|
6c9056ceb7 | ||
|
|
abe0f17e88 | ||
|
|
84b2c39920 | ||
|
|
11b4f3becd | ||
|
|
a10da87c6a | ||
|
|
bde86a6639 | ||
|
|
04fd0b1098 | ||
|
|
85c777d2f1 | ||
|
|
888e77ff73 | ||
|
|
72c7cfe6f2 | ||
|
|
92039fed22 | ||
|
|
0e12a778df | ||
|
|
0dc9b0e708 | ||
|
|
b5511dcfd7 | ||
|
|
f1969d4b4c | ||
|
|
e8009e2dca | ||
|
|
2da2de46a8 | ||
|
|
523fd2c244 | ||
|
|
acd711685a | ||
|
|
0838a2b7c5 | ||
|
|
e08566c613 | ||
|
|
9205c4fd62 | ||
|
|
c449bf1443 | ||
|
|
1c19146f46 | ||
|
|
8ee8ccda19 | ||
|
|
1eff3b01b8 | ||
|
|
86ea921291 | ||
|
|
07c0d714a5 | ||
|
|
51286bd8e5 | ||
|
|
1299503936 | ||
|
|
5d61e56dd7 | ||
|
|
d236c1af8a | ||
|
|
0b44f16ea2 | ||
|
|
3e62aae1b4 | ||
|
|
a07d76c0ba | ||
|
|
812d248193 | ||
|
|
f4c38016b6 | ||
|
|
757e3fc3d5 | ||
|
|
629273d11b | ||
|
|
06c7c3674b | ||
|
|
7b396c078c | ||
|
|
8475c5b98d | ||
|
|
5b8316188c | ||
|
|
df481764f3 | ||
|
|
f733173b1f | ||
|
|
a7df6ce664 | ||
|
|
29876c5c29 | ||
|
|
621fddab93 | ||
|
|
bdf0c9ccbe | ||
|
|
dce259099d | ||
|
|
d1e529c1cb | ||
|
|
faca4e08b4 | ||
|
|
a472649016 | ||
|
|
074d361d64 | ||
|
|
4c9a11c857 | ||
|
|
bbcea230e1 | ||
|
|
fbb86bd7b3 | ||
|
|
c973fef48d | ||
|
|
77e70b391c | ||
|
|
645d65f3e3 | ||
|
|
2ae8d2fbfb | ||
|
|
c8f47a8e7c | ||
|
|
c5fcd9f5af | ||
|
|
ffe8303f24 | ||
|
|
867447f420 | ||
|
|
778d69ddfe | ||
|
|
c9331a3ef2 | ||
|
|
79d52503a4 | ||
|
|
88275e547f | ||
|
|
6d928fd26d | ||
|
|
29a85d49ae | ||
|
|
89e7a195bc | ||
|
|
72a9b595ca | ||
|
|
67039363cd | ||
|
|
1f6f619451 | ||
|
|
6e51989501 | ||
|
|
4eb802bb14 | ||
|
|
4d2d8e8717 | ||
|
|
d4afbd487a | ||
|
|
1abcd81872 | ||
|
|
93c91c733c | ||
|
|
d84fa39667 | ||
|
|
e36a5a1197 | ||
|
|
be8b1c74cf | ||
|
|
df2a38e7f8 | ||
|
|
a10e778bfb | ||
|
|
63401268db | ||
|
|
d99203d44b | ||
|
|
e35f09d774 | ||
|
|
968dfae6d1 | ||
|
|
1af8b3f883 | ||
|
|
956d74572a | ||
|
|
38398529b8 | ||
|
|
83449b48d4 | ||
|
|
0ad53bfd7d | ||
|
|
d9788dd73f | ||
|
|
a72b21438d | ||
|
|
a0dff6fdca | ||
|
|
9344bf193c | ||
|
|
58482206f5 | ||
|
|
6a5095582a | ||
|
|
3332943c9d | ||
|
|
8b4b70df56 | ||
|
|
950d5ee590 | ||
|
|
4458f3bcf6 | ||
|
|
81ba6b14c7 | ||
|
|
24e03d875f | ||
|
|
0cb4849e53 | ||
|
|
b43d6c8522 | ||
|
|
266578f584 | ||
|
|
fc0c9054e6 | ||
|
|
19f85f8676 | ||
|
|
652632a89b | ||
|
|
10d5f2301a | ||
|
|
f7d8b274c7 | ||
|
|
f76d7be876 | ||
|
|
7fb16d5bd9 | ||
|
|
d394c17293 | ||
|
|
1e60d0c105 | ||
|
|
7b2ab56997 | ||
|
|
f46a064760 | ||
|
|
92bc49b2b0 | ||
|
|
2cb0ed1328 | ||
|
|
87fa84abde | ||
|
|
c12fdbde5f | ||
|
|
057f4719d3 | ||
|
|
1919ec5a55 | ||
|
|
bd8912e47c | ||
|
|
20364bcff9 | ||
|
|
0b4d7a455d | ||
|
|
838b4b8ff7 | ||
|
|
4b307984df | ||
|
|
d776a933eb | ||
|
|
8987ad5cb2 | ||
|
|
3a4a25358f | ||
|
|
e8e661128a | ||
|
|
fb3b6bcf83 | ||
|
|
340091469a | ||
|
|
e120a0c7f3 | ||
|
|
b50101764b | ||
|
|
000e84aa88 | ||
|
|
09664063a8 | ||
|
|
2068419ae5 | ||
|
|
ce59121c5f | ||
|
|
87a011d372 | ||
|
|
ad3a42c26c | ||
|
|
376635cde8 | ||
|
|
99076bc24f | ||
|
|
4cceeb25b7 | ||
|
|
7ccd594392 | ||
|
|
bef6111609 | ||
|
|
304ac568c5 | ||
|
|
311ee8f69c | ||
|
|
3e9923dd8d | ||
|
|
0747b29bdf | ||
|
|
4632fe0eef | ||
|
|
19632ae7dc | ||
|
|
035ce937e1 | ||
|
|
948ab62c25 | ||
|
|
168e8920be | ||
|
|
0556103f6a | ||
|
|
f5936cceeb | ||
|
|
8a10259642 | ||
|
|
16fdf86ea3 | ||
|
|
6c12252790 | ||
|
|
31ab04ee25 | ||
|
|
0956c00af9 | ||
|
|
72f19e9a8b | ||
|
|
d74d88fbb9 | ||
|
|
75d23f5714 | ||
|
|
bbf8a50281 | ||
|
|
cdce62b724 | ||
|
|
69ed09a31c | ||
|
|
67419499b2 | ||
|
|
b42d000471 | ||
|
|
e25eea8b83 | ||
|
|
b0e8be8aea | ||
|
|
7bbd5521d2 | ||
|
|
93192ec56d | ||
|
|
72507d38fb | ||
|
|
d14f23365c | ||
|
|
cac09f3333 | ||
|
|
02e25df8b5 | ||
|
|
c864b1ca2f | ||
|
|
4deb0f1a0a | ||
|
|
79961dccab | ||
|
|
819a7ae6a1 | ||
|
|
47c8b6039a | ||
|
|
d26e006d7f | ||
|
|
1622843162 | ||
|
|
3120387617 | ||
|
|
fc24e74260 | ||
|
|
ec5421d044 | ||
|
|
36836f147c | ||
|
|
680685127f | ||
|
|
455040c4ab | ||
|
|
8249581a2d | ||
|
|
72ccce4b8b | ||
|
|
a601605f14 | ||
|
|
d80a3d9668 | ||
|
|
24d85e4bd8 | ||
|
|
fd518ffc7e | ||
|
|
bae56a87f8 | ||
|
|
b336af29e1 | ||
|
|
9aff3a1156 | ||
|
|
cc5b995c78 | ||
|
|
6008f9af8f | ||
|
|
d44a383986 | ||
|
|
e52be10b30 | ||
|
|
6f8fae606b | ||
|
|
dc6d283b1c | ||
|
|
3dbe48762f | ||
|
|
94d96f7782 | ||
|
|
4daab0abec | ||
|
|
19df3c1b1c | ||
|
|
4e9db5ba9f | ||
|
|
459e758f03 | ||
|
|
433290e199 | ||
|
|
7d3d38abec | ||
|
|
ac4d53cf70 | ||
|
|
52cb8ed314 | ||
|
|
7c93a16477 | ||
|
|
df00b64cb9 | ||
|
|
f21376d668 | ||
|
|
270a406ac9 | ||
|
|
c7f9f54a23 | ||
|
|
485638a09c | ||
|
|
8d748e5de5 | ||
|
|
883d40667d | ||
|
|
c8865e3b84 | ||
|
|
dd67f066f7 | ||
|
|
da1b534601 | ||
|
|
0d115ca211 | ||
|
|
f13b0ede07 | ||
|
|
3ca1976b3c | ||
|
|
b225330707 | ||
|
|
c06e92a533 | ||
|
|
a571039870 | ||
|
|
bb2f806534 | ||
|
|
9a22bc2662 | ||
|
|
2e9eb5e32f | ||
|
|
8d44b91731 | ||
|
|
b999e91f5b | ||
|
|
da85337d13 | ||
|
|
cc58373d4d | ||
|
|
bca2d6b985 | ||
|
|
dd34fe52b9 | ||
|
|
d2798c6035 | ||
|
|
c3b0fb4fbe | ||
|
|
0a46d63f7e | ||
|
|
d5bd45429c | ||
|
|
655245afef | ||
|
|
106e0a2e68 | ||
|
|
5cbf2d6785 | ||
|
|
2b8e9430c8 | ||
|
|
701332ce30 | ||
|
|
36a5565467 | ||
|
|
0589b19abf | ||
|
|
c06ec6bde4 | ||
|
|
1b78aef426 | ||
|
|
1f4b4c384e | ||
|
|
adfb4c62b7 | ||
|
|
2827324c7c | ||
|
|
ff7e1ff677 | ||
|
|
4650b2164b | ||
|
|
cc85e7c313 | ||
|
|
710021d1d4 | ||
|
|
900751e8ae | ||
|
|
e946eaca0b | ||
|
|
dda60f3014 | ||
|
|
56d8d35300 | ||
|
|
172aa3c6d7 | ||
|
|
0618e33b5d | ||
|
|
d6394e66a3 | ||
|
|
cce0f8e507 | ||
|
|
da6465a268 | ||
|
|
d55afe4df6 | ||
|
|
f3d86b314f | ||
|
|
3d106aeb0d | ||
|
|
bceafee879 | ||
|
|
4ac6862fc4 | ||
|
|
9c8907ec10 | ||
|
|
5d1565088f | ||
|
|
1c435ae498 | ||
|
|
1a44faf264 | ||
|
|
47e7755785 | ||
|
|
9f42c1890b | ||
|
|
4fa1743009 | ||
|
|
45977c6aae | ||
|
|
aaed0af418 | ||
|
|
d588d01b7c | ||
|
|
163c1a393f | ||
|
|
ede519d1d6 | ||
|
|
c981016e41 | ||
|
|
948f3619f6 | ||
|
|
9a4cb732ed | ||
|
|
ed09d26f94 | ||
|
|
3b42f184cd | ||
|
|
6ecac26972 | ||
|
|
21d314a767 | ||
|
|
de6dfe5bbd | ||
|
|
e9b978c374 | ||
|
|
676f0deb38 | ||
|
|
e0d5138660 | ||
|
|
8ceae39d4d | ||
|
|
8c4294bcb4 | ||
|
|
0a580ac76f | ||
|
|
1461a40301 | ||
|
|
82c05eeda9 | ||
|
|
05c8d4766c | ||
|
|
cb2a1c71c9 | ||
|
|
3f3ad30c50 | ||
|
|
112a476b68 | ||
|
|
1c8fccdf6d | ||
|
|
9ada49fa1c | ||
|
|
ed0ddd20c5 | ||
|
|
a9eace9f6e | ||
|
|
b0cb29db87 | ||
|
|
98001a849b | ||
|
|
b9cbb9e744 | ||
|
|
06b2d66ce2 | ||
|
|
fde96342e8 | ||
|
|
13211f201a | ||
|
|
b2f2e1d6cc | ||
|
|
024cd2a124 | ||
|
|
bbab846ada | ||
|
|
70f2f30e67 | ||
|
|
b3be5d920a | ||
|
|
15e26c6d4a | ||
|
|
af8646c188 | ||
|
|
006b04da4a | ||
|
|
c4676ee99f | ||
|
|
5b0e7203e6 | ||
|
|
83b48280c7 | ||
|
|
5594fcf423 | ||
|
|
37cb29ae90 | ||
|
|
d80e2e069c | ||
|
|
31a3e83190 | ||
|
|
26dbc5ecb4 | ||
|
|
1a0c9ecaee | ||
|
|
fbbad87056 | ||
|
|
fd68d5b139 | ||
|
|
2ca49d39a3 | ||
|
|
d89b65f985 | ||
|
|
4ff55e646a | ||
|
|
882dca647a | ||
|
|
7ae93a2c4c | ||
|
|
f7d4076785 | ||
|
|
0f180a63eb | ||
|
|
014ed76943 | ||
|
|
b0f09b69d3 | ||
|
|
9bf8cd4b34 | ||
|
|
69b2570b72 | ||
|
|
381edb425e | ||
|
|
db834fc460 | ||
|
|
7cccb6bc5a | ||
|
|
1215665bb4 | ||
|
|
1ff8021519 | ||
|
|
94f1c05ff8 | ||
|
|
ca58cd01fc | ||
|
|
9882358984 | ||
|
|
f7bf83546e | ||
|
|
efd671f242 | ||
|
|
3ea9fa1b46 | ||
|
|
896c4539df | ||
|
|
bd400829af | ||
|
|
7b04638c8c | ||
|
|
6712d0d20d | ||
|
|
9c5ae9954f | ||
|
|
827c446b62 | ||
|
|
438536e45e | ||
|
|
2a8866ba5e | ||
|
|
14e74aeb57 | ||
|
|
b67a4cc340 | ||
|
|
94cefaedaf | ||
|
|
9c81654378 | ||
|
|
469cd3abf1 | ||
|
|
054f3e3ce5 | ||
|
|
e7a36ad902 | ||
|
|
6d97e28e42 | ||
|
|
43047598c4 | ||
|
|
a6c95c8a00 | ||
|
|
374646c36b | ||
|
|
8684fb7fac | ||
|
|
909713e233 | ||
|
|
0cdba53aae | ||
|
|
69e0e03457 | ||
|
|
55a6f3a12d | ||
|
|
6c6bec5760 | ||
|
|
0e53ac49e6 | ||
|
|
4ad9323fa2 | ||
|
|
09b303425a | ||
|
|
66b3b44fd5 | ||
|
|
3bf53aa911 | ||
|
|
ff8be9845f | ||
|
|
aa774a51d5 | ||
|
|
132d7113ea | ||
|
|
c56cfbd234 | ||
|
|
4e8cab94d3 | ||
|
|
14fdb8bf0a | ||
|
|
e2edc820e0 | ||
|
|
6b4112c98a | ||
|
|
82f166fa73 | ||
|
|
06235747b1 | ||
|
|
5d8a0fd7ec | ||
|
|
97f4fc22c5 | ||
|
|
c02aa086c6 | ||
|
|
c0f806a69c | ||
|
|
e1352b0416 | ||
|
|
8449e0ca89 | ||
|
|
aecf5485e3 | ||
|
|
931831bf75 | ||
|
|
1d8664b90b | ||
|
|
fb124764de | ||
|
|
0bca6214c6 | ||
|
|
21fa9634c1 | ||
|
|
f4873c68a6 | ||
|
|
67bf07f3e7 | ||
|
|
710335b2a3 | ||
|
|
616d802974 | ||
|
|
117cdf384f | ||
|
|
55b1e61242 | ||
|
|
f38ee78344 | ||
|
|
4b72d505ae | ||
|
|
abd2b2ee43 | ||
|
|
9bc91a21db |
No files matched your search
+150
@@ -22,3 +22,153 @@ sapi/continuity/capi.c ident
|
||||
Zend/RFCs/002.txt ident
|
||||
Zend/RFCs/003.txt ident
|
||||
NEWS merge=NEWS
|
||||
/ext/bz2/tests/with_strings.phpt -crlf
|
||||
/ext/dom/tests/bug40836.phpt -crlf
|
||||
/ext/dom/tests/domelement.phpt -crlf
|
||||
/ext/ereg/tests/eregi_basic_002.phpt -crlf
|
||||
/ext/iconv/tests/iconv004.phpt -crlf
|
||||
/ext/iconv/tests/iconv_basic.phpt -crlf
|
||||
/ext/iconv/tests/iconv_strpos.phpt -crlf
|
||||
/ext/iconv/tests/iconv_strpos_variation2.phpt -crlf
|
||||
/ext/mbstring/tests/mb_strtoupper_error2.phpt -crlf
|
||||
/ext/phar/tests/delete_in_phar_confirm.phpt -crlf
|
||||
/ext/phar/tests/frontcontroller12.phpt -crlf
|
||||
/ext/phar/tests/security.phpt -crlf
|
||||
/ext/phar/tests/test_signaturealgos.phpt -crlf
|
||||
/ext/reflection/tests/ReflectionMethod_invokeArgs_basic.phpt -crlf
|
||||
/ext/reflection/tests/ReflectionProperty_getModifiers_basic.phpt -crlf
|
||||
/ext/spl/tests/dllist_007.phpt -crlf
|
||||
/ext/spl/tests/iterator_012.phpt -crlf
|
||||
/ext/spl/tests/SplArray_fromArray.phpt -crlf
|
||||
/ext/standard/tests/dir/scandir_variation3.phpt -crlf
|
||||
/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt -crlf
|
||||
/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt -crlf
|
||||
/ext/standard/tests/strings/bug26817.phpt -crlf
|
||||
/ext/standard/tests/strings/bug26973.phpt -crlf
|
||||
/ext/standard/tests/strings/bug27457.phpt -crlf
|
||||
/ext/standard/tests/strings/bug28386.phpt -crlf
|
||||
/ext/standard/tests/strings/bug37262.phpt -crlf
|
||||
/ext/standard/tests/strings/bug40637.phpt -crlf
|
||||
/ext/standard/tests/strings/bug40915.phpt -crlf
|
||||
/ext/standard/tests/strings/bug61374.phpt -crlf
|
||||
/ext/standard/tests/strings/chop_error.phpt -crlf
|
||||
/ext/standard/tests/strings/chop_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/chunk_split_variation10.phpt -crlf
|
||||
/ext/standard/tests/strings/chunk_split_variation8.phpt -crlf
|
||||
/ext/standard/tests/strings/count_chars_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/dirname_error.phpt -crlf
|
||||
/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/highlight_file.phpt -crlf
|
||||
/ext/standard/tests/strings/htmlentities03.phpt -crlf
|
||||
/ext/standard/tests/strings/htmlentities04.phpt -crlf
|
||||
/ext/standard/tests/strings/htmlentities08.phpt -crlf
|
||||
/ext/standard/tests/strings/htmlentities15.phpt -crlf
|
||||
/ext/standard/tests/strings/http_build_query.phpt -crlf
|
||||
/ext/standard/tests/strings/metaphone.phpt -crlf
|
||||
/ext/standard/tests/strings/ord_error.phpt -crlf
|
||||
/ext/standard/tests/strings/printf_basic2.phpt -crlf
|
||||
/ext/standard/tests/strings/printf_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/quoted_printable_decode_basic.phpt -crlf
|
||||
/ext/standard/tests/strings/rtrim.phpt -crlf
|
||||
/ext/standard/tests/strings/setlocale_variation1.phpt -crlf
|
||||
/ext/standard/tests/strings/sha1_basic.phpt -crlf
|
||||
/ext/standard/tests/strings/similar_text_basic.phpt -crlf
|
||||
/ext/standard/tests/strings/soundex.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_basic1.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_basic4.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_basic7.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_variation12.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_variation28.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_variation29.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_variation30.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_variation31.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_variation38.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_variation42.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_variation6.phpt -crlf
|
||||
/ext/standard/tests/strings/sscanf_basic2.phpt -crlf
|
||||
/ext/standard/tests/strings/sscanf_basic3.phpt -crlf
|
||||
/ext/standard/tests/strings/str_getcsv_001.phpt -crlf
|
||||
/ext/standard/tests/strings/stripcslashes_basic.phpt -crlf
|
||||
/ext/standard/tests/strings/stripos_variation11.phpt -crlf
|
||||
/ext/standard/tests/strings/stripos_variation13.phpt -crlf
|
||||
/ext/standard/tests/strings/stripslashes_variation1.phpt -crlf
|
||||
/ext/standard/tests/strings/stripslashes_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/stristr_error.phpt -crlf
|
||||
/ext/standard/tests/strings/strnatcasecmp_basic.phpt -crlf
|
||||
/ext/standard/tests/strings/strncasecmp_variation6.phpt -crlf
|
||||
/ext/standard/tests/strings/strncasecmp_variation7.phpt -crlf
|
||||
/ext/standard/tests/strings/strncasecmp_variation8.phpt -crlf
|
||||
/ext/standard/tests/strings/strrchr_error.phpt -crlf
|
||||
/ext/standard/tests/strings/strrchr.phpt -crlf
|
||||
/ext/standard/tests/strings/strrchr_variation11.phpt -crlf
|
||||
/ext/standard/tests/strings/strrpos_error.phpt -crlf
|
||||
/ext/standard/tests/strings/strrpos_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/strrpos_variation8.phpt -crlf
|
||||
/ext/standard/tests/strings/strstr2.phpt -crlf
|
||||
/ext/standard/tests/strings/strtok_error.phpt -crlf
|
||||
/ext/standard/tests/strings/strtok_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/strtolower-win32.phpt -crlf
|
||||
/ext/standard/tests/strings/substr_compare.phpt -crlf
|
||||
/ext/standard/tests/strings/ucwords_variation1.phpt -crlf
|
||||
/ext/standard/tests/strings/unpack.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation12.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation7.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_basic2.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_basic7_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation10.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation14_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation17.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_basic4.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_basic8.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation12_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation17.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation4_64bit.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation7.phpt -crlf
|
||||
/ext/standard/tests/strings/wordwrap.phpt -crlf
|
||||
/ext/standard/tests/strings/wordwrap_variation5.phpt -crlf
|
||||
/ext/standard/tests/url/rawurldecode_variation_001.phpt -crlf
|
||||
/ext/tidy/tests/009.phpt -crlf
|
||||
/ext/tidy/tests/013.phpt -crlf
|
||||
/ext/tidy/tests/021.phpt -crlf
|
||||
/ext/tidy/tests/tidy_error.phpt -crlf
|
||||
/ext/tokenizer/tests/002.phpt -crlf
|
||||
/ext/tokenizer/tests/bug26463.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_error.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation11.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation12.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation13.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation14.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation15.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation18.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation19.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation1.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation2.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation3.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation5.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation8.phpt -crlf
|
||||
/ext/xml/tests/bug32001b.phpt -crlf
|
||||
/ext/xmlwriter/tests/OO_003.phpt -crlf
|
||||
/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt -crlf
|
||||
/ext/zlib/tests/008.phpt -crlf
|
||||
/ext/zlib/tests/gzopen_variation4.phpt -crlf
|
||||
/ext/zlib/tests/gzrewind_error.phpt -crlf
|
||||
/ext/zlib/tests/readgzfile_variation7.phpt -crlf
|
||||
/ext/zlib/tests/readgzfile_variation8.phpt -crlf
|
||||
/ext/zlib/tests/zlib_scheme_stat_basic.phpt -crlf
|
||||
/sapi/cli/tests/006.phpt -crlf
|
||||
/tests/run-test/test009.phpt -crlf
|
||||
/Zend/tests/012.phpt -crlf
|
||||
/Zend/tests/bug28072.phpt -crlf
|
||||
/Zend/tests/bug38624.phpt -crlf
|
||||
/Zend/tests/bug40784.phpt -crlf
|
||||
/Zend/tests/bug43053.phpt -crlf
|
||||
/Zend/tests/bug51176.phpt -crlf
|
||||
/Zend/tests/each_003.phpt -crlf
|
||||
/Zend/tests/errmsg_006.phpt -crlf
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
# We only specify one version so we only get one worker
|
||||
- 5.4
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
script: exit 0
|
||||
@@ -1,6 +1,251 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2012, PHP 5.4.1 RC1
|
||||
16 Aug 2012, PHP 5.4.6
|
||||
|
||||
- CLI Server:
|
||||
. Implemented FR #62700 (have the console output 'Listening on
|
||||
http://localhost:8000'). (pascal.chevrel@free.fr)
|
||||
|
||||
- Core:
|
||||
. Fixed bug #62661 (Interactive php-cli crashes if include() is used in
|
||||
auto_prepend_file). (Laruence)
|
||||
. Fixed bug #62653: (unset($array[$float]) causes a crash). (Nikita Popov,
|
||||
Laruence)
|
||||
. Fixed bug #62565 (Crashes due non-initialized internal properties_table).
|
||||
(Felipe)
|
||||
. Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
|
||||
with run-test.php). (Laruence)
|
||||
|
||||
- CURL:
|
||||
. Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
|
||||
(r.hampartsumyan@gmail.com, Laruence)
|
||||
|
||||
- DateTime:
|
||||
. Fixed Bug #62500 (Segfault in DateInterval class when extended). (Laruence)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #61964 (finfo_open with directory causes invalid free).
|
||||
(reeze.xia@gmail.com)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #62564 (Extending MessageFormatter and adding property causes
|
||||
crash). (Felipe)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #62594 (segfault in mysqlnd_res_meta::set_mode). (Laruence)
|
||||
|
||||
- readline:
|
||||
. Fixed bug #62612 (readline extension compilation fails with
|
||||
sapi/cli/cli.h: No such file). (Johannes)
|
||||
|
||||
- Reflection:
|
||||
. Implemented FR #61602 (Allow access to name of constant used as default
|
||||
value). (reeze.xia@gmail.com)
|
||||
|
||||
- SimpleXML:
|
||||
. Implemented FR #55218 Get namespaces from current node. (Lonny)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
|
||||
gives Segmentation fault). (Laruence, Gustavo)
|
||||
. Fixed bug #61527 (ArrayIterator gives misleading notice on next() when
|
||||
moved to the end). (reeze.xia@gmail.com)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #62597 (segfault in php_stream_wrapper_log_error with ZTS build).
|
||||
(Laruence)
|
||||
|
||||
- Zlib:
|
||||
. Fixed bug #55544 (ob_gzhandler always conflicts with
|
||||
zlib.output_compression). (Laruence)
|
||||
|
||||
19 Jul 2012, PHP 5.4.5
|
||||
|
||||
- Core:
|
||||
. Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed
|
||||
Salt). (Anthony Ferrara)
|
||||
. Fixed bug #62432 (ReflectionMethod random corrupt memory on high
|
||||
concurrent). (Johannes)
|
||||
. Fixed bug #62373 (serialize() generates wrong reference to the object).
|
||||
(Moriyoshi)
|
||||
. Fixed bug #62357 (compile failure: (S) Arguments missing for built-in
|
||||
function __memcmp). (Laruence)
|
||||
. Fixed bug #61998 (Using traits with method aliases appears to result in
|
||||
crash during execution). (Dmitry)
|
||||
. Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that
|
||||
includes a semi-colon). (Pierrick)
|
||||
. Fixed potential overflow in _php_stream_scandir (CVE-2012-2688).
|
||||
(Jason Powell, Stas)
|
||||
|
||||
- EXIF:
|
||||
. Fixed information leak in ext exif (discovered by Martin Noga,
|
||||
Matthew "j00ru" Jurczyk, Gynvael Coldwind)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #62205 (php-fpm segfaults (null passed to strstr)). (fat)
|
||||
. Fixed bug #62160 (Add process.priority to set nice(2) priorities). (fat)
|
||||
. Fixed bug #62153 (when using unix sockets, multiples FPM instances
|
||||
. Fixed bug #62033 (php-fpm exits with status 0 on some failures to start).
|
||||
(fat)
|
||||
. Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm). (fat)
|
||||
. Fixed bug #61835 (php-fpm is not allowed to run as root). (fat)
|
||||
. Fixed bug #61295 (php-fpm should not fail with commented 'user'
|
||||
. Fixed bug #61218 (FPM drops connection while receiving some binary values
|
||||
in FastCGI requests). (fat)
|
||||
. Fixed bug #61045 (fpm don't send error log to fastcgi clients). (fat)
|
||||
for non-root start). (fat)
|
||||
. Fixed bug #61026 (FPM pools can listen on the same address). (fat)
|
||||
can be launched without errors). (fat)
|
||||
|
||||
- Iconv:
|
||||
. Fix bug #55042 (Erealloc in iconv.c unsafe). (Stas)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #62083 (grapheme_extract() memory leaks). (Gustavo)
|
||||
. ResourceBundle constructor now accepts NULL for the first two arguments.
|
||||
(Gustavo)
|
||||
. Fixed bug #62081 (IntlDateFormatter constructor leaks memory when called
|
||||
twice). (Gustavo)
|
||||
. Fixed bug #62070 (Collator::getSortKey() returns garbage). (Gustavo)
|
||||
. Fixed bug #62017 (datefmt_create with incorrectly encoded timezone leaks
|
||||
pattern). (Gustavo)
|
||||
. Fixed bug #60785 (memory leak in IntlDateFormatter constructor). (Gustavo)
|
||||
|
||||
- JSON:
|
||||
. Fixed bug #61359 (json_encode() calls too many reallocs). (Stas)
|
||||
|
||||
- libxml:
|
||||
. Fixed bug #62266 (Custom extension segfaults during xmlParseFile with FPM
|
||||
SAPI). (Gustavo)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #62227 (Invalid phar stream path causes crash). (Felipe)
|
||||
|
||||
- Readline:
|
||||
. Fixed bug #62186 (readline fails to compile - void function should not
|
||||
return a value). (Johannes)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #62384 (Attempting to invoke a Closure more than once causes
|
||||
segfault). (Felipe)
|
||||
. Fixed bug #62202 (ReflectionParameter::getDefaultValue() memory leaks
|
||||
with constant). (Laruence)
|
||||
|
||||
- Sockets:
|
||||
. Fixed bug #62025 (__ss_family was changed on AIX 5.3). (Felipe)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #62433 (Inconsistent behavior of RecursiveDirectoryIterator to
|
||||
dot files). (Laruence)
|
||||
. Fixed bug #62262 (RecursiveArrayIterator does not implement Countable).
|
||||
(Nikita Popov)
|
||||
|
||||
- XML Writer:
|
||||
. Fixed bug #62064 (memory leak in the XML Writer module).
|
||||
(jean-pierre dot lozi at lip6 dot fr)
|
||||
|
||||
- Zip:
|
||||
. Upgraded libzip to 0.10.1 (Anatoliy)
|
||||
|
||||
14 Jun 2012, PHP 5.4.4
|
||||
|
||||
- COM:
|
||||
. Fixed bug #62146 com_dotnet cannot be built shared. (Johannes)
|
||||
|
||||
- CLI Server:
|
||||
. Implemented FR #61977 (Need CLI web-server support for files with .htm &
|
||||
svg extensions). (Sixd, Laruence)
|
||||
. Improved performance while sending error page, this also fixed
|
||||
bug #61785 (Memory leak when access a non-exists file without router).
|
||||
(Laruence)
|
||||
. Fixed bug #61546 (functions related to current script failed when chdir()
|
||||
in cli sapi). (Laruence, reeze.xia@gmail.com)
|
||||
|
||||
- Core:
|
||||
. Fixed missing bound check in iptcparse(). (chris at chiappa.net)
|
||||
. Fixed CVE-2012-2143. (Solar Designer)
|
||||
. Fixed bug #62097 (fix for for bug #54547). (Gustavo)
|
||||
. Fixed bug #62005 (unexpected behavior when incrementally assigning to a
|
||||
member of a null object). (Laruence)
|
||||
. Fixed bug #61978 (Object recursion not detected for classes that implement
|
||||
JsonSerializable). (Felipe)
|
||||
. Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy)
|
||||
. Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config).
|
||||
(Laruence)
|
||||
. Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy)
|
||||
. Fixed bug #61782 (__clone/__destruct do not match other methods when checking
|
||||
access controls). (Stas)
|
||||
. Fixed bug #61764 ('I' unpacks n as signed if n > 2^31-1 on LP64). (Gustavo)
|
||||
. Fixed bug #61761 ('Overriding' a private static method with a different
|
||||
signature causes crash). (Laruence)
|
||||
. Fixed bug #61730 (Segfault from array_walk modifying an array passed by
|
||||
reference). (Laruence)
|
||||
. Fixed bug #61728 (PHP crash when calling ob_start in request_shutdown
|
||||
phase). (Laruence)
|
||||
. Fixed bug #61713 (Logic error in charset detection for htmlentities).
|
||||
(Anatoliy)
|
||||
. Fixed bug #61660 (bin2hex(hex2bin($data)) != $data). (Nikita Popov)
|
||||
. Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables
|
||||
(without apache2)). (Laruence)
|
||||
. Fixed bug #61605 (header_remove() does not remove all headers). (Laruence)
|
||||
. Fixed bug #54547 (wrong equality of string numbers). (Gustavo)
|
||||
. Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
|
||||
set to null). (Anatoliy)
|
||||
. Changed php://fd to be available only for CLI.
|
||||
|
||||
- CURL:
|
||||
. Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
|
||||
(Laruence)
|
||||
|
||||
- Fileinfo
|
||||
. Fixed bug #61812 (Uninitialised value used in libmagic).
|
||||
(Laruence, Gustavo)
|
||||
. Fixed bug #61566 failure caused by the posix lseek and read versions
|
||||
under windows in cdf_read(). (Anatoliy)
|
||||
. Fixed bug #61565 where php_stream_open_wrapper_ex tries to open a
|
||||
directory descriptor under windows. (Anatoliy)
|
||||
|
||||
- Intl
|
||||
. Fixed bug #62082 (Memory corruption in internal function
|
||||
get_icu_disp_value_src_php()). (Gustavo)
|
||||
|
||||
- Libxml:
|
||||
. Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
|
||||
(Laruence)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #61755 (A parsing bug in the prepared statements can lead to
|
||||
access violations). (Johannes)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #61065 (Secunia SA44335, CVE-2012-2386). (Rasmus)
|
||||
|
||||
- Pgsql:
|
||||
. Added pg_escape_identifier/pg_escape_literal. (Yasuo Ohgaki)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #61961 (file_get_contents leaks when access empty file with
|
||||
maxlen set). (Reeze)
|
||||
|
||||
- Zlib:
|
||||
. Fixed bug #61820 (using ob_gzhandler will complain about headers already
|
||||
sent when no compression). (Mike)
|
||||
. Fixed bug #61443 (can't change zlib.output_compression on the fly). (Mike)
|
||||
. Fixed bug #60761 (zlib.output_compression fails on refresh). (Mike)
|
||||
|
||||
08 May 2012, PHP 5.4.3
|
||||
|
||||
- CGI
|
||||
. Re-Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823.
|
||||
(Stas)
|
||||
. Fix bug #61807 - Buffer Overflow in apache_request_headers.
|
||||
(nyt-php at countercultured dot net).
|
||||
|
||||
03 May 2012, PHP 5.4.2
|
||||
|
||||
- Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823. (Rasmus)
|
||||
|
||||
26 Apr 2012, PHP 5.4.1
|
||||
|
||||
- CLI Server:
|
||||
. Fixed bug #61461 (missing checks around malloc() calls). (Ilia)
|
||||
@@ -9,6 +254,7 @@ PHP NEWS
|
||||
. "Connection: close" instead of "Connection: closed" (Gustavo)
|
||||
|
||||
- Core:
|
||||
. Fixed crash in ZTS using same class in many threads. (Johannes)
|
||||
. Fixed bug #61374 (html_entity_decode tries to decode code points that don't
|
||||
exist in ISO-8859-1). (Gustavo)
|
||||
. Fixed bug #61273 (call_user_func_array with more than 16333 arguments
|
||||
@@ -40,6 +286,9 @@ PHP NEWS
|
||||
function is by reference). (Nikita Popov)
|
||||
. Improve performance of set_exception_handler while doing reset (Laruence)
|
||||
|
||||
- fileinfo:
|
||||
. Fix fileinfo test problems. (Anatoliy Belsky)
|
||||
|
||||
- FPM
|
||||
. Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
|
||||
(michaelhood at gmail dot com, Ilia)
|
||||
@@ -62,26 +311,10 @@ PHP NEWS
|
||||
. Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes).
|
||||
|
||||
- mysqlnd
|
||||
. Fixed bug #61704 (Crash apache, phpinfo() threading issue). (Johannes)
|
||||
. Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled).
|
||||
(Johannes)
|
||||
|
||||
- Readline:
|
||||
. Fixed bug #61088 (Memory leak in readline_callback_handler_install).
|
||||
(Nikic, Laruence)
|
||||
|
||||
- Session
|
||||
. Fixed bug #60634 (Segmentation fault when trying to die() in
|
||||
SessionHandler::write()). (Ilia)
|
||||
|
||||
- SOAP
|
||||
. Fixed bug #61423 (gzip compression fails). (Ilia)
|
||||
. Fixed bug #60887 (SoapClient ignores user_agent option and sends no
|
||||
User-Agent header). (carloschilazo at gmail dot com)
|
||||
. Fixed bug #60842, #51775 (Chunked response parsing error when
|
||||
chunksize length line is > 10 bytes). (Ilia)
|
||||
. Fixed bug #49853 (Soap Client stream context header option ignored).
|
||||
(Dmitry)
|
||||
|
||||
- PDO
|
||||
. Fixed bug #61292 (Segfault while calling a method on an overloaded PDO
|
||||
object). (Laruence)
|
||||
@@ -99,10 +332,29 @@ PHP NEWS
|
||||
. Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
|
||||
bytes). (Nikita Popov)
|
||||
|
||||
- Readline:
|
||||
. Fixed bug #61088 (Memory leak in readline_callback_handler_install).
|
||||
(Nikic, Laruence)
|
||||
|
||||
- Reflection:
|
||||
. Implemented FR #61602 (Allow access to the name of constant
|
||||
used as function/method parameter's default value). (reeze.xia@gmail.com)
|
||||
. Fixed bug #60968 (Late static binding doesn't work with
|
||||
ReflectionMethod::invokeArgs()). (Laruence)
|
||||
|
||||
- Session
|
||||
. Fixed bug #60634 (Segmentation fault when trying to die() in
|
||||
SessionHandler::write()). (Ilia)
|
||||
|
||||
- SOAP
|
||||
. Fixed bug #61423 (gzip compression fails). (Ilia)
|
||||
. Fixed bug #60887 (SoapClient ignores user_agent option and sends no
|
||||
User-Agent header). (carloschilazo at gmail dot com)
|
||||
. Fixed bug #60842, #51775 (Chunked response parsing error when
|
||||
chunksize length line is > 10 bytes). (Ilia)
|
||||
. Fixed bug #49853 (Soap Client stream context header option ignored).
|
||||
(Dmitry)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #61453 (SplObjectStorage does not identify objects correctly).
|
||||
(Gustavo)
|
||||
@@ -559,6 +811,228 @@ PHP NEWS
|
||||
. Fixed bug #55544 (ob_gzhandler always conflicts with zlib.output_compression).
|
||||
(Mike)
|
||||
|
||||
14 Jun 2012, PHP 5.3.14
|
||||
|
||||
- CLI SAPI:
|
||||
. Fixed bug #61546 (functions related to current script failed when chdir()
|
||||
in cli sapi). (Laruence, reeze.xia@gmail.com)
|
||||
|
||||
- CURL:
|
||||
. Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
|
||||
(Laruence)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #62146 com_dotnet cannot be built shared. (Johannes)
|
||||
|
||||
- Core:
|
||||
. Fixed CVE-2012-2143. (Solar Designer)
|
||||
. Fixed missing bound check in iptcparse(). (chris at chiappa.net)
|
||||
. Fixed bug #62373 (serialize() generates wrong reference to the object).
|
||||
(Moriyoshi)
|
||||
. Fixed bug #62005 (unexpected behavior when incrementally assigning to a
|
||||
member of a null object). (Laruence)
|
||||
. Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy)
|
||||
. Fixed bug #61764 ('I' unpacks n as signed if n > 2^31-1 on LP64). (Gustavo)
|
||||
. Fixed bug #61730 (Segfault from array_walk modifying an array passed by
|
||||
reference). (Laruence)
|
||||
. Fixed bug #61713 (Logic error in charset detection for htmlentities).
|
||||
(Anatoliy)
|
||||
. Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
|
||||
set to null). (Anatoliy)
|
||||
. Changed php://fd to be available only for CLI.
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #61812 (Uninitialised value used in libmagic).
|
||||
(Laruence, Gustavo)
|
||||
|
||||
- Iconv extension:
|
||||
. Fixed a bug that iconv extension fails to link to the correct library
|
||||
when another extension makes use of a library that links to the iconv
|
||||
library. See https://bugs.gentoo.org/show_bug.cgi?id=364139 for detail.
|
||||
(Moriyoshi)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #62082 (Memory corruption in internal function
|
||||
get_icu_disp_value_src_php()). (Gustavo)
|
||||
|
||||
- JSON
|
||||
. Fixed bug #61537 (json_encode() incorrectly truncates/discards
|
||||
information). (Adam)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #61755 (A parsing bug in the prepared statements can lead to
|
||||
access violations). (Johannes)
|
||||
|
||||
- Phar:
|
||||
. Fix bug #61065 (Secunia SA44335). (Rasmus)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #61961 (file_get_contents leaks when access empty file with
|
||||
maxlen set). (Reeze)
|
||||
|
||||
08 May 2012, PHP 5.3.13
|
||||
- CGI
|
||||
. Improve fix for PHP-CGI query string parameter vulnerability, CVE-2012-2311.
|
||||
(Stas)
|
||||
|
||||
03 May 2012, PHP 5.3.12
|
||||
- Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823. (Rasmus)
|
||||
|
||||
26 Apr 2012, PHP 5.3.11
|
||||
|
||||
- Core:
|
||||
. Fixed bug #61605 (header_remove() does not remove all headers).
|
||||
(Laruence)
|
||||
. Fixed bug #61541 (Segfault when using ob_* in output_callback).
|
||||
(reeze.xia@gmail.com)
|
||||
. Fixed bug #61273 (call_user_func_array with more than 16333 arguments
|
||||
leaks / crashes). (Laruence)
|
||||
. Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
|
||||
. Improved max_input_vars directive to check nested variables (Dmitry).
|
||||
. Fixed bug #61095 (Incorect lexing of 0x00*+<NUM>). (Etienne)
|
||||
. Fixed bug #61087 (Memory leak in parse_ini_file when specifying
|
||||
invalid scanner mode). (Nikic, Laruence)
|
||||
. Fixed bug #61072 (Memory leak when restoring an exception handler).
|
||||
(Nikic, Laruence)
|
||||
. Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX).
|
||||
(Laruence)
|
||||
. Fixed bug #61043 (Regression in magic_quotes_gpc fix for CVE-2012-0831).
|
||||
(Ondřej Surý)
|
||||
. Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
|
||||
vars). (Laruence)
|
||||
. Fixed bug #60895 (Possible invalid handler usage in windows random
|
||||
functions). (Pierre)
|
||||
. Fixed bug #60825 (Segfault when running symfony 2 tests).
|
||||
(Dmitry, Laruence)
|
||||
. Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
|
||||
. Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
|
||||
. Fixed bug #60227 (header() cannot detect the multi-line header with CR).
|
||||
(rui, Gustavo)
|
||||
. Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia)
|
||||
. Fixed bug #54374 (Insufficient validating of upload name leading to
|
||||
corrupted $_FILES indices). (CVE-2012-1172). (Stas, lekensteyn at
|
||||
gmail dot com, Pierre)
|
||||
. Fixed bug #52719 (array_walk_recursive crashes if third param of the
|
||||
function is by reference). (Nikita Popov)
|
||||
. Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)
|
||||
|
||||
- DOM
|
||||
. Added debug info handler to DOM objects. (Gustavo, Joey Smith)
|
||||
|
||||
- FPM
|
||||
. Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
|
||||
(michaelhood at gmail dot com, Ilia)
|
||||
|
||||
- Ibase
|
||||
. Fixed bug #60947 (Segmentation fault while executing ibase_db_info).
|
||||
(Ilia)
|
||||
|
||||
- Installation
|
||||
. Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)
|
||||
|
||||
- Fileinfo
|
||||
. Fixed bug #61173 (Unable to detect error from finfo constructor). (Gustavo)
|
||||
|
||||
- Firebird Database extension (ibase):
|
||||
. Fixed bug #60802 (ibase_trans() gives segfault when passing params).
|
||||
|
||||
- Libxml:
|
||||
. Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
|
||||
(Laruence)
|
||||
. Fixed bug #61367 (open_basedir bypass using libxml RSHUTDOWN).
|
||||
(Tim Starling)
|
||||
|
||||
- mysqli
|
||||
. Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes).
|
||||
|
||||
- PDO_mysql
|
||||
. Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't
|
||||
always work). (Johannes)
|
||||
. Fixed bug #61194 (PDO should export compression flag with myslqnd).
|
||||
(Johannes)
|
||||
|
||||
- PDO_odbc
|
||||
. Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). (Ilia)
|
||||
|
||||
- PDO_pgsql
|
||||
. Fixed bug #61267 (pdo_pgsql's PDO::exec() returns the number of SELECTed
|
||||
rows on postgresql >= 9). (ben dot pineau at gmail dot com)
|
||||
|
||||
- PDO_Sqlite extension:
|
||||
. Add createCollation support. (Damien)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
|
||||
bytes). (Nikic)
|
||||
|
||||
- PHP-FPM SAPI:
|
||||
. Fixed bug #60811 (php-fpm compilation problem). (rasmus)
|
||||
|
||||
- Readline:
|
||||
. Fixed bug #61088 (Memory leak in readline_callback_handler_install).
|
||||
(Nikic, Laruence)
|
||||
. Add open_basedir checks to readline_write_history and readline_read_history.
|
||||
(Rasmus, reported by Mateusz Goik)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #61388 (ReflectionObject:getProperties() issues invalid reads
|
||||
when get_properties returns a hash table with (inaccessible) dynamic
|
||||
numeric properties). (Gustavo)
|
||||
. Fixed bug #60968 (Late static binding doesn't work with
|
||||
ReflectionMethod::invokeArgs()). (Laruence)
|
||||
|
||||
- SOAP
|
||||
. Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
|
||||
. Fixed bug #60887 (SoapClient ignores user_agent option and sends no
|
||||
User-Agent header). (carloschilazo at gmail dot com)
|
||||
. Fixed bug #60842, #51775 (Chunked response parsing error when
|
||||
chunksize length line is > 10 bytes). (Ilia)
|
||||
. Fixed bug #49853 (Soap Client stream context header option ignored).
|
||||
(Dmitry)
|
||||
|
||||
- SPL
|
||||
. Fixed memory leak when calling SplFileInfo's constructor twice. (Felipe)
|
||||
. Fixed bug #61418 (Segmentation fault when DirectoryIterator's or
|
||||
FilesystemIterator's iterators are requested more than once without
|
||||
having had its dtor callback called in between). (Gustavo)
|
||||
. Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence)
|
||||
. Fixed bug #61326 (ArrayObject comparison). (Gustavo)
|
||||
|
||||
- SQLite3 extension:
|
||||
. Add createCollation() method. (Brad Dewar)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #60860 (session.save_handler=user without defined function core
|
||||
dumps). (Felipe)
|
||||
. Fixed bug #60634 (Segmentation fault when trying to die() in
|
||||
SessionHandler::write()). (Ilia)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #61371 (stream_context_create() causes memory leaks on use
|
||||
streams_socket_create). (Gustavo)
|
||||
. Fixed bug #61253 (Wrappers opened with errors concurrency problem on ZTS).
|
||||
(Gustavo)
|
||||
. Fixed bug #61115 (stream related segfault on fatal error in
|
||||
php_stream_context_link). (Gustavo)
|
||||
. Fixed bug #60817 (stream_get_line() reads from stream even when there is
|
||||
already sufficient data buffered). stream_get_line() now behaves more like
|
||||
fgets(), as is documented. (Gustavo)
|
||||
. Further fix for bug #60455 (stream_get_line misbehaves if EOF is not
|
||||
detected together with the last read). (Gustavo)
|
||||
. Fixed bug #60106 (stream_socket_server silently truncates long unix
|
||||
socket paths). (Ilia)
|
||||
|
||||
- Tidy:
|
||||
. Fixed bug #54682 (tidy null pointer dereference). (Tony, David Soria Parra)
|
||||
|
||||
- XMLRPC:
|
||||
. Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary
|
||||
variable). (Nikita Popov)
|
||||
. Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic)
|
||||
|
||||
- Zlib:
|
||||
. Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikic)
|
||||
|
||||
02 Feb 2012, PHP 5.3.10
|
||||
|
||||
- Core:
|
||||
@@ -771,6 +1245,7 @@ PHP NEWS
|
||||
- Postgres:
|
||||
. Fixed bug #60244 (pg_fetch_* functions do not validate that row param
|
||||
is >0). (Ilia)
|
||||
. Added PGSQL_LIBPQ_VERSION/PGSQL_LIBPQ_VERSION_STR constants. (Yasuo)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #60367 (Reflection and Late Static Binding). (Laruence)
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
====================
|
||||
Git Commit Rules
|
||||
====================
|
||||
|
||||
This is the first file you should be reading when contributing code via Git.
|
||||
We'll assume you're basically familiar with Git, but feel free to post
|
||||
your questions on the mailing list. Please have a look at
|
||||
http://git-scm.com/ for more detailed information on Git.
|
||||
|
||||
PHP is developed through the efforts of a large number of people.
|
||||
Collaboration is a Good Thing(tm), and Git lets us do this. Thus, following
|
||||
some basic rules with regards to Git usage will::
|
||||
|
||||
a. Make everybody happier, especially those responsible for maintaining
|
||||
Git itself.
|
||||
|
||||
b. Keep the changes consistently well documented and easily trackable.
|
||||
|
||||
c. Prevent some of those 'Oops' moments.
|
||||
|
||||
d. Increase the general level of good will on planet Earth.
|
||||
|
||||
Having said that, here are the organizational rules::
|
||||
|
||||
1. Respect other people working on the project.
|
||||
|
||||
2. Discuss any significant changes on the list before committing and get
|
||||
confirmation from the release manager for the given branch.
|
||||
|
||||
3. Look at EXTENSIONS file to see who is the primary maintainer of
|
||||
the code you want to contribute to.
|
||||
|
||||
4. If you "strongly disagree" about something another person did, don't
|
||||
start fighting publicly - take it up in private email.
|
||||
|
||||
5. If you don't know how to do something, ask first!
|
||||
|
||||
6. Test your changes before committing them. We mean it. Really.
|
||||
To do so use "make test".
|
||||
|
||||
7. For development use the --enable-maintainer-zts switch to ensure your
|
||||
code handles TSRM correctly and doesn't break for those who need that.
|
||||
|
||||
Currently we have the following branches in use::
|
||||
|
||||
master The active development branch.
|
||||
|
||||
PHP-5.4 Is used to release the PHP 5.4.x series. It still allows for
|
||||
larger enhancements.
|
||||
|
||||
PHP-5.3 Is used to release the PHP 5.3.x series. This is current
|
||||
stable version and is open for bugfixes only.
|
||||
|
||||
PHP-5.2 Is used to release the PHP 5.2.x series. It is closed for
|
||||
changes now.
|
||||
|
||||
PHP-5.1 This branch is closed.
|
||||
|
||||
PHP-4.4 This branch is closed.
|
||||
|
||||
The next few rules are more of a technical nature::
|
||||
|
||||
1. All changes should first go to the lowest branch (i.e. 5.3) and then
|
||||
get merged up to all other branches. If a change is not needed for
|
||||
later branches (i.e. fixes for features which where dropped from later
|
||||
branches) an empty merge should be done.
|
||||
|
||||
2. All news updates intended for public viewing, such as new features,
|
||||
bug fixes, improvements, etc., should go into the NEWS file of the
|
||||
*first* to be released version with the given change. In other words
|
||||
any NEWS file change only needs to done in one branch.
|
||||
|
||||
3. Do not commit multiple file and dump all messages in one commit. If you
|
||||
modified several unrelated files, commit each group separately and
|
||||
provide a nice commit message for each one. See example below.
|
||||
|
||||
4. Do write your commit message in such a way that it makes sense even
|
||||
without the corresponding diff. One should be able to look at it, and
|
||||
immediately know what was modified. Definitely include the function name
|
||||
in the message as shown below.
|
||||
|
||||
5. In your commit messages, keep each line shorter than 80 characters. And
|
||||
try to align your lines vertically, if they wrap. It looks bad otherwise.
|
||||
|
||||
6. If you modified a function that is callable from PHP, prepend PHP to
|
||||
the function name as shown below.
|
||||
|
||||
|
||||
The format of the commit messages is pretty simple.
|
||||
|
||||
<max 79 characters short description>\n
|
||||
\n
|
||||
<long description, 79 chars per line>
|
||||
\n
|
||||
|
||||
An Example from the git project (commit 2b34e486bc):
|
||||
|
||||
pack-objects: Fix compilation with NO_PTHREDS
|
||||
|
||||
It looks like commit 99fb6e04 (pack-objects: convert to use
|
||||
parse_options(), 2012-02-01) moved the #ifdef NO_PTHREDS around but
|
||||
hasn't noticed that the 'arg' variable no longer is available.
|
||||
|
||||
If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
bug report when developers are browsing CVS via LXR or Bonsai.
|
||||
|
||||
Example::
|
||||
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
|
||||
When you change the NEWS file for a bug fix, then please keep the bugs
|
||||
sorted in decreasing order under the fixed version.
|
||||
|
||||
You can use OpenGrok (http://lxr.php.net/) and gitweb (http://git.php.net/)
|
||||
to look at PHP Git repository in various ways.
|
||||
|
||||
|
||||
For further information on the process and further details please refer to
|
||||
https://wiki.php.net/vcs/gitworkflow and https://wiki.php.net/vcs/gitfaq
|
||||
|
||||
Happy hacking,
|
||||
|
||||
PHP Team
|
||||
@@ -58,12 +58,12 @@ Do not use abbreviations for alpha and beta.
|
||||
5. Commit these changes to the branch with ``git commit -a``.
|
||||
|
||||
6. Tag the repository with the version, e.g.:
|
||||
``git tag -u YOURKEYID PHP-5.4.2-RC2``
|
||||
``git tag -u YOURKEYID php-5.4.2RC2``
|
||||
|
||||
7. Push the changes to the main repo:
|
||||
``git push --tags origin HEAD``
|
||||
|
||||
8. run: ``./makedist 5.4.2-RC2``, this will export the tree, create configure
|
||||
8. run: ``./makedist 5.4.2RC2``, this will export the tree, create configure
|
||||
and build two tarballs (one gz and one bz2).
|
||||
|
||||
9. Copy those two tarballs to www.php.net, in your homedir there should be a
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
====================
|
||||
SVN Commit Rules
|
||||
====================
|
||||
|
||||
This is the first file you should be reading after you get your SVN account.
|
||||
We'll assume you're basically familiar with SVN, but feel free to post
|
||||
your questions on the mailing list. Please have a look at
|
||||
http://svnbook.red-bean.com/ for more detailed information on SVN.
|
||||
|
||||
PHP is developed through the efforts of a large number of people.
|
||||
Collaboration is a Good Thing(tm), and SVN lets us do this. Thus, following
|
||||
some basic rules with regards to SVN usage will::
|
||||
|
||||
a. Make everybody happier, especially those responsible for maintaining
|
||||
the SVN itself.
|
||||
|
||||
b. Keep the changes consistently well documented and easily trackable.
|
||||
|
||||
c. Prevent some of those 'Oops' moments.
|
||||
|
||||
d. Increase the general level of good will on planet Earth.
|
||||
|
||||
Having said that, here are the organizational rules::
|
||||
|
||||
1. Respect other people working on the project.
|
||||
|
||||
2. Discuss any significant changes on the list before committing and get
|
||||
confirmation from the release manager for the given branch.
|
||||
|
||||
3. Look at EXTENSIONS file to see who is the primary maintainer of
|
||||
the code you want to contribute to.
|
||||
|
||||
4. If you "strongly disagree" about something another person did, don't
|
||||
start fighting publicly - take it up in private email.
|
||||
|
||||
5. If you don't know how to do something, ask first!
|
||||
|
||||
6. Test your changes before committing them. We mean it. Really.
|
||||
To do so use "make test".
|
||||
|
||||
7. For development use the --enable-maintainer-zts switch to ensure your
|
||||
code handles TSRM correctly and doesn't break for those who need that.
|
||||
|
||||
Currently we have the following branches in use::
|
||||
|
||||
trunk The active development branch.
|
||||
|
||||
branches/PHP_5_4 Is used to release the PHP 5.4.x series. In release
|
||||
process, only bugfixes and very small changes approved
|
||||
by RMs are allowed.
|
||||
|
||||
branches/PHP_5_3 Is used to release the PHP 5.3.x series. This is current
|
||||
stable version and is open for bugfixes and small
|
||||
improvements (check with RMs if in doubt).
|
||||
|
||||
branches/PHP_5_2 Is used to release the PHP 5.2.x series. It is closed for
|
||||
changes now.
|
||||
|
||||
branches/PHP_5_1 This branch is closed.
|
||||
|
||||
branches/PHP_4_4 This branch is closed.
|
||||
|
||||
The next few rules are more of a technical nature::
|
||||
|
||||
1. All changes should first go to trunk and then get merged from trunk
|
||||
(aka MFH'ed) to all other relevant branches.
|
||||
|
||||
2. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
|
||||
messages every day. Woe be to those who attempt to mess with it.
|
||||
|
||||
3. All news updates intended for public viewing, such as new features,
|
||||
bug fixes, improvements, etc., should go into the NEWS file of the
|
||||
*first* to be released version with the given change. In other words
|
||||
any NEWS file change only needs to done in one branch.
|
||||
|
||||
NB! Lines, starting with @ will go automagically into NEWS file, but
|
||||
this is NOT recommended, though. Please, add news entries directly to
|
||||
NEWS file and don't forget to keep them adjusted and sorted.
|
||||
|
||||
4. Do not commit multiple file and dump all messages in one commit. If you
|
||||
modified several unrelated files, commit each group separately and
|
||||
provide a nice commit message for each one. See example below.
|
||||
|
||||
5. Do write your commit message in such a way that it makes sense even
|
||||
without the corresponding diff. One should be able to look at it, and
|
||||
immediately know what was modified. Definitely include the function name
|
||||
in the message as shown below.
|
||||
|
||||
6. In your commit messages, keep each line shorter than 80 characters. And
|
||||
try to align your lines vertically, if they wrap. It looks bad otherwise.
|
||||
|
||||
7. If you modified a function that is callable from PHP, prepend PHP to
|
||||
the function name as shown below.
|
||||
|
||||
|
||||
The format of the commit messages is pretty simple.
|
||||
|
||||
Use a - to start a new item in your commit message.
|
||||
|
||||
If a line begins with #, it is taken to be a comment and will not appear
|
||||
in the ChangeLog. Everything else goes into the ChangeLog.
|
||||
|
||||
It is important to note that if your comment or news logline spans multiple
|
||||
lines, you have to put # at the beginning of **every** such line.
|
||||
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c you
|
||||
added a new format option for the date() function, and in string.c you fixed a
|
||||
memory leak in php_trim(). Don't commit both of these at once. Commit them
|
||||
separately and try to make sure your commit messages look something like the
|
||||
following.
|
||||
|
||||
For datetime.c::
|
||||
|
||||
- Added new 'K' format modifier to date() for printing out number of days
|
||||
until New Year's Eve.
|
||||
|
||||
For string.c::
|
||||
|
||||
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
|
||||
#- Man, that thing was leaking all over the place!
|
||||
|
||||
The # lines will be omitted from the ChangeLog automagically.
|
||||
|
||||
Use the [DOC] tag in your log message whenever you feel that your changes
|
||||
imply a documentation modification. The php-doc team will automatically
|
||||
get notified about your commit through the php-doc mailing list.
|
||||
|
||||
If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
bug report when developers are browsing CVS via LXR or Bonsai.
|
||||
|
||||
Example::
|
||||
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
|
||||
If you don't see your messages in ChangeLog right away, don't worry!
|
||||
These files are updated once a day, so your stuff will not show up until
|
||||
somewhat later.
|
||||
|
||||
When you change the NEWS file for a bug fix, then please keep the bugs
|
||||
sorted in decreasing order under the fixed version.
|
||||
|
||||
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
|
||||
to look at PHP SVN repository in various ways.
|
||||
|
||||
To receive daily updates to ChangeLog and NEWS, send an empty message to
|
||||
php-cvs-daily-subscribe@lists.php.net.
|
||||
|
||||
Happy hacking,
|
||||
|
||||
PHP Team
|
||||
-112
@@ -1,112 +0,0 @@
|
||||
Using PHP 5 with the Zeus Web Server
|
||||
-----------------------------------
|
||||
|
||||
Zeus fully supports running PHP in combination with our
|
||||
webserver. There are three different interfaces that can be used to
|
||||
enable PHP:
|
||||
|
||||
* CGI
|
||||
* ISAPI
|
||||
* FastCGI
|
||||
|
||||
Of the three, we recommend using FastCGI, which has been tested and
|
||||
benchmarked as providing the best performance and reliability.
|
||||
|
||||
Full details of how to install PHP are available from our
|
||||
website, at:
|
||||
|
||||
http://support.zeus.com/products/php.html
|
||||
|
||||
If you have any problems, please check the support site for more
|
||||
up-to-date information and advice.
|
||||
|
||||
|
||||
Quick guide to installing CGI/FastCGI with Zeus
|
||||
-----------------------------------------------
|
||||
|
||||
Step 1 - Compile PHP as FastCGI.
|
||||
|
||||
Compile as follows:
|
||||
./configure --enable-fastcgi
|
||||
make
|
||||
|
||||
Note that PHP has many options to the configure script -
|
||||
e.g. --with-mysql. You will probably want to select your usual options
|
||||
before compiling; the above is just a bare minimum, for illustration.
|
||||
|
||||
After compilation finishes, you will be left with an executable
|
||||
program called 'php'. Copy this into your document root, under a
|
||||
dedicated FastCGI directory (e.g. $DOCROOT/fcgi-bin/php)
|
||||
|
||||
|
||||
Step 2 - configure Zeus
|
||||
|
||||
Four stages:
|
||||
- enable FastCGI
|
||||
- configure FastCGI
|
||||
- setup alias for FastCGI
|
||||
- setup alias for PHP
|
||||
|
||||
1) Using the admin server, go to the 'module configuration' page for
|
||||
your virtual server, and ensure that 'fastcgi' is enabled (select the
|
||||
tickbox to the left).
|
||||
|
||||
2) While we can run FastCGI's locally, there are known problems with
|
||||
some OS's (specifically, the communication between web server and
|
||||
FastCGI happens over a unix domain socket, and some OS's have trouble
|
||||
sustaining high connection rates over these sockets). So instead, we
|
||||
are going to set up the PHP FastCGI to run 'remotely' over localhost
|
||||
(this uses TCP sockets, which do not suffer this problem). Go to the
|
||||
'fastcgi configuration' page, and under 'add remote fastcgi':
|
||||
Add Remote FastCGI
|
||||
Docroot path /fcgi-bin/php
|
||||
Remote machine localhost:8002
|
||||
The first entry is where you saved PHP, above.
|
||||
The second entry is localhost:<any unused port>
|
||||
We will start the FastCGI listening on this port shortly.
|
||||
Click 'update' to commit these changes.
|
||||
|
||||
3) Go to the path mapping module and add an alias for FastCGI:
|
||||
Add Alias
|
||||
Docroot path /fcgi-bin
|
||||
Filesystem directory /path/to/docroot/fcgi-bin
|
||||
Alias type fastcgi
|
||||
Click 'update' to commit these changes
|
||||
|
||||
4) Also on the path mapping module, add a handler for PHP:
|
||||
Add handler
|
||||
File extension php
|
||||
Handler /fcgi-bin/php
|
||||
Click 'update' to commit these changes
|
||||
|
||||
Finally restart your virtual server for these changes to take effect.
|
||||
|
||||
|
||||
Step 3 - start PHP as a FastCGI runner
|
||||
|
||||
When you start PHP, it will pre-fork a given number of child processes
|
||||
to handle incoming PHP requests. Each process will handle a given
|
||||
number of requests before exiting (and being replaced by a newly
|
||||
forked process). You can control these two parameters by setting the
|
||||
following environment variables BEFORE starting the FastCGI runner:
|
||||
|
||||
PHP_FCGI_CHILDREN - the number of child processes to pre-fork. This
|
||||
variable MUST be set, if not then the PHP will not run as a FastCGI.
|
||||
We recommend a value of 8 for a fairly busy site. If you have many,
|
||||
long-running PHP scripts, then you may need to increase this further.
|
||||
|
||||
PHP_FCGI_MAX_REQUESTS - the number of requests each PHP child process
|
||||
handles before exiting. If not set, defaults to 500.
|
||||
|
||||
To start the FastCGI runner, execute '$ZEUSHOME/web/bin/fcgirunner
|
||||
8002 $DOCROOT/fcgi-bin/php'. Substitute the appropriate values for
|
||||
$ZEUSHOME and $DOCROOT; also substitute for 8002 the port you chose,
|
||||
above.
|
||||
|
||||
To stop the runner (e.g. to experiment with the above environment
|
||||
variables) you will need to manually stop and running PHP
|
||||
processes. (Use 'ps' and 'kill'). As it is PHP which is forking lots
|
||||
of children and not the runner, Zeus unfortunately cannot keep track
|
||||
of what processes are running, sorry. A typical command line may look
|
||||
like 'ps -efl | grep $DOCROOT/fcgi-bin/php | grep -v grep | awk
|
||||
'{print $4}' | xargs kill'
|
||||
@@ -37,9 +37,9 @@ PHP 5.4 UPGRADE NOTES
|
||||
=============================
|
||||
|
||||
- PHP 5.4 now checks at compile time if /dev/urandom or /dev/arandom
|
||||
are present. If either is available, session.entropy_file now
|
||||
are present. If either is available, session.entropy_file now
|
||||
defaults to that file and session.entropy_length defaults to 32.
|
||||
This provides non-blocking entropy to session id generation. If you
|
||||
This provides non-blocking entropy to session id generation. If you
|
||||
do not want extra entropy for your session ids, add:
|
||||
|
||||
session.entropy_file=
|
||||
@@ -89,9 +89,9 @@ PHP 5.4 UPGRADE NOTES
|
||||
session.upload_progress.min_freq
|
||||
|
||||
- Added a zend.multibyte directive as a replacement of the PHP compile time
|
||||
configuration option --enable-zend-multibyte. Now the Zend Engine always
|
||||
configuration option --enable-zend-multibyte. Now the Zend Engine always
|
||||
contains code for multibyte support, which can be enabled or disabled at
|
||||
runtime. Note: It doesn't make a lot of sense to enable this option if
|
||||
runtime. Note: It doesn't make a lot of sense to enable this option if
|
||||
ext/mbstring is not enabled, because most functionality is implemented by
|
||||
mbstrings callbacks.
|
||||
|
||||
@@ -107,7 +107,7 @@ PHP 5.4 UPGRADE NOTES
|
||||
in a stream fashion (through php://input) without having it copied in memory
|
||||
multiple times.
|
||||
|
||||
- Added windows_show_crt_warning. This directive shows the CRT warnings when
|
||||
- Added windows_show_crt_warning. This directive shows the CRT warnings when
|
||||
enabled. These warnings were displayed by default until now. It is disabled
|
||||
by default.
|
||||
|
||||
@@ -162,13 +162,17 @@ PHP 5.4 UPGRADE NOTES
|
||||
|
||||
- Non-numeric string offsets, e.g. $a['foo'] where $a is a string, now
|
||||
return false on isset() and true on empty(), and produce warning if
|
||||
trying to use them. Offsets of types double, bool and null produce
|
||||
trying to use them. Offsets of types double, bool and null produce
|
||||
notice. Numeric strings ($a['2']) still work as before.
|
||||
|
||||
Note that offsets like '12.3' and '5 and a half' are considered
|
||||
non-numeric and produce warning, but are converted to 12 and 5
|
||||
respectively for backwards compatibility reasons.
|
||||
|
||||
- Long numeric strings that do not fit in integer or double (such as
|
||||
"92233720368547758070") are compared using string comparison if
|
||||
they could otherwise result in precision loss - since 5.4.4.
|
||||
|
||||
- Closures now support scopes and $this and can be rebound to
|
||||
objects using Closure::bind() and Closure::bindTo().
|
||||
|
||||
@@ -178,6 +182,9 @@ PHP 5.4 UPGRADE NOTES
|
||||
- Parse error messages are changed to contain more information about
|
||||
the error.
|
||||
|
||||
- __clone and __destruct since 5.4.4 follow the same scoping rules as
|
||||
the rest of the methods (see bug #61782 for details).
|
||||
|
||||
================================
|
||||
4. Changes to existing functions
|
||||
================================
|
||||
@@ -200,7 +207,7 @@ PHP 5.4 UPGRADE NOTES
|
||||
|
||||
- htmlentities() and htmlspecialchars() are stricter in the code units they
|
||||
accept for the asian encodings. For Big5-HKSCS, the octets 0x80 and 0xFF are
|
||||
rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are
|
||||
rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are
|
||||
rejected. For SJIS, the octets 0x80, 0xA0, 0xFD, 0xFE and 0xFF are rejected,
|
||||
except maybe after a valid starting byte. For EUC-JP, the octets 0xA0 and
|
||||
0xFF are rejected.
|
||||
@@ -226,7 +233,7 @@ PHP 5.4 UPGRADE NOTES
|
||||
checks on the validity of the entities. Numerical entities are checked for a
|
||||
valid range (0 to 0x10FFFF); if the flag ENT_DISALLOWED is given, the
|
||||
validity of such numerical entity in the target document type is also
|
||||
checked. Named entities are checked for necessary existence in the target
|
||||
checked. Named entities are checked for necessary existence in the target
|
||||
document type instead of only checking whether they were constituted by
|
||||
alphanumeric characters.
|
||||
|
||||
@@ -332,6 +339,14 @@ PHP 5.4 UPGRADE NOTES
|
||||
- ob_start() no longer starts multiple output buffers when passed
|
||||
array("callback1", "callback2", "callback3", ...).
|
||||
|
||||
- Since 5.4.4, "php://fd" stream syntax is available only in CLI build.
|
||||
|
||||
- Since 5.4.5, resourcebundle_create() accepts null for the first two arguments.
|
||||
|
||||
- Since 5.4.6, SimpleXMLElement::getDocNamespaces() has and extra parameter which
|
||||
allows for toggling if the list of namespaces starts from the document root
|
||||
or from the node you call the method on
|
||||
|
||||
==============================
|
||||
5. Changes to existing classes
|
||||
==============================
|
||||
@@ -364,6 +379,9 @@ PHP 5.4 UPGRADE NOTES
|
||||
- FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use
|
||||
the default stream context.
|
||||
|
||||
- Since 5.4.5, the constructor of ResourceBundle accepts NULL for the first two
|
||||
arguments.
|
||||
|
||||
===========================
|
||||
7. Deprecated Functionality
|
||||
===========================
|
||||
@@ -422,7 +440,7 @@ d. Removed hash algorithms
|
||||
a. Extensions no longer maintained
|
||||
|
||||
- ext/sqlite is no longer part of the base distribution and has been moved
|
||||
to PECL. Use sqlite3 or PDO_SQLITE instead.
|
||||
to PECL. Use sqlite3 or PDO_SQLITE instead.
|
||||
|
||||
b. Extensions with changed behavior
|
||||
|
||||
@@ -476,7 +494,7 @@ b. Extensions with changed behavior
|
||||
===========================
|
||||
|
||||
- A REQUEST_TIME_FLOAT value returns a floating point number indicating the
|
||||
time with microsecond precision. All SAPIs providing this value should be
|
||||
time with microsecond precision. All SAPIs providing this value should be
|
||||
returning float and not time_t.
|
||||
|
||||
- apache_child_terminate(), getallheaders(), apache_request_headers()
|
||||
@@ -499,6 +517,11 @@ b. Extensions with changed behavior
|
||||
- is_link now works properly for symbolic links on Windows Vista
|
||||
or later. Earlier systems do not support symbolic links.
|
||||
|
||||
- As of PHP 5.4.5 and above the COM extension isn't compiled statically in PHP
|
||||
anymore but shared. It'll still be delivered with the standard PHP release but
|
||||
must be activated manually with the "extension = php_com_dotnet.dll" directive
|
||||
in php.ini.
|
||||
|
||||
==================
|
||||
12. New in PHP 5.4
|
||||
==================
|
||||
@@ -601,6 +624,10 @@ c. New functions
|
||||
- mysqli_error_list()
|
||||
- mysqli_stmt_error_list()
|
||||
|
||||
- pgsql
|
||||
- pg_escape_identifier() (5.4.4)
|
||||
- pg_escape_literal() (5.4.4)
|
||||
|
||||
- Session:
|
||||
- session_register_shutdown()
|
||||
- session_status()
|
||||
|
||||
-22097
File diff suppressed because it is too large.
Load diff
@@ -62,17 +62,17 @@ print "\nDone\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
|
||||
Notice: Uninitialized string offset: 0 in %s on line %d
|
||||
|
||||
Notice: Uninitialized string offset: 0 in %s on line %d
|
||||
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
|
||||
Notice: Uninitialized string offset: %i in %s on line %d
|
||||
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
|
||||
Notice: Uninitialized string offset: %i in %s on line %d
|
||||
|
||||
@@ -88,16 +88,16 @@ Notice: Uninitialized string offset: 4 in %s on line %d
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line %d
|
||||
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
|
||||
Notice: Uninitialized string offset: 12 in %s on line %d
|
||||
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
|
||||
Notice: Uninitialized string offset: 12 in %s on line %d
|
||||
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
b
|
||||
Done
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #54547: wrong equality of string numbers near LONG_MAX with 64-bit longs
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_MAX !== 9223372036854775807)
|
||||
die("skip for 64-bit long systems only");
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump("9223372036854775807" == "9223372036854775808");
|
||||
var_dump("-9223372036854775808" == "-9223372036854775809");
|
||||
var_dump("0x7fffffffffffffff" == "9223372036854775808");
|
||||
|
||||
/* not exactly what the bug is about, but closely related problem: */
|
||||
var_dump("999223372036854775807"=="999223372036854775808");
|
||||
var_dump("899223372036854775807">"00999223372036854775807");
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -5,6 +5,12 @@ Bug #55509 (segfault on x86_64 using more than 2G memory)
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
die('skip Not for 32-bits OS');
|
||||
}
|
||||
|
||||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
||||
if ($zend_mm_enabled === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
}
|
||||
|
||||
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
|
||||
// check the available memory
|
||||
if (PHP_OS == 'Linux') {
|
||||
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #61761 ('Overriding' a private static method with a different signature causes crash)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
private static function test($a) { }
|
||||
}
|
||||
|
||||
class B extends A
|
||||
{
|
||||
private static function test($a, $b) { }
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of B::test() should be compatible with A::test($a) in %sbug61761.php on line %d
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
Bug #61782 (__clone/__destruct do not match other methods when checking access controls)
|
||||
--FILE--
|
||||
<?php
|
||||
abstract class BaseClass {
|
||||
abstract protected function __clone();
|
||||
}
|
||||
|
||||
class MommasBoy extends BaseClass {
|
||||
protected function __clone() {
|
||||
echo __METHOD__, "\n";
|
||||
}
|
||||
}
|
||||
|
||||
class LatchkeyKid extends BaseClass {
|
||||
public function __construct() {
|
||||
echo 'In ', __CLASS__, ":\n";
|
||||
$kid = new MommasBoy();
|
||||
$kid = clone $kid;
|
||||
}
|
||||
public function __clone() {}
|
||||
}
|
||||
|
||||
$obj = new LatchkeyKid();
|
||||
echo "DONE\n";
|
||||
--EXPECT--
|
||||
In LatchkeyKid:
|
||||
MommasBoy::__clone
|
||||
DONE
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
|
||||
--FILE--
|
||||
<?php
|
||||
function add_points($player, $points) {
|
||||
$player->energy += $points;
|
||||
print_r($player);
|
||||
}
|
||||
add_points(NULL, 2);
|
||||
--EXPECTF--
|
||||
Warning: Creating default object from empty value in %sbug62005.php on line %d
|
||||
stdClass Object
|
||||
(
|
||||
[energy] => 2
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #62097: fix for bug #54547 is wrong for 32-bit machines
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_MAX !== 2147483647)
|
||||
die('skip for system with 32-bit wide longs only');
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump("02147483647" == "2147483647",
|
||||
"02147483648" == "2147483648",
|
||||
"09007199254740991" == "9007199254740991",
|
||||
"09007199254740992" == "9007199254740992");
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
@@ -0,0 +1,33 @@
|
||||
--TEST--
|
||||
Bug #62653: unset($array[$float]) causes a crash
|
||||
--FILE--
|
||||
<?php
|
||||
$array = array("5"=>"bar");
|
||||
$foo = "10.0000"; // gettype($foo) = "string"
|
||||
$foo /= 2; //Makes $foo = 5 but still gettype($foo) = "double"
|
||||
unset($array[$foo]);
|
||||
print_r($array);
|
||||
|
||||
$array = array("5"=>"bar");
|
||||
$foo = "5";
|
||||
unset($array[(float)$foo]);
|
||||
print_r($array);
|
||||
|
||||
$array = array("5"=>"bar");
|
||||
$foo = "10.0000";
|
||||
$foo /= 2; //Makes $foo = 5 but still gettype($foo) = "double"
|
||||
$name = "foo";
|
||||
unset($array[$$name]);
|
||||
print_r($array);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Array
|
||||
(
|
||||
)
|
||||
Array
|
||||
(
|
||||
)
|
||||
Array
|
||||
(
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Bug #62680 (Function isset() throws fatal error on set array if non-existent key depth >= 3)
|
||||
--FILE--
|
||||
<?php
|
||||
$array = array("");
|
||||
var_dump(isset($array[0]["a"]["b"]));
|
||||
var_dump(isset($array[0]["a"]["b"]["c"]));
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
GC 029: GC and destructors
|
||||
--SKIPIF--
|
||||
<?php if (PHP_ZTS) { print "skip only for no-zts build"; }
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
--TEST--
|
||||
GC 029: GC and destructors
|
||||
--SKIPIF--
|
||||
<?php if (!PHP_ZTS) { print "skip only for zts build"; }
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
public $bar;
|
||||
public $x = array(1,2,3);
|
||||
function __destruct() {
|
||||
if ($this->bar !== null) {
|
||||
$this->x = null;
|
||||
unset($this->bar);
|
||||
}
|
||||
}
|
||||
}
|
||||
class Bar {
|
||||
public $foo;
|
||||
function __destruct() {
|
||||
if ($this->foo !== null) {
|
||||
unset($this->foo);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$foo = new Foo();
|
||||
$bar = new Bar();
|
||||
$foo->bar = $bar;
|
||||
$bar->foo = $foo;
|
||||
unset($foo);
|
||||
unset($bar);
|
||||
var_dump(gc_collect_cycles());
|
||||
?>
|
||||
--EXPECT--
|
||||
int(3)
|
||||
@@ -30,10 +30,10 @@ echo "Done\n";
|
||||
--EXPECTF--
|
||||
string(1) "i"
|
||||
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
string(1) "S"
|
||||
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
string(1) "S"
|
||||
|
||||
Warning: Illegal string offset 'run away' in %s on line %d
|
||||
@@ -46,10 +46,10 @@ string(1) "o"
|
||||
Notice: A non well formed numeric value encountered in %s on line %d
|
||||
string(1) "r"
|
||||
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
string(1) "i"
|
||||
|
||||
Notice: String offset cast occured in %s on line %d
|
||||
Notice: String offset cast occurred in %s on line %d
|
||||
string(1) "S"
|
||||
|
||||
Warning: Illegal offset type in %s on line %d
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
--TEST--
|
||||
Bug #61998 (Using traits with method aliases appears to result in crash during execution)
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
use T1 {
|
||||
func as newFunc;
|
||||
}
|
||||
|
||||
public function func() {
|
||||
echo "From Foo\n";
|
||||
}
|
||||
}
|
||||
|
||||
trait T1 {
|
||||
public function func() {
|
||||
echo "From T1\n";
|
||||
}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
public function func() {
|
||||
echo "From Bar\n";
|
||||
}
|
||||
public function func2() {
|
||||
echo "From Bar\n";
|
||||
}
|
||||
public function func3() {
|
||||
echo "From Bar\n";
|
||||
}
|
||||
use T1 {
|
||||
func as newFunc;
|
||||
func as func2;
|
||||
}
|
||||
use T2 {
|
||||
func2 as newFunc2;
|
||||
func2 as newFunc3;
|
||||
func2 as func3;
|
||||
}
|
||||
}
|
||||
|
||||
trait T2 {
|
||||
public function func2() {
|
||||
echo "From T2\n";
|
||||
}
|
||||
}
|
||||
|
||||
$f = new Foo();
|
||||
|
||||
$f->newFunc(); //from T1
|
||||
$f->func(); //from Foo
|
||||
|
||||
$b = new Bar();
|
||||
$b->newFunc(); //from T1
|
||||
$b->func(); //from Bar
|
||||
$b->func2(); //from Bar
|
||||
$b->newFunc2(); //from T2
|
||||
$b->newFunc3(); //from T2
|
||||
$b->func3(); //from Bar
|
||||
--EXPECTF--
|
||||
From T1
|
||||
From Foo
|
||||
From T1
|
||||
From Bar
|
||||
From Bar
|
||||
From T2
|
||||
From T2
|
||||
From Bar
|
||||
+20
-1
@@ -781,6 +781,8 @@ void zend_register_standard_ini_entries(TSRMLS_D) /* {{{ */
|
||||
void zend_post_startup(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
#ifdef ZTS
|
||||
zend_encoding **script_encoding_list;
|
||||
|
||||
zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id);
|
||||
zend_executor_globals *executor_globals = ts_resource(executor_globals_id);
|
||||
|
||||
@@ -795,7 +797,12 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
|
||||
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
|
||||
free(compiler_globals->function_table);
|
||||
free(compiler_globals->class_table);
|
||||
compiler_globals_ctor(compiler_globals, tsrm_ls);
|
||||
if ((script_encoding_list = (zend_encoding **)compiler_globals->script_encoding_list)) {
|
||||
compiler_globals_ctor(compiler_globals, tsrm_ls);
|
||||
compiler_globals->script_encoding_list = (const zend_encoding **)script_encoding_list;
|
||||
} else {
|
||||
compiler_globals_ctor(compiler_globals, tsrm_ls);
|
||||
}
|
||||
free(EG(zend_constants));
|
||||
executor_globals_ctor(executor_globals, tsrm_ls);
|
||||
global_persistent_list = &EG(persistent_list);
|
||||
@@ -1254,6 +1261,7 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
|
||||
zend_file_handle *file_handle;
|
||||
zend_op_array *orig_op_array = EG(active_op_array);
|
||||
zval **orig_retval_ptr_ptr = EG(return_value_ptr_ptr);
|
||||
long orig_interactive = CG(interactive);
|
||||
|
||||
va_start(files, file_count);
|
||||
for (i = 0; i < file_count; i++) {
|
||||
@@ -1261,6 +1269,15 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
|
||||
if (!file_handle) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (orig_interactive) {
|
||||
if (file_handle->filename[0] != '-' || file_handle->filename[1]) {
|
||||
CG(interactive) = 0;
|
||||
} else {
|
||||
CG(interactive) = 1;
|
||||
}
|
||||
}
|
||||
|
||||
EG(active_op_array) = zend_compile_file(file_handle, type TSRMLS_CC);
|
||||
if (file_handle->opened_path) {
|
||||
int dummy = 1;
|
||||
@@ -1302,12 +1319,14 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
|
||||
va_end(files);
|
||||
EG(active_op_array) = orig_op_array;
|
||||
EG(return_value_ptr_ptr) = orig_retval_ptr_ptr;
|
||||
CG(interactive) = orig_interactive;
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
va_end(files);
|
||||
EG(active_op_array) = orig_op_array;
|
||||
EG(return_value_ptr_ptr) = orig_retval_ptr_ptr;
|
||||
CG(interactive) = orig_interactive;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1093,7 +1093,12 @@ ZEND_API void object_properties_init(zend_object *object, zend_class_entry *clas
|
||||
for (i = 0; i < class_type->default_properties_count; i++) {
|
||||
object->properties_table[i] = class_type->default_properties_table[i];
|
||||
if (class_type->default_properties_table[i]) {
|
||||
#if ZTS
|
||||
ALLOC_ZVAL( object->properties_table[i]);
|
||||
MAKE_COPY_ZVAL(&class_type->default_properties_table[i], object->properties_table[i]);
|
||||
#else
|
||||
Z_ADDREF_P(object->properties_table[i]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
object->properties = NULL;
|
||||
|
||||
+15
-14
@@ -1685,7 +1685,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
|
||||
zval key;
|
||||
|
||||
if (CG(current_namespace)) {
|
||||
/* Prefix function name with current namespcae name */
|
||||
/* Prefix function name with current namespace name */
|
||||
znode tmp;
|
||||
|
||||
tmp.u.constant = *CG(current_namespace);
|
||||
@@ -3260,11 +3260,11 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
|
||||
|
||||
if (child->common.prototype && (child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) {
|
||||
if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
|
||||
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype TSRMLS_CC));
|
||||
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype? child->common.prototype : parent TSRMLS_CC));
|
||||
}
|
||||
} else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
|
||||
if (!zend_do_perform_implementation_check(child, parent TSRMLS_CC)) {
|
||||
char *method_prototype = zend_get_function_declaration(child->common.prototype TSRMLS_CC);
|
||||
char *method_prototype = zend_get_function_declaration(child->common.prototype? child->common.prototype : parent TSRMLS_CC);
|
||||
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, method_prototype);
|
||||
efree(method_prototype);
|
||||
}
|
||||
@@ -3619,6 +3619,7 @@ ZEND_API void zend_do_implement_trait(zend_class_entry *ce, zend_class_entry *tr
|
||||
}
|
||||
}
|
||||
ce->traits[ce->num_traits++] = trait;
|
||||
trait->refcount++;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -3711,7 +3712,7 @@ static int zend_traits_merge_functions(zend_function *fn TSRMLS_DC, int num_args
|
||||
} else {
|
||||
/* Add it to result function table */
|
||||
if (zend_hash_quick_add(resulting_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, fn, sizeof(zend_function), NULL)==FAILURE) {
|
||||
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occured during updating resulting trait method table", fn->common.function_name);
|
||||
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occurred during updating resulting trait method table", fn->common.function_name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3828,7 +3829,7 @@ static int zend_traits_merge_functions_to_class(zend_function *fn TSRMLS_DC, int
|
||||
function_add_ref(&fn_copy);
|
||||
|
||||
if (zend_hash_quick_update(&ce->function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, &fn_copy, sizeof(zend_function), (void**)&fn_copy_p)==FAILURE) {
|
||||
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occured during updating class method table", hash_key->arKey);
|
||||
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occurred during updating class method table", hash_key->arKey);
|
||||
}
|
||||
|
||||
zend_add_magic_methods(ce, hash_key->arKey, hash_key->nKeyLength, fn_copy_p TSRMLS_CC);
|
||||
@@ -3870,8 +3871,8 @@ static int zend_traits_copy_functions(zend_function *fn TSRMLS_DC, int num_args,
|
||||
fn_copy = *fn;
|
||||
function_add_ref(&fn_copy);
|
||||
/* this function_name is never destroyed, because its refcount
|
||||
greater than 1, classes are always destoyed in reverse order
|
||||
and trait is declared early than this class */
|
||||
greater than 1 and classes are always destoyed before the
|
||||
traits they use */
|
||||
fn_copy.common.function_name = aliases[i]->alias;
|
||||
|
||||
/* if it is 0, no modifieres has been changed */
|
||||
@@ -4076,14 +4077,14 @@ static void zend_do_traits_method_binding(zend_class_entry *ce TSRMLS_DC) /* {{{
|
||||
size_t i;
|
||||
|
||||
/* prepare copies of trait function tables for combination */
|
||||
function_tables = malloc(sizeof(HashTable*) * ce->num_traits);
|
||||
resulting_table = (HashTable *) malloc(sizeof(HashTable));
|
||||
function_tables = emalloc(sizeof(HashTable*) * ce->num_traits);
|
||||
resulting_table = (HashTable *)emalloc(sizeof(HashTable));
|
||||
|
||||
/* TODO: revisit this start size, may be its not optimal */
|
||||
zend_hash_init_ex(resulting_table, 10, NULL, NULL, 1, 0);
|
||||
zend_hash_init_ex(resulting_table, 10, NULL, NULL, 0, 0);
|
||||
|
||||
for (i = 0; i < ce->num_traits; i++) {
|
||||
function_tables[i] = (HashTable *) malloc(sizeof(HashTable));
|
||||
function_tables[i] = (HashTable *)emalloc(sizeof(HashTable));
|
||||
zend_hash_init_ex(function_tables[i], ce->traits[i]->function_table.nNumOfElements, NULL, NULL, 1, 0);
|
||||
|
||||
if (ce->trait_precedences) {
|
||||
@@ -4116,14 +4117,14 @@ static void zend_do_traits_method_binding(zend_class_entry *ce TSRMLS_DC) /* {{{
|
||||
for (i = 0; i < ce->num_traits; i++) {
|
||||
/* zend_hash_destroy(function_tables[i]); */
|
||||
zend_hash_graceful_destroy(function_tables[i]);
|
||||
free(function_tables[i]);
|
||||
efree(function_tables[i]);
|
||||
}
|
||||
free(function_tables);
|
||||
efree(function_tables);
|
||||
|
||||
/* free temporary resulting table */
|
||||
/* zend_hash_destroy(resulting_table); */
|
||||
zend_hash_graceful_destroy(resulting_table);
|
||||
free(resulting_table);
|
||||
efree(resulting_table);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -518,10 +518,6 @@ void zend_prepare_trait_precedence(znode *result, znode *method_reference, znode
|
||||
void zend_prepare_reference(znode *result, znode *class_name, znode *method_name TSRMLS_DC);
|
||||
void zend_prepare_trait_alias(znode *result, znode *method_reference, znode *modifiers, znode *alias TSRMLS_DC);
|
||||
|
||||
void init_trait_alias_list(znode* result, const znode* trait_alias TSRMLS_DC);
|
||||
void add_trait_alias(znode* result, const znode* trait_alias TSRMLS_DC);
|
||||
void init_trait_alias(znode* result, const znode* method_name, const znode* alias, const znode* modifiers TSRMLS_DC);
|
||||
|
||||
ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC);
|
||||
void zend_do_early_binding(TSRMLS_D);
|
||||
ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC);
|
||||
|
||||
+3
-4
@@ -554,11 +554,10 @@ static inline void make_real_object(zval **object_ptr TSRMLS_DC)
|
||||
|| (Z_TYPE_PP(object_ptr) == IS_BOOL && Z_LVAL_PP(object_ptr) == 0)
|
||||
|| (Z_TYPE_PP(object_ptr) == IS_STRING && Z_STRLEN_PP(object_ptr) == 0)
|
||||
) {
|
||||
zend_error(E_WARNING, "Creating default object from empty value");
|
||||
|
||||
SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
|
||||
zval_dtor(*object_ptr);
|
||||
object_init(*object_ptr);
|
||||
zend_error(E_WARNING, "Creating default object from empty value");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1162,7 +1161,7 @@ convert_to_array:
|
||||
case IS_DOUBLE:
|
||||
case IS_NULL:
|
||||
case IS_BOOL:
|
||||
zend_error(E_NOTICE, "String offset cast occured");
|
||||
zend_error(E_NOTICE, "String offset cast occurred");
|
||||
break;
|
||||
default:
|
||||
zend_error(E_WARNING, "Illegal offset type");
|
||||
@@ -1285,7 +1284,7 @@ static void zend_fetch_dimension_address_read(temp_variable *result, zval **cont
|
||||
case IS_NULL:
|
||||
case IS_BOOL:
|
||||
if (type != BP_VAR_IS) {
|
||||
zend_error(E_NOTICE, "String offset cast occured");
|
||||
zend_error(E_NOTICE, "String offset cast occurred");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
+1
-1
@@ -330,7 +330,7 @@ END_EXTERN_C()
|
||||
if (idx-1 > LONG_MAX) { /* overflow */ \
|
||||
break; \
|
||||
} \
|
||||
idx = (ulong)(-(long)idx); \
|
||||
idx = 0 - idx; \
|
||||
} else if (idx > LONG_MAX) { /* overflow */ \
|
||||
break; \
|
||||
} \
|
||||
|
||||
+1612
-1574
File diff suppressed because it is too large.
Load diff
+27
-6
@@ -347,7 +347,7 @@ DOLLAR_CURLY "${"
|
||||
|
||||
SECTION_RAW_CHARS [^\]\n\r]
|
||||
SINGLE_QUOTED_CHARS [^']
|
||||
RAW_VALUE_CHARS [^\n\r;\000]
|
||||
RAW_VALUE_CHARS [^"\n\r;\000]
|
||||
|
||||
LITERAL_DOLLAR ("$"([^{\000]|("\\"{ANY_CHAR})))
|
||||
VALUE_CHARS ([^$= \t\n\r;&|~()!"'\000]|{LITERAL_DOLLAR})
|
||||
@@ -445,12 +445,33 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
|
||||
return '=';
|
||||
}
|
||||
|
||||
<ST_RAW>{RAW_VALUE_CHARS}+ { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
|
||||
/* Eat leading and trailing double quotes */
|
||||
if (yytext[0] == '"' && yytext[yyleng - 1] == '"') {
|
||||
SCNG(yy_text)++;
|
||||
yyleng = yyleng - 2;
|
||||
<ST_RAW>["] {
|
||||
while (YYCURSOR < YYLIMIT) {
|
||||
switch (*YYCURSOR++) {
|
||||
case '\n':
|
||||
SCNG(lineno)++;
|
||||
break;
|
||||
case '\r':
|
||||
if (*YYCURSOR != '\n') {
|
||||
SCNG(lineno)++;
|
||||
}
|
||||
break;
|
||||
case '"':
|
||||
yyleng = YYCURSOR - SCNG(yy_text) - 2;
|
||||
SCNG(yy_text)++;
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
case '\\':
|
||||
if (YYCURSOR < YYLIMIT) {
|
||||
YYCURSOR++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
|
||||
<ST_RAW>{RAW_VALUE_CHARS}+ { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.13.5 on Fri Mar 2 11:49:21 2012 */
|
||||
/* Generated by re2c 0.13.5 on Thu Jun 7 17:48:25 2012 */
|
||||
#line 3 "Zend/zend_ini_scanner_defs.h"
|
||||
|
||||
enum YYCONDTYPE {
|
||||
|
||||
@@ -127,7 +127,7 @@ ZEND_API zval *zend_user_it_new_iterator(zend_class_entry *ce, zval *object TSRM
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ zend_user_it_dtor */
|
||||
/* {{{ zend_user_it_invalidate_current */
|
||||
ZEND_API void zend_user_it_invalidate_current(zend_object_iterator *_iter TSRMLS_DC)
|
||||
{
|
||||
zend_user_iterator *iter = (zend_user_iterator*)_iter;
|
||||
|
||||
@@ -1191,7 +1191,7 @@ static YYSIZE_T zend_yytnamerr(char *yyres, const char *yystr)
|
||||
|
||||
if (LANG_SCNG(yy_text)[0] == 0 &&
|
||||
LANG_SCNG(yy_leng) == 1 &&
|
||||
memcmp(yystr, ZEND_STRL("\"end of file\"")) == 0) {
|
||||
memcmp(yystr, "\"end of file\"", sizeof("\"end of file\"") - 1) == 0) {
|
||||
yystpcpy(yyres, "end of file");
|
||||
return sizeof("end of file")-1;
|
||||
}
|
||||
|
||||
+348
-341
File diff suppressed because it is too large.
Load diff
@@ -33,6 +33,9 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include "zend.h"
|
||||
#ifdef PHP_WIN32
|
||||
# include <Winuser.h>
|
||||
#endif
|
||||
#include "zend_alloc.h"
|
||||
#include <zend_language_parser.h>
|
||||
#include "zend_compile.h"
|
||||
@@ -905,7 +908,11 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
|
||||
zendlval->value.str.len--;
|
||||
break;
|
||||
case 'e':
|
||||
#ifdef PHP_WIN32
|
||||
*t++ = VK_ESCAPE;
|
||||
#else
|
||||
*t++ = '\e';
|
||||
#endif
|
||||
zendlval->value.str.len--;
|
||||
break;
|
||||
case '"':
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.13.5 on Thu Mar 1 21:27:30 2012 */
|
||||
/* Generated by re2c 0.13.5 on Mon Apr 30 15:55:05 2012 */
|
||||
#line 3 "Zend/zend_language_scanner_defs.h"
|
||||
|
||||
enum YYCONDTYPE {
|
||||
|
||||
@@ -168,7 +168,7 @@ ZEND_API const zend_encoding *zend_multibyte_get_script_encoding(TSRMLS_D)
|
||||
ZEND_API int zend_multibyte_set_script_encoding(const zend_encoding **encoding_list, size_t encoding_list_size TSRMLS_DC)
|
||||
{
|
||||
if (CG(script_encoding_list)) {
|
||||
efree(CG(script_encoding_list));
|
||||
free(CG(script_encoding_list));
|
||||
}
|
||||
CG(script_encoding_list) = encoding_list;
|
||||
CG(script_encoding_list_size) = encoding_list_size;
|
||||
|
||||
+11
-17
@@ -66,11 +66,11 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */
|
||||
zend_hash_get_current_data_ex(&ce->properties_info, (void**)&prop_info, &pos) == SUCCESS;
|
||||
zend_hash_move_forward_ex(&ce->properties_info, &pos)) {
|
||||
if (/*prop_info->ce == ce &&*/
|
||||
(prop_info->flags & ZEND_ACC_STATIC) == 0 &&
|
||||
(prop_info->flags & ZEND_ACC_STATIC) == 0 &&
|
||||
prop_info->offset >= 0 &&
|
||||
zobj->properties_table[prop_info->offset]) {
|
||||
zend_hash_quick_add(zobj->properties, prop_info->name, prop_info->name_length+1, prop_info->h, (void**)&zobj->properties_table[prop_info->offset], sizeof(zval*), (void**)&zobj->properties_table[prop_info->offset]);
|
||||
}
|
||||
}
|
||||
}
|
||||
while (ce->parent && ce->parent->default_properties_count) {
|
||||
ce = ce->parent;
|
||||
@@ -78,12 +78,12 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */
|
||||
zend_hash_get_current_data_ex(&ce->properties_info, (void**)&prop_info, &pos) == SUCCESS;
|
||||
zend_hash_move_forward_ex(&ce->properties_info, &pos)) {
|
||||
if (prop_info->ce == ce &&
|
||||
(prop_info->flags & ZEND_ACC_STATIC) == 0 &&
|
||||
(prop_info->flags & ZEND_ACC_PRIVATE) != 0 &&
|
||||
(prop_info->flags & ZEND_ACC_STATIC) == 0 &&
|
||||
(prop_info->flags & ZEND_ACC_PRIVATE) != 0 &&
|
||||
prop_info->offset >= 0 &&
|
||||
zobj->properties_table[prop_info->offset]) {
|
||||
zend_hash_quick_add(zobj->properties, prop_info->name, prop_info->name_length+1, prop_info->h, (void**)&zobj->properties_table[prop_info->offset], sizeof(zval*), (void**)&zobj->properties_table[prop_info->offset]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -783,7 +783,7 @@ static void zend_std_unset_property(zval *object, zval *member, const zend_liter
|
||||
property_info = zend_get_property_info_quick(zobj->ce, member, (zobj->ce->__unset != NULL), key TSRMLS_CC);
|
||||
|
||||
if (EXPECTED(property_info != NULL) &&
|
||||
EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
|
||||
EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
|
||||
!zobj->properties &&
|
||||
property_info->offset >= 0 &&
|
||||
EXPECTED(zobj->properties_table[property_info->offset] != NULL)) {
|
||||
@@ -815,8 +815,8 @@ static void zend_std_unset_property(zval *object, zval *member, const zend_liter
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (EXPECTED(property_info != NULL) &&
|
||||
EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
|
||||
} else if (EXPECTED(property_info != NULL) &&
|
||||
EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
|
||||
property_info->offset >= 0) {
|
||||
zobj->properties_table[property_info->offset] = NULL;
|
||||
}
|
||||
@@ -960,12 +960,6 @@ ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline zend_class_entry * zend_get_function_root_class(zend_function *fbc) /* {{{ */
|
||||
{
|
||||
return fbc->common.prototype ? fbc->common.prototype->common.scope : fbc->common.scope;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline union _zend_function *zend_get_user_call_function(zend_class_entry *ce, const char *method_name, int method_len) /* {{{ */
|
||||
{
|
||||
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
|
||||
@@ -1143,7 +1137,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, const c
|
||||
zend_str_tolower_copy(lc_function_name, function_name_strval, function_name_strlen);
|
||||
hash_value = zend_hash_func(lc_function_name, function_name_strlen+1);
|
||||
}
|
||||
|
||||
|
||||
if (function_name_strlen == ce->name_length && ce->constructor) {
|
||||
lc_class_name = zend_str_tolower_dup(ce->name, ce->name_length);
|
||||
/* Only change the method to the constructor if the constructor isn't called __construct
|
||||
@@ -1178,7 +1172,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, const c
|
||||
if (UNEXPECTED(!(fbc->common.fn_flags & ZEND_ACC_STATIC))) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot call non static method %s::%s() without object", ZEND_FN_SCOPE_NAME(fbc), fbc->common.function_name);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (fbc->op_array.fn_flags & ZEND_ACC_PUBLIC) {
|
||||
/* No further checks necessary, most common case */
|
||||
} else if (fbc->op_array.fn_flags & ZEND_ACC_PRIVATE) {
|
||||
@@ -1220,7 +1214,7 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *p
|
||||
{
|
||||
zend_property_info *property_info;
|
||||
ulong hash_value;
|
||||
|
||||
|
||||
if (UNEXPECTED(!key) ||
|
||||
(property_info = CACHED_POLYMORPHIC_PTR(key->cache_slot, ce)) == NULL) {
|
||||
if (EXPECTED(key != NULL)) {
|
||||
|
||||
@@ -146,6 +146,9 @@ struct _zend_object_handlers {
|
||||
|
||||
extern ZEND_API zend_object_handlers std_object_handlers;
|
||||
|
||||
#define zend_get_function_root_class(fbc) \
|
||||
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope)
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, const char *function_name_strval, int function_name_strlen, const struct _zend_literal *key TSRMLS_DC);
|
||||
ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *property_name, int property_name_len, zend_bool silent, const struct _zend_literal *key TSRMLS_DC);
|
||||
|
||||
+13
-13
@@ -28,7 +28,7 @@
|
||||
|
||||
ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
|
||||
{
|
||||
object->ce = ce;
|
||||
object->ce = ce;
|
||||
object->properties = NULL;
|
||||
object->properties_table = NULL;
|
||||
object->guards = NULL;
|
||||
@@ -38,7 +38,7 @@ ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
|
||||
{
|
||||
if (object->guards) {
|
||||
zend_hash_destroy(object->guards);
|
||||
FREE_HASHTABLE(object->guards);
|
||||
FREE_HASHTABLE(object->guards);
|
||||
}
|
||||
if (object->properties) {
|
||||
zend_hash_destroy(object->properties);
|
||||
@@ -74,23 +74,23 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl
|
||||
if (object->ce != EG(scope)) {
|
||||
zend_class_entry *ce = object->ce;
|
||||
|
||||
zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
|
||||
"Call to private %s::__destruct() from context '%s'%s",
|
||||
ce->name,
|
||||
EG(scope) ? EG(scope)->name : "",
|
||||
zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
|
||||
"Call to private %s::__destruct() from context '%s'%s",
|
||||
ce->name,
|
||||
EG(scope) ? EG(scope)->name : "",
|
||||
EG(in_execution) ? "" : " during shutdown ignored");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
/* Ensure that if we're calling a protected function, we're allowed to do so.
|
||||
*/
|
||||
if (!zend_check_protected(destructor->common.scope, EG(scope))) {
|
||||
if (!zend_check_protected(zend_get_function_root_class(destructor), EG(scope))) {
|
||||
zend_class_entry *ce = object->ce;
|
||||
|
||||
zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
|
||||
"Call to protected %s::__destruct() from context '%s'%s",
|
||||
ce->name,
|
||||
EG(scope) ? EG(scope)->name : "",
|
||||
zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
|
||||
"Call to protected %s::__destruct() from context '%s'%s",
|
||||
ce->name,
|
||||
EG(scope) ? EG(scope)->name : "",
|
||||
EG(in_execution) ? "" : " during shutdown ignored");
|
||||
return;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC)
|
||||
}
|
||||
|
||||
ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC)
|
||||
{
|
||||
{
|
||||
zend_object_value retval;
|
||||
|
||||
*object = emalloc(sizeof(zend_object));
|
||||
@@ -222,7 +222,7 @@ ZEND_API zend_object_value zend_objects_clone_obj(zval *zobject TSRMLS_DC)
|
||||
zend_object *new_object;
|
||||
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
|
||||
|
||||
/* assume that create isn't overwritten, so when clone depends on the
|
||||
/* assume that create isn't overwritten, so when clone depends on the
|
||||
* overwritten one then it must itself be overwritten */
|
||||
old_object = zend_objects_get_address(zobject TSRMLS_CC);
|
||||
new_obj_val = zend_objects_new(&new_object, old_object->ce TSRMLS_CC);
|
||||
|
||||
@@ -215,6 +215,12 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)
|
||||
void _destroy_zend_class_traits_info(zend_class_entry *ce)
|
||||
{
|
||||
if (ce->num_traits > 0 && ce->traits) {
|
||||
size_t i;
|
||||
for (i = 0; i < ce->num_traits; i++) {
|
||||
if (ce->traits[i]) {
|
||||
destroy_zend_class(&ce->traits[i]);
|
||||
}
|
||||
}
|
||||
efree(ce->traits);
|
||||
}
|
||||
|
||||
|
||||
+27
-5
@@ -1605,7 +1605,8 @@ ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
|
||||
&& (!memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1))));
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
Z_LVAL_P(result) = zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function, 1 TSRMLS_CC)==0;
|
||||
Z_LVAL_P(result) = (Z_ARRVAL_P(op1) == Z_ARRVAL_P(op2) ||
|
||||
zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function, 1 TSRMLS_CC)==0);
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
if (Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2)) {
|
||||
@@ -2035,15 +2036,36 @@ ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3) /* {{{ *
|
||||
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */
|
||||
{
|
||||
int ret1, ret2;
|
||||
int oflow1, oflow2;
|
||||
long lval1, lval2;
|
||||
double dval1, dval2;
|
||||
|
||||
if ((ret1=is_numeric_string(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0)) &&
|
||||
(ret2=is_numeric_string(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0))) {
|
||||
if ((ret1=is_numeric_string_ex(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0, &oflow1)) &&
|
||||
(ret2=is_numeric_string_ex(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0, &oflow2))) {
|
||||
#if ULONG_MAX == 0xFFFFFFFF
|
||||
if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0. &&
|
||||
((oflow1 == 1 && dval1 > 9007199254740991. /*0x1FFFFFFFFFFFFF*/)
|
||||
|| (oflow1 == -1 && dval1 < -9007199254740991.))) {
|
||||
#else
|
||||
if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0.) {
|
||||
#endif
|
||||
/* both values are integers overflown to the same side, and the
|
||||
* double comparison may have resulted in crucial accuracy lost */
|
||||
goto string_cmp;
|
||||
}
|
||||
if ((ret1==IS_DOUBLE) || (ret2==IS_DOUBLE)) {
|
||||
if (ret1!=IS_DOUBLE) {
|
||||
if (oflow2) {
|
||||
/* 2nd operand is integer > LONG_MAX (oflow2==1) or < LONG_MIN (-1) */
|
||||
ZVAL_LONG(result, -1 * oflow2);
|
||||
return;
|
||||
}
|
||||
dval1 = (double) lval1;
|
||||
} else if (ret2!=IS_DOUBLE) {
|
||||
if (oflow1) {
|
||||
ZVAL_LONG(result, oflow1);
|
||||
return;
|
||||
}
|
||||
dval2 = (double) lval2;
|
||||
} else if (dval1 == dval2 && !zend_finite(dval1)) {
|
||||
/* Both values overflowed and have the same sign,
|
||||
@@ -2076,13 +2098,13 @@ static int hash_zval_compare_function(const zval **z1, const zval **z2 TSRMLS_DC
|
||||
|
||||
ZEND_API int zend_compare_symbol_tables_i(HashTable *ht1, HashTable *ht2 TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
return zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0 TSRMLS_CC);
|
||||
return ht1 == ht2 ? 0 : zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0 TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2 TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
ZVAL_LONG(result, zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0 TSRMLS_CC));
|
||||
ZVAL_LONG(result, ht1 == ht2 ? 0 : zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0 TSRMLS_CC));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
+22
-2
@@ -100,9 +100,12 @@ static zend_always_inline long zend_dval_to_lval(double d)
|
||||
* if the number was out of long range or contained a decimal point/exponent.
|
||||
* The number's value is returned into the respective pointer, *lval or *dval,
|
||||
* if that pointer is not NULL.
|
||||
*
|
||||
* This variant also gives information if a string that represents an integer
|
||||
* could not be represented as such due to overflow. It writes 1 to oflow_info
|
||||
* if the integer is larger than LONG_MAX and -1 if it's smaller than LONG_MIN.
|
||||
*/
|
||||
|
||||
static inline zend_uchar is_numeric_string(const char *str, int length, long *lval, double *dval, int allow_errors)
|
||||
static inline zend_uchar is_numeric_string_ex(const char *str, int length, long *lval, double *dval, int allow_errors, int *oflow_info)
|
||||
{
|
||||
const char *ptr;
|
||||
int base = 10, digits = 0, dp_or_e = 0;
|
||||
@@ -113,6 +116,10 @@ static inline zend_uchar is_numeric_string(const char *str, int length, long *lv
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (oflow_info != NULL) {
|
||||
*oflow_info = 0;
|
||||
}
|
||||
|
||||
/* Skip any whitespace
|
||||
* This is much faster than the isspace() function */
|
||||
while (*str == ' ' || *str == '\t' || *str == '\n' || *str == '\r' || *str == '\v' || *str == '\f') {
|
||||
@@ -165,6 +172,9 @@ check_digits:
|
||||
|
||||
if (base == 10) {
|
||||
if (digits >= MAX_LENGTH_OF_LONG) {
|
||||
if (oflow_info != NULL) {
|
||||
*oflow_info = *str == '-' ? -1 : 1;
|
||||
}
|
||||
dp_or_e = -1;
|
||||
goto process_double;
|
||||
}
|
||||
@@ -172,6 +182,9 @@ check_digits:
|
||||
if (dval) {
|
||||
local_dval = zend_hex_strtod(str, &ptr);
|
||||
}
|
||||
if (oflow_info != NULL) {
|
||||
*oflow_info = 1;
|
||||
}
|
||||
type = IS_DOUBLE;
|
||||
}
|
||||
} else if (*ptr == '.' && ZEND_IS_DIGIT(ptr[1])) {
|
||||
@@ -207,6 +220,9 @@ process_double:
|
||||
if (dval) {
|
||||
*dval = zend_strtod(str, NULL);
|
||||
}
|
||||
if (oflow_info != NULL) {
|
||||
*oflow_info = *str == '-' ? -1 : 1;
|
||||
}
|
||||
|
||||
return IS_DOUBLE;
|
||||
}
|
||||
@@ -226,6 +242,10 @@ process_double:
|
||||
}
|
||||
}
|
||||
|
||||
static inline zend_uchar is_numeric_string(const char *str, int length, long *lval, double *dval, int allow_errors) {
|
||||
return is_numeric_string_ex(str, length, lval, dval, allow_errors, NULL);
|
||||
}
|
||||
|
||||
static inline char *
|
||||
zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
|
||||
{
|
||||
|
||||
@@ -23,12 +23,14 @@
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API extern const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC);
|
||||
ZEND_API extern void (*zend_interned_strings_snapshot)(TSRMLS_D);
|
||||
ZEND_API extern void (*zend_interned_strings_restore)(TSRMLS_D);
|
||||
|
||||
void zend_interned_strings_init(TSRMLS_D);
|
||||
void zend_interned_strings_dtor(TSRMLS_D);
|
||||
END_EXTERN_C()
|
||||
|
||||
#ifndef ZTS
|
||||
|
||||
|
||||
+5
-4
@@ -2442,7 +2442,7 @@ ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST|TMP|VAR|CV)
|
||||
if (UNEXPECTED(EX(fbc) == NULL)) {
|
||||
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), Z_STRVAL_PP(method));
|
||||
}
|
||||
|
||||
|
||||
if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
|
||||
EX(object) = NULL;
|
||||
} else {
|
||||
@@ -2974,7 +2974,7 @@ ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
|
||||
catch_ce = CACHED_PTR(opline->op1.literal->cache_slot);
|
||||
} else {
|
||||
catch_ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC);
|
||||
|
||||
|
||||
CACHE_PTR(opline->op1.literal->cache_slot, catch_ce);
|
||||
}
|
||||
ce = Z_OBJCE_P(EG(exception));
|
||||
@@ -3426,7 +3426,7 @@ ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMP|VAR|UNUSED|CV, ANY)
|
||||
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
|
||||
/* Ensure that if we're calling a protected function, we're allowed to do so.
|
||||
*/
|
||||
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
|
||||
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
|
||||
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
|
||||
}
|
||||
}
|
||||
@@ -3947,7 +3947,8 @@ ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
ZEND_VM_C_GOTO(num_index_dim);
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
|
||||
+29
-17
@@ -2436,7 +2436,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS
|
||||
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
|
||||
/* Ensure that if we're calling a protected function, we're allowed to do so.
|
||||
*/
|
||||
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
|
||||
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
|
||||
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
|
||||
}
|
||||
}
|
||||
@@ -6850,7 +6850,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
|
||||
/* Ensure that if we're calling a protected function, we're allowed to do so.
|
||||
*/
|
||||
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
|
||||
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
|
||||
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
|
||||
}
|
||||
}
|
||||
@@ -11278,7 +11278,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
|
||||
/* Ensure that if we're calling a protected function, we're allowed to do so.
|
||||
*/
|
||||
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
|
||||
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
|
||||
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
|
||||
}
|
||||
}
|
||||
@@ -13917,7 +13917,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -15919,7 +15920,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLE
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -18131,7 +18133,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -21166,7 +21169,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -21475,7 +21479,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARG
|
||||
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
|
||||
/* Ensure that if we're calling a protected function, we're allowed to do so.
|
||||
*/
|
||||
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
|
||||
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
|
||||
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
|
||||
}
|
||||
}
|
||||
@@ -22504,7 +22508,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_H
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -23662,7 +23667,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HAN
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -24820,7 +24826,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HAN
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -26244,7 +26251,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAND
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -27222,7 +27230,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
|
||||
/* Ensure that if we're calling a protected function, we're allowed to do so.
|
||||
*/
|
||||
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
|
||||
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
|
||||
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
|
||||
}
|
||||
}
|
||||
@@ -29498,7 +29506,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDL
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -31371,7 +31380,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -33453,7 +33463,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
@@ -36219,7 +36230,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_
|
||||
switch (Z_TYPE_P(offset)) {
|
||||
case IS_DOUBLE:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(offset));
|
||||
goto num_index_dim;
|
||||
zend_hash_index_del(ht, hval);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
|
||||
@@ -2449,7 +2449,12 @@ AC_DEFUN([PHP_SETUP_ICONV], [
|
||||
dnl
|
||||
dnl Check libc first if no path is provided in --with-iconv
|
||||
dnl
|
||||
|
||||
if test "$PHP_ICONV" = "yes"; then
|
||||
dnl Reset LIBS temporarily as it may have already been included
|
||||
dnl -liconv in.
|
||||
LIBS_save="$LIBS"
|
||||
LIBS=
|
||||
AC_CHECK_FUNC(iconv, [
|
||||
found_iconv=yes
|
||||
],[
|
||||
@@ -2459,6 +2464,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
|
||||
found_iconv=yes
|
||||
])
|
||||
])
|
||||
LIBS="$LIBS_save"
|
||||
fi
|
||||
|
||||
dnl
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@ dnl Basic autoconf + automake initialization, generation of config.nice.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(README.SVN-RULES)
|
||||
AC_INIT(README.GIT-RULES)
|
||||
ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
|
||||
|
||||
PHP_CONFIG_NICE(config.nice)
|
||||
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=4
|
||||
PHP_RELEASE_VERSION=1
|
||||
PHP_EXTRA_VERSION="RC1-dev"
|
||||
PHP_RELEASE_VERSION=6
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
|
||||
@@ -2,9 +2,34 @@
|
||||
unixtojd()
|
||||
--SKIPIF--
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--ENV--
|
||||
TZ=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
// this line has no impact on test output on Windows
|
||||
putenv('TZ=UTC');
|
||||
// getenv('TZ') returns 'UTC' here
|
||||
// putenv (basic_functions.c) does call tzset() when the env var being put is 'TZ'
|
||||
// -adding a call direct to GetEnvironmentVariableA just before tzset() is called to check the value of 'TZ' returns 'UTC'
|
||||
// putting a call to date_default_timezone_set() here doesn't help
|
||||
//
|
||||
// on Windows, the only thing that gets this test to pass is to put TZ=UTC in --ENV-- section
|
||||
// -since putenv() is written to call tzset() when env var is TZ, I assume that putenv("TZ=UTC") is intended to work
|
||||
// and should work on all platforms(including Windows).
|
||||
// easter_date.phpt passes
|
||||
// -doesn't use --ENV-- section
|
||||
// -uses --INI-- section with date.timezone=UTC
|
||||
// -uses putenv('TZ=UTC')
|
||||
// date.timezone=UTC
|
||||
// -if ommitted from easter_date.phpt, outputs DATE_TZ_ERRMSG warning
|
||||
// -easter_date() calls mktime() and localtime()
|
||||
// -whereas unixtojd(1000000000) calls localtime(1000000000)
|
||||
// -if ommitted from unixtojd.phpt, does NOT output DATE_TZ_ERRMSG
|
||||
//
|
||||
// unixtojd() calls php_localtime_r() which for Pacific timezone systems, returns a time -8 hours
|
||||
// -this incorrect localtime is passed to the julian date conversion (GregorianToSDN) function which works (probably correctly)
|
||||
// but returns -1 day from expected because its input is -1 from expected
|
||||
|
||||
echo unixtojd(40000). "\n";
|
||||
echo unixtojd(1000000000). "\n";
|
||||
echo unixtojd(1152459009). "\n";
|
||||
|
||||
@@ -42,7 +42,7 @@ void php_com_throw_exception(HRESULT code, char *message TSRMLS_DC)
|
||||
}
|
||||
}
|
||||
|
||||
PHPAPI void php_com_wrap_dispatch(zval *z, IDispatch *disp,
|
||||
PHP_COM_DOTNET_API void php_com_wrap_dispatch(zval *z, IDispatch *disp,
|
||||
int codepage TSRMLS_DC)
|
||||
{
|
||||
php_com_dotnet_object *obj;
|
||||
@@ -65,7 +65,7 @@ PHPAPI void php_com_wrap_dispatch(zval *z, IDispatch *disp,
|
||||
z->value.obj.handlers = &php_com_object_handlers;
|
||||
}
|
||||
|
||||
PHPAPI void php_com_wrap_variant(zval *z, VARIANT *v,
|
||||
PHP_COM_DOTNET_API void php_com_wrap_variant(zval *z, VARIANT *v,
|
||||
int codepage TSRMLS_DC)
|
||||
{
|
||||
php_com_dotnet_object *obj;
|
||||
@@ -92,7 +92,7 @@ PHPAPI void php_com_wrap_variant(zval *z, VARIANT *v,
|
||||
|
||||
/* this is a convenience function for fetching a particular
|
||||
* element from a (possibly multi-dimensional) safe array */
|
||||
PHPAPI int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1 TSRMLS_DC)
|
||||
PHP_COM_DOTNET_API int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1 TSRMLS_DC)
|
||||
{
|
||||
UINT dims;
|
||||
LONG lbound, ubound;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "php_com_dotnet_internal.h"
|
||||
|
||||
|
||||
PHPAPI OLECHAR *php_com_string_to_olestring(char *string, uint string_len, int codepage TSRMLS_DC)
|
||||
PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, uint string_len, int codepage TSRMLS_DC)
|
||||
{
|
||||
OLECHAR *olestring = NULL;
|
||||
DWORD flags = codepage == CP_UTF8 ? 0 : MB_PRECOMPOSED | MB_ERR_INVALID_CHARS;
|
||||
@@ -65,7 +65,7 @@ PHPAPI OLECHAR *php_com_string_to_olestring(char *string, uint string_len, int c
|
||||
return olestring;
|
||||
}
|
||||
|
||||
PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, int codepage TSRMLS_DC)
|
||||
PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, int codepage TSRMLS_DC)
|
||||
{
|
||||
char *string;
|
||||
uint length = 0;
|
||||
|
||||
@@ -268,7 +268,7 @@ static void istream_destructor(php_istream *stm TSRMLS_DC)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
PHPAPI IStream *php_com_wrapper_export_stream(php_stream *stream TSRMLS_DC)
|
||||
PHP_COM_DOTNET_API IStream *php_com_wrapper_export_stream(php_stream *stream TSRMLS_DC)
|
||||
{
|
||||
php_istream *stm = (php_istream*)CoTaskMemAlloc(sizeof(*stm));
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
* b) a CLSID, major, minor e.g. "{00000200-0000-0010-8000-00AA006D2EA4},2,0"
|
||||
* c) a Type Library name e.g. "Microsoft OLE DB ActiveX Data Objects 1.0 Library"
|
||||
*/
|
||||
PHPAPI ITypeLib *php_com_load_typelib(char *search_string, int codepage TSRMLS_DC)
|
||||
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib(char *search_string, int codepage TSRMLS_DC)
|
||||
{
|
||||
ITypeLib *TL = NULL;
|
||||
char *strtok_buf, *major, *minor;
|
||||
@@ -153,7 +153,7 @@ PHPAPI ITypeLib *php_com_load_typelib(char *search_string, int codepage TSRMLS_D
|
||||
}
|
||||
|
||||
/* Given a type-library, merge it into the current engine state */
|
||||
PHPAPI int php_com_import_typelib(ITypeLib *TL, int mode, int codepage TSRMLS_DC)
|
||||
PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepage TSRMLS_DC)
|
||||
{
|
||||
int i, j, interfaces;
|
||||
TYPEKIND pTKind;
|
||||
@@ -228,7 +228,7 @@ void php_com_typelibrary_dtor(void *pDest)
|
||||
ITypeLib_Release(*Lib);
|
||||
}
|
||||
|
||||
PHPAPI ITypeLib *php_com_load_typelib_via_cache(char *search_string,
|
||||
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string,
|
||||
int codepage, int *cached TSRMLS_DC)
|
||||
{
|
||||
ITypeLib **TLp;
|
||||
|
||||
@@ -98,7 +98,7 @@ bogus:
|
||||
}
|
||||
}
|
||||
|
||||
PHPAPI void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC)
|
||||
PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC)
|
||||
{
|
||||
OLECHAR *olestring;
|
||||
php_com_dotnet_object *obj;
|
||||
@@ -166,7 +166,7 @@ PHPAPI void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_D
|
||||
}
|
||||
}
|
||||
|
||||
PHPAPI int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC)
|
||||
PHP_COM_DOTNET_API int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC)
|
||||
{
|
||||
OLECHAR *olestring = NULL;
|
||||
int ret = SUCCESS;
|
||||
@@ -258,7 +258,7 @@ PHPAPI int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC
|
||||
}
|
||||
|
||||
|
||||
PHPAPI int php_com_copy_variant(VARIANT *dstvar, VARIANT *srcvar TSRMLS_DC)
|
||||
PHP_COM_DOTNET_API int php_com_copy_variant(VARIANT *dstvar, VARIANT *srcvar TSRMLS_DC)
|
||||
{
|
||||
int ret = SUCCESS;
|
||||
|
||||
|
||||
@@ -578,7 +578,7 @@ static void disp_destructor(php_dispatchex *disp TSRMLS_DC)
|
||||
CoTaskMemFree(disp);
|
||||
}
|
||||
|
||||
PHPAPI IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid,
|
||||
PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid,
|
||||
HashTable *id_to_name TSRMLS_DC)
|
||||
{
|
||||
php_dispatchex *disp = disp_constructor(val TSRMLS_CC);
|
||||
@@ -617,7 +617,7 @@ PHPAPI IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid,
|
||||
return (IDispatch*)disp;
|
||||
}
|
||||
|
||||
PHPAPI IDispatch *php_com_wrapper_export(zval *val TSRMLS_DC)
|
||||
PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export(zval *val TSRMLS_DC)
|
||||
{
|
||||
php_dispatchex *disp = NULL;
|
||||
|
||||
|
||||
@@ -28,6 +28,14 @@ extern zend_module_entry com_dotnet_module_entry;
|
||||
#include "TSRM.h"
|
||||
#endif
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
# define PHP_COM_DOTNET_API __declspec(dllexport)
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define PHP_COM_DOTNET_API __attribute__ ((visibility("default")))
|
||||
#else
|
||||
# define PHP_COM_DOTNET_API
|
||||
#endif
|
||||
|
||||
PHP_MINIT_FUNCTION(com_dotnet);
|
||||
PHP_MSHUTDOWN_FUNCTION(com_dotnet);
|
||||
PHP_RINIT_FUNCTION(com_dotnet);
|
||||
|
||||
@@ -84,9 +84,9 @@ zend_object_iterator *php_com_saproxy_iter_get(zend_class_entry *ce, zval *objec
|
||||
int php_com_saproxy_create(zval *com_object, zval *proxy_out, zval *index TSRMLS_DC);
|
||||
|
||||
/* com_olechar.c */
|
||||
PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring,
|
||||
PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring,
|
||||
uint *string_len, int codepage TSRMLS_DC);
|
||||
PHPAPI OLECHAR *php_com_string_to_olestring(char *string,
|
||||
PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string,
|
||||
uint string_len, int codepage TSRMLS_DC);
|
||||
|
||||
|
||||
@@ -112,8 +112,8 @@ int php_com_do_invoke_byref(php_com_dotnet_object *obj, char *name, int namelen,
|
||||
|
||||
/* com_wrapper.c */
|
||||
int php_com_wrapper_minit(INIT_FUNC_ARGS);
|
||||
PHPAPI IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid, HashTable *id_to_name TSRMLS_DC);
|
||||
PHPAPI IDispatch *php_com_wrapper_export(zval *val TSRMLS_DC);
|
||||
PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid, HashTable *id_to_name TSRMLS_DC);
|
||||
PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export(zval *val TSRMLS_DC);
|
||||
|
||||
/* com_persist.c */
|
||||
int php_com_persist_minit(INIT_FUNC_ARGS);
|
||||
@@ -147,10 +147,10 @@ PHP_FUNCTION(variant_get_type);
|
||||
PHP_FUNCTION(variant_set_type);
|
||||
PHP_FUNCTION(variant_cast);
|
||||
|
||||
PHPAPI void php_com_variant_from_zval_with_type(VARIANT *v, zval *z, VARTYPE type, int codepage TSRMLS_DC);
|
||||
PHPAPI void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC);
|
||||
PHPAPI int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC);
|
||||
PHPAPI int php_com_copy_variant(VARIANT *dst, VARIANT *src TSRMLS_DC);
|
||||
PHP_COM_DOTNET_API void php_com_variant_from_zval_with_type(VARIANT *v, zval *z, VARTYPE type, int codepage TSRMLS_DC);
|
||||
PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC);
|
||||
PHP_COM_DOTNET_API int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC);
|
||||
PHP_COM_DOTNET_API int php_com_copy_variant(VARIANT *dst, VARIANT *src TSRMLS_DC);
|
||||
|
||||
/* com_dotnet.c */
|
||||
PHP_FUNCTION(com_dotnet_create_instance);
|
||||
@@ -159,17 +159,17 @@ void php_com_dotnet_mshutdown(TSRMLS_D);
|
||||
|
||||
/* com_misc.c */
|
||||
void php_com_throw_exception(HRESULT code, char *message TSRMLS_DC);
|
||||
PHPAPI void php_com_wrap_dispatch(zval *z, IDispatch *disp,
|
||||
PHP_COM_DOTNET_API void php_com_wrap_dispatch(zval *z, IDispatch *disp,
|
||||
int codepage TSRMLS_DC);
|
||||
PHPAPI void php_com_wrap_variant(zval *z, VARIANT *v,
|
||||
PHP_COM_DOTNET_API void php_com_wrap_variant(zval *z, VARIANT *v,
|
||||
int codepage TSRMLS_DC);
|
||||
PHPAPI int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1 TSRMLS_DC);
|
||||
PHP_COM_DOTNET_API int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1 TSRMLS_DC);
|
||||
|
||||
/* com_typeinfo.c */
|
||||
PHPAPI ITypeLib *php_com_load_typelib_via_cache(char *search_string,
|
||||
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string,
|
||||
int codepage, int *cached TSRMLS_DC);
|
||||
PHPAPI ITypeLib *php_com_load_typelib(char *search_string, int codepage TSRMLS_DC);
|
||||
PHPAPI int php_com_import_typelib(ITypeLib *TL, int mode,
|
||||
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib(char *search_string, int codepage TSRMLS_DC);
|
||||
PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode,
|
||||
int codepage TSRMLS_DC);
|
||||
void php_com_typelibrary_dtor(void *pDest);
|
||||
ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj, char *dispname, int sink TSRMLS_DC);
|
||||
|
||||
@@ -3,9 +3,23 @@ Bug #49192 (PHP crashes when GC invoked on COM object)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; ?>
|
||||
--XFAIL--
|
||||
1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
// this test fails to load ADO
|
||||
//
|
||||
// a change in windows longhorn x64(affecting vista, 7, 8, 2008, 2008r2) broke ADO.
|
||||
//
|
||||
// there is a fix available, but user has to install it.
|
||||
// given that ADO was deprecated a long time ago in favor of newer APIs,
|
||||
// I don't think its worth the trouble of making the user install the fix to
|
||||
// get an accurate test run. its better to just not run the test or expect it to fail.
|
||||
//
|
||||
// see: http://support.microsoft.com/kb/2517589
|
||||
// see: http://www.infoq.com/news/2011/10/ADO-Win7
|
||||
|
||||
$dbConnection = new Com('ADODB.Connection');
|
||||
var_dump(gc_collect_cycles());
|
||||
?>
|
||||
|
||||
@@ -2177,7 +2177,7 @@ string_copy:
|
||||
|
||||
convert_to_string_ex(zvalue);
|
||||
|
||||
if (php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
|
||||
if (Z_STRLEN_PP(zvalue) && php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl")) print "skip";
|
||||
if(substr(PHP_OS, 0, 3) != 'WIN' )
|
||||
die("skip Not Valid for Linux");
|
||||
?>
|
||||
--INI--
|
||||
open_basedir="c:/tmp"
|
||||
--FILE--
|
||||
<?php
|
||||
$ch = curl_init();
|
||||
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
|
||||
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/tmp/foo"));
|
||||
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/xxx/bar"));
|
||||
curl_close($ch);
|
||||
?>
|
||||
--EXPECTF--
|
||||
%a
|
||||
|
||||
Warning: curl_setopt(): open_basedir restriction in effect. File(c:/tmp/foo) is not within the allowed path(s): (c:/tmp) in %sbug61948-win32.php on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: curl_setopt(): open_basedir restriction in effect. File(c:/xxx/bar) is not within the allowed path(s): (c:/tmp) in %sbug61948-win32.php on line %d
|
||||
bool(false)
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl")) print "skip";
|
||||
if(substr(PHP_OS, 0, 3) == 'WIN' )
|
||||
die("skip Not Valid for Windows");
|
||||
?>
|
||||
--INI--
|
||||
open_basedir="/tmp"
|
||||
--FILE--
|
||||
<?php
|
||||
$ch = curl_init();
|
||||
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
|
||||
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/foo"));
|
||||
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/xxx/bar"));
|
||||
curl_close($ch);
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowed path(s): (/tmp) in %sbug61948.php on line %d
|
||||
bool(false)
|
||||
+635
-616
File diff suppressed because it is too large.
Load diff
@@ -3430,10 +3430,19 @@ zval *date_interval_read_property(zval *object, zval *member, int type, const ze
|
||||
zval_copy_ctor(&tmp_member);
|
||||
convert_to_string(&tmp_member);
|
||||
member = &tmp_member;
|
||||
key = NULL;
|
||||
}
|
||||
|
||||
obj = (php_interval_obj *)zend_objects_get_address(object TSRMLS_CC);
|
||||
|
||||
if (!obj->initialized) {
|
||||
retval = (zend_get_std_object_handlers())->read_property(object, member, type, key TSRMLS_CC);
|
||||
if (member == &tmp_member) {
|
||||
zval_dtor(member);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
#define GET_VALUE_FROM_STRUCT(n,m) \
|
||||
if (strcmp(Z_STRVAL_P(member), m) == 0) { \
|
||||
value = obj->diff->n; \
|
||||
@@ -3482,9 +3491,19 @@ void date_interval_write_property(zval *object, zval *member, zval *value, const
|
||||
zval_copy_ctor(&tmp_member);
|
||||
convert_to_string(&tmp_member);
|
||||
member = &tmp_member;
|
||||
key = NULL;
|
||||
}
|
||||
|
||||
obj = (php_interval_obj *)zend_objects_get_address(object TSRMLS_CC);
|
||||
|
||||
if (!obj->initialized) {
|
||||
(zend_get_std_object_handlers())->write_property(object, member, value, key TSRMLS_CC);
|
||||
if (member == &tmp_member) {
|
||||
zval_dtor(member);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#define SET_VALUE_FROM_STRUCT(n,m) \
|
||||
if (strcmp(Z_STRVAL_P(member), m) == 0) { \
|
||||
if (value->type != IS_LONG) { \
|
||||
|
||||
@@ -13,6 +13,7 @@ date.timezone=UTC
|
||||
$d = new DateTime('@100000000000');
|
||||
var_dump($d->format('Y-m-d H:i:s U'));
|
||||
var_dump($d->getTimestamp());
|
||||
var_dump($d->format('U'));
|
||||
|
||||
$d->setTimestamp(100000000000);
|
||||
var_dump($d->format('Y-m-d H:i:s U'));
|
||||
@@ -23,7 +24,8 @@ var_dump($i->format('%s'));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(32) "5138-11-16 09:46:40 100000000000"
|
||||
int(100000000000)
|
||||
string(32) "5138-11-16 09:46:40 100000000000"
|
||||
int(100000000000)
|
||||
bool(false)
|
||||
string(12) "100000000000"
|
||||
string(30) "2008-07-11 04:56:32 1215752192"
|
||||
int(1215752192)
|
||||
string(10) "1215752192"
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #62500 (Segfault in DateInterval class when extended)
|
||||
--INI--
|
||||
date.timezone=GMT
|
||||
--FILE--
|
||||
<?php
|
||||
class Crasher extends DateInterval {
|
||||
public $foo;
|
||||
public function __construct($time_spec) {
|
||||
var_dump($this->foo);
|
||||
$this->foo = 3;
|
||||
var_dump($this->foo);
|
||||
var_dump($this->{2});
|
||||
parent::__construct($time_spec);
|
||||
}
|
||||
}
|
||||
try {
|
||||
$c = new Crasher('blah');
|
||||
} catch (Exception $e) {
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
--EXPECTF--
|
||||
NULL
|
||||
int(3)
|
||||
|
||||
Notice: Undefined property: Crasher::$2 in %sbug62500.php on line %d
|
||||
NULL
|
||||
string(%s) "DateInterval::__construct(): Unknown or bad format (blah)"
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
date_default_timezone_get() function [1]
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(substr(PHP_OS, 0, 3) != 'WIN') die("skip skip on non windows");
|
||||
?>
|
||||
--INI--
|
||||
date.timezone=
|
||||
--FILE--
|
||||
<?php
|
||||
putenv('TZ=');
|
||||
echo date_default_timezone_get(), "\n";
|
||||
echo date('e'), "\n";
|
||||
/* The behaviour on windows is to select an arbitrary timezone name from the current system settings.
|
||||
This gives no chance to hardcode the timezone name, for instance for UTC+1 it could choose
|
||||
from the multiple names like Europe/Berlin or Europe/Paris . For this reason the test is
|
||||
parametrized so there is no hardcoded timezone data.*/
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone '%s' for now, but please set date.timezone to select your timezone. in %s on line %d
|
||||
%s
|
||||
|
||||
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone '%s' for now, but please set date.timezone to select your timezone. in %s on line %d
|
||||
%s
|
||||
@@ -1,5 +1,9 @@
|
||||
--TEST--
|
||||
date_default_timezone_get() function [1]
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows");
|
||||
?>
|
||||
--INI--
|
||||
date.timezone=
|
||||
--FILE--
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
--TEST--
|
||||
date_default_timezone_get() function [2]
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows");
|
||||
?>
|
||||
--INI--
|
||||
date.timezone=
|
||||
--FILE--
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--TEST--
|
||||
Read empty $value.
|
||||
--CREDIT--
|
||||
--CREDITS--
|
||||
Jason Bouffard <jbouffard1@yahoo.com>
|
||||
# TestFest Atlanta 2009-05-14
|
||||
--SKIPIF--
|
||||
@@ -13,4 +13,4 @@ print $attr->value."\n";
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
===DONE===
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--TEST--
|
||||
Write non-string $value property
|
||||
--CREDIT--
|
||||
--CREDITS--
|
||||
Eric Berg <ehberg@gmail.com>
|
||||
# TestFest Atlanta 2009-05-14
|
||||
--SKIPIF--
|
||||
@@ -12,4 +12,4 @@ $attr->value = 1;
|
||||
print $attr->value;
|
||||
?>
|
||||
--EXPECTF--
|
||||
1
|
||||
1
|
||||
@@ -1,6 +1,6 @@
|
||||
--TEST--
|
||||
Invalid State Error when getting data on DOMCharacterData out of content.
|
||||
--CREDIT--
|
||||
--CREDITS--
|
||||
Eric Berg <ehberg@gmail.com>
|
||||
# TestFest Atlanta 2009-05-14
|
||||
--SKIPIF--
|
||||
@@ -11,4 +11,4 @@ $character_data = new DOMCharacterData();
|
||||
print $character_data->data;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: main(): Invalid State Error in %s on line %d
|
||||
Warning: main(): Invalid State Error in %s on line %d
|
||||
@@ -1,6 +1,6 @@
|
||||
--TEST--
|
||||
Invalid State Error when getting length on DOMCharacterData out of content.
|
||||
--CREDIT--
|
||||
--CREDITS--
|
||||
Jason Bouffard <jbouffard1@yahoo.com>
|
||||
# TestFest Atlanta 2009-05-14
|
||||
--SKIPIF--
|
||||
@@ -14,4 +14,4 @@ print $character_data->length;
|
||||
--EXPECTF--
|
||||
Warning: main(): Invalid State Error in %s
|
||||
===DONE===
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ require_once('skipif.inc');
|
||||
|
||||
require_once('dom_test.inc');
|
||||
|
||||
chdir(__DIR__ . "/../examples");
|
||||
chdir(__DIR__);
|
||||
$XMLStringGood = file_get_contents('note.xml');
|
||||
|
||||
$dom = new DOMDocument;
|
||||
|
||||
@@ -63,12 +63,24 @@ echo "\n";
|
||||
$ents = $dtd->entities;
|
||||
$length = $ents->length;
|
||||
echo "Length: ".$length."\n";
|
||||
|
||||
$xkeys = array();
|
||||
foreach ($ents AS $key=>$node) {
|
||||
echo "Key: $key Name: ".$node->nodeName."\n";
|
||||
$xkeys[] = "Key: $key Name: ".$node->nodeName."\n";
|
||||
}
|
||||
sort($xkeys); // fix inconsistent output ordering (bug #61810)
|
||||
foreach ($xkeys as $key => $node) {
|
||||
echo $node;
|
||||
}
|
||||
echo "\n";
|
||||
|
||||
$xkeys = array();
|
||||
for($x=0; $x < $length; $x++) {
|
||||
echo "Index $x: ".$ents->item($x)->nodeName."\n";
|
||||
$xkeys[] = "Index: ".$ents->item($x)->nodeName."\n";
|
||||
}
|
||||
sort($xkeys); // fix inconsistent output ordering (bug #61810)
|
||||
foreach ($xkeys as $key => $node) {
|
||||
echo $node;
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
@@ -87,13 +99,13 @@ Index 0: GIF (image/gif) (-)
|
||||
NULL
|
||||
|
||||
Length: 3
|
||||
Key: test Name: test
|
||||
Key: rdf Name: rdf
|
||||
Key: myimage Name: myimage
|
||||
Key: rdf Name: rdf
|
||||
Key: test Name: test
|
||||
|
||||
Index 0: test
|
||||
Index 1: rdf
|
||||
Index 2: myimage
|
||||
Index: myimage
|
||||
Index: rdf
|
||||
Index: test
|
||||
|
||||
NULL
|
||||
NULL
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!ELEMENT note (to,from,heading,body)>
|
||||
<!ELEMENT to (#PCDATA)>
|
||||
<!ELEMENT from (#PCDATA)>
|
||||
<!ELEMENT heading (#PCDATA)>
|
||||
<!ELEMENT body (#PCDATA)>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE note SYSTEM "note.dtd">
|
||||
<note>
|
||||
<to>PHP User Group</to>
|
||||
<from>Shane</from>
|
||||
<heading>Reminder</heading>
|
||||
<body>Don't forget the meeting tonight!</body>
|
||||
</note>
|
||||
+8
-1
@@ -216,7 +216,7 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
|
||||
if (Z_TYPE(handler) == IS_STRING) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %s()", Z_STRVAL_P(&handler));
|
||||
}
|
||||
/* retval is == NULL, when an exception occured, don't report anything, because PHP itself will handle that */
|
||||
/* retval is == NULL, when an exception occurred, don't report anything, because PHP itself will handle that */
|
||||
} else if (retval == NULL) {
|
||||
} else {
|
||||
if (retval->type == IS_OBJECT && instanceof_function( Z_OBJCE_P(retval), dom_node_class_entry TSRMLS_CC)) {
|
||||
@@ -321,6 +321,7 @@ int dom_xpath_document_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
xmlDoc *docp = NULL;
|
||||
xmlXPathContextPtr ctx;
|
||||
int ret;
|
||||
zval *tmp;
|
||||
|
||||
ctx = (xmlXPathContextPtr) obj->ptr;
|
||||
|
||||
@@ -329,10 +330,16 @@ int dom_xpath_document_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
}
|
||||
|
||||
ALLOC_ZVAL(*retval);
|
||||
tmp = *retval;
|
||||
|
||||
if (NULL == (*retval = php_dom_create_object((xmlNodePtr) docp, &ret, *retval, obj TSRMLS_CC))) {
|
||||
FREE_ZVAL(tmp);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create required DOM object");
|
||||
return FAILURE;
|
||||
}
|
||||
if (tmp != *retval) {
|
||||
FREE_ZVAL(tmp);
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+5
-1
@@ -3254,7 +3254,7 @@ static void exif_process_APP12(image_info_type *ImageInfo, char *buffer, size_t
|
||||
if ((l1 = php_strnlen(buffer+2, length-2)) > 0) {
|
||||
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Company", TAG_NONE, TAG_FMT_STRING, l1, buffer+2 TSRMLS_CC);
|
||||
if (length > 2+l1+1) {
|
||||
l2 = php_strnlen(buffer+2+l1+1, length-2-l1+1);
|
||||
l2 = php_strnlen(buffer+2+l1+1, length-2-l1-1);
|
||||
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Info", TAG_NONE, TAG_FMT_STRING, l2, buffer+2+l1+1 TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
@@ -3404,6 +3404,10 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo TSRMLS_DC)
|
||||
case M_SOF13:
|
||||
case M_SOF14:
|
||||
case M_SOF15:
|
||||
if ((itemlen - 2) < 6) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
exif_process_SOFn(Data, marker, &sof_info);
|
||||
ImageInfo->Width = sof_info.width;
|
||||
ImageInfo->Height = sof_info.height;
|
||||
|
||||
+14
-3
@@ -270,7 +270,7 @@ ZEND_GET_MODULE(fileinfo)
|
||||
PHP_MINFO_FUNCTION(fileinfo)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_header(2, "fileinfo support", "enabled");
|
||||
php_info_print_table_row(2, "fileinfo support", "enabled");
|
||||
php_info_print_table_row(2, "version", PHP_FILEINFO_VERSION);
|
||||
php_info_print_table_end();
|
||||
}
|
||||
@@ -510,11 +510,22 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime
|
||||
wrap = php_stream_locate_url_wrapper(buffer, &tmp2, 0 TSRMLS_CC);
|
||||
|
||||
if (wrap) {
|
||||
php_stream *stream;
|
||||
php_stream_context *context = php_stream_context_from_zval(zcontext, 0);
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
if (php_stream_stat_path_ex(buffer, 0, &ssb, context) == SUCCESS) {
|
||||
if (ssb.sb.st_mode & S_IFDIR) {
|
||||
ret_val = mime_directory;
|
||||
goto common;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if PHP_API_VERSION < 20100412
|
||||
php_stream *stream = php_stream_open_wrapper_ex(buffer, "rb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
|
||||
stream = php_stream_open_wrapper_ex(buffer, "rb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
|
||||
#else
|
||||
php_stream *stream = php_stream_open_wrapper_ex(buffer, "rb", REPORT_ERRORS, NULL, context);
|
||||
stream = php_stream_open_wrapper_ex(buffer, "rb", REPORT_ERRORS, NULL, context);
|
||||
#endif
|
||||
|
||||
if (!stream) {
|
||||
|
||||
+496
-139
@@ -1,6 +1,6 @@
|
||||
diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
--- libmagic.orig/apprentice.c 2012-03-28 12:00:34.017709605 +0200
|
||||
+++ libmagic/apprentice.c 2012-03-28 01:53:04.283305402 +0200
|
||||
diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
|
||||
--- libmagic.origin/apprentice.c 2012-07-15 18:17:24.802087661 +0800
|
||||
+++ libmagic/apprentice.c 2012-07-15 18:22:49.650087425 +0800
|
||||
@@ -29,6 +29,8 @@
|
||||
* apprentice - make one pass through /etc/magic, learning its secrets.
|
||||
*/
|
||||
@@ -271,7 +271,9 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
+ size_t lineno = 0;
|
||||
+
|
||||
+ php_stream *stream;
|
||||
+
|
||||
|
||||
- FILE *f = fopen(ms->file = fn, "r");
|
||||
- if (f == NULL) {
|
||||
+ TSRMLS_FETCH();
|
||||
+
|
||||
+#if PHP_API_VERSION < 20100412
|
||||
@@ -279,9 +281,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
+#else
|
||||
+ stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS, NULL);
|
||||
+#endif
|
||||
|
||||
- FILE *f = fopen(ms->file = fn, "r");
|
||||
- if (f == NULL) {
|
||||
+
|
||||
+ if (stream == NULL) {
|
||||
if (errno != ENOENT)
|
||||
file_error(ms, errno, "cannot read magic file `%s'",
|
||||
@@ -312,8 +312,12 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -757,20 +756,16 @@
|
||||
int errs = 0;
|
||||
@@ -754,23 +753,19 @@
|
||||
apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
|
||||
const char *fn, int action)
|
||||
{
|
||||
- int errs = 0;
|
||||
+ int errs = 0, mflen = 0;
|
||||
struct magic_entry *marray;
|
||||
uint32_t marraycount, i, mentrycount = 0, starttest;
|
||||
- size_t slen, files = 0, maxfiles = 0;
|
||||
@@ -352,7 +356,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
while ((d = readdir(dir)) != NULL) {
|
||||
- if (asprintf(&mfn, "%s/%s", fn, d->d_name) < 0) {
|
||||
+ if (snprintf(mfn, sizeof(mfn), "%s/%s", fn, d->d_name) < 0) {
|
||||
+ if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d->d_name)) < 0) {
|
||||
file_oomem(ms,
|
||||
strlen(fn) + strlen(d->d_name) + 2);
|
||||
errs++;
|
||||
@@ -364,7 +368,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
continue;
|
||||
}
|
||||
if (files >= maxfiles) {
|
||||
@@ -803,7 +799,6 @@
|
||||
@@ -803,20 +799,19 @@
|
||||
if ((filearr = CAST(char **,
|
||||
realloc(filearr, mlen))) == NULL) {
|
||||
file_oomem(ms, mlen);
|
||||
@@ -372,6 +376,21 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
closedir(dir);
|
||||
errs++;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
- filearr[files++] = mfn;
|
||||
+ filearr[files++] = estrndup(mfn, mflen);
|
||||
}
|
||||
closedir(dir);
|
||||
qsort(filearr, files, sizeof(*filearr), cmpstrp);
|
||||
for (i = 0; i < files; i++) {
|
||||
load_1(ms, action, filearr[i], &errs, &marray,
|
||||
&marraycount);
|
||||
- free(filearr[i]);
|
||||
+ efree(filearr[i]);
|
||||
}
|
||||
free(filearr);
|
||||
} else
|
||||
@@ -882,12 +877,7 @@
|
||||
for (i = 0; i < marraycount; i++)
|
||||
mentrycount += marray[i].cont_count;
|
||||
@@ -386,18 +405,31 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
mentrycount = 0;
|
||||
for (i = 0; i < marraycount; i++) {
|
||||
@@ -897,8 +887,8 @@
|
||||
@@ -896,9 +886,14 @@
|
||||
mentrycount += marray[i].cont_count;
|
||||
}
|
||||
out:
|
||||
for (i = 0; i < marraycount; i++)
|
||||
- for (i = 0; i < marraycount; i++)
|
||||
- free(marray[i].mp);
|
||||
- free(marray);
|
||||
+ efree(marray[i].mp);
|
||||
+ efree(marray);
|
||||
+ for (i = 0; i < marraycount; i++) {
|
||||
+ if (marray[i].mp) {
|
||||
+ efree(marray[i].mp);
|
||||
+ }
|
||||
+ }
|
||||
+ if (marray) {
|
||||
+ efree(marray);
|
||||
+ }
|
||||
if (errs) {
|
||||
*magicp = NULL;
|
||||
*nmagicp = 0;
|
||||
@@ -1178,11 +1168,7 @@
|
||||
@@ -1175,14 +1170,13 @@
|
||||
return -1;
|
||||
}
|
||||
me = &(*mentryp)[*nmentryp - 1];
|
||||
+ if (me->mp == NULL) {
|
||||
+ return -1;
|
||||
+ }
|
||||
if (me->cont_count == me->max_count) {
|
||||
struct magic *nm;
|
||||
size_t cnt = me->max_count + ALLOC_CHUNK;
|
||||
@@ -410,7 +442,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
me->mp = m = nm;
|
||||
me->max_count = CAST(uint32_t, cnt);
|
||||
}
|
||||
@@ -1194,23 +1180,13 @@
|
||||
@@ -1194,23 +1188,13 @@
|
||||
struct magic_entry *mp;
|
||||
|
||||
maxmagic += ALLOC_INCR;
|
||||
@@ -437,7 +469,18 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
me->mp = m;
|
||||
me->max_count = ALLOC_CHUNK;
|
||||
} else
|
||||
@@ -1361,7 +1337,7 @@
|
||||
@@ -1353,6 +1337,10 @@
|
||||
if (m->type == FILE_INVALID) {
|
||||
if (ms->flags & MAGIC_CHECK)
|
||||
file_magwarn(ms, "type `%s' invalid", l);
|
||||
+ if (me->mp) {
|
||||
+ efree(me->mp);
|
||||
+ me->mp = NULL;
|
||||
+ }
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1361,7 +1349,7 @@
|
||||
|
||||
m->mask_op = 0;
|
||||
if (*l == '~') {
|
||||
@@ -446,7 +489,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
m->mask_op |= FILE_OPINVERSE;
|
||||
else if (ms->flags & MAGIC_CHECK)
|
||||
file_magwarn(ms, "'~' invalid for string types");
|
||||
@@ -1370,7 +1346,7 @@
|
||||
@@ -1370,7 +1358,7 @@
|
||||
m->str_range = 0;
|
||||
m->str_flags = m->type == FILE_PSTRING ? PSTRING_1_LE : 0;
|
||||
if ((op = get_op(*l)) != -1) {
|
||||
@@ -455,7 +498,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
uint64_t val;
|
||||
++l;
|
||||
m->mask_op |= op;
|
||||
@@ -1558,11 +1534,6 @@
|
||||
@@ -1558,11 +1546,6 @@
|
||||
if (check_format(ms, m) == -1)
|
||||
return -1;
|
||||
}
|
||||
@@ -467,7 +510,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
m->mimetype[0] = '\0'; /* initialise MIME type to none */
|
||||
if (m->cont_level == 0)
|
||||
++(*nmentryp); /* make room for next */
|
||||
@@ -2195,56 +2166,68 @@
|
||||
@@ -2195,56 +2178,69 @@
|
||||
|
||||
/*
|
||||
* handle a compiled file.
|
||||
@@ -542,6 +585,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
+ mm = emalloc((size_t)st.sb.st_size);
|
||||
+ if (php_stream_read(stream, mm, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) {
|
||||
file_badread(ms);
|
||||
+ ret = 1;
|
||||
goto error1;
|
||||
}
|
||||
-#define RET 1
|
||||
@@ -559,7 +603,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
ptr = (uint32_t *)(void *)*magicp;
|
||||
if (*ptr != MAGICNO) {
|
||||
if (swap4(*ptr) != MAGICNO) {
|
||||
@@ -2259,35 +2242,55 @@
|
||||
@@ -2259,35 +2255,55 @@
|
||||
else
|
||||
version = ptr[1];
|
||||
if (version != VERSIONNO) {
|
||||
@@ -631,7 +675,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -2301,42 +2304,49 @@
|
||||
@@ -2301,42 +2317,49 @@
|
||||
apprentice_compile(struct magic_set *ms, struct magic **magicp,
|
||||
uint32_t *nmagicp, const char *fn)
|
||||
{
|
||||
@@ -639,10 +683,10 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
char *dbname;
|
||||
int rv = -1;
|
||||
+ php_stream *stream;
|
||||
+
|
||||
+ TSRMLS_FETCH();
|
||||
|
||||
- dbname = mkdbname(ms, fn, 1);
|
||||
+ TSRMLS_FETCH();
|
||||
+
|
||||
+ dbname = mkdbname(ms, fn, 0);
|
||||
|
||||
if (dbname == NULL)
|
||||
@@ -692,7 +736,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -2349,6 +2359,7 @@
|
||||
@@ -2349,6 +2372,7 @@
|
||||
{
|
||||
const char *p, *q;
|
||||
char *buf;
|
||||
@@ -700,7 +744,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
if (strip) {
|
||||
if ((p = strrchr(fn, '/')) != NULL)
|
||||
@@ -2370,14 +2381,14 @@
|
||||
@@ -2370,14 +2394,14 @@
|
||||
q++;
|
||||
/* Compatibility with old code that looked in .mime */
|
||||
if (ms->flags & MAGIC_MIME) {
|
||||
@@ -719,7 +763,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
/* Compatibility with old code that looked in .mime */
|
||||
if (strstr(p, ".mime") != NULL)
|
||||
@@ -2467,7 +2478,7 @@
|
||||
@@ -2467,7 +2491,7 @@
|
||||
m->offset = swap4((uint32_t)m->offset);
|
||||
m->in_offset = swap4((uint32_t)m->in_offset);
|
||||
m->lineno = swap4((uint32_t)m->lineno);
|
||||
@@ -728,9 +772,9 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
m->str_range = swap4(m->str_range);
|
||||
m->str_flags = swap4(m->str_flags);
|
||||
}
|
||||
diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
|
||||
--- libmagic.orig/ascmagic.c 2012-03-28 12:00:34.017709605 +0200
|
||||
+++ libmagic/ascmagic.c 2012-03-28 01:53:04.287303117 +0200
|
||||
diff -u libmagic.origin/ascmagic.c libmagic/ascmagic.c
|
||||
--- libmagic.origin/ascmagic.c 2012-07-15 18:17:24.762087659 +0800
|
||||
+++ libmagic/ascmagic.c 2012-07-15 18:20:42.730087520 +0800
|
||||
@@ -139,10 +139,8 @@
|
||||
/* malloc size is a conservative overestimate; could be
|
||||
improved, or at least realloced after conversion. */
|
||||
@@ -754,10 +798,9 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
|
||||
|
||||
return rv;
|
||||
}
|
||||
Only in libmagic.orig: asprintf.c
|
||||
diff -u libmagic.orig/cdf.c libmagic/cdf.c
|
||||
--- libmagic.orig/cdf.c 2012-03-28 12:00:34.012709598 +0200
|
||||
+++ libmagic/cdf.c 2012-03-28 01:53:04.299331601 +0200
|
||||
diff -u libmagic.origin/cdf.c libmagic/cdf.c
|
||||
--- libmagic.origin/cdf.c 2012-07-15 18:17:24.822087659 +0800
|
||||
+++ libmagic/cdf.c 2012-07-15 18:20:42.730087520 +0800
|
||||
@@ -43,7 +43,17 @@
|
||||
#include <err.h>
|
||||
#endif
|
||||
@@ -776,6 +819,19 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
@@ -296,10 +306,10 @@
|
||||
if (info->i_fd == -1)
|
||||
return -1;
|
||||
|
||||
- if (lseek(info->i_fd, off, SEEK_SET) == (off_t)-1)
|
||||
+ if (FINFO_LSEEK_FUNC(info->i_fd, off, SEEK_SET) == (off_t)-1)
|
||||
return -1;
|
||||
|
||||
- if (read(info->i_fd, buf, len) != (ssize_t)len)
|
||||
+ if (FINFO_READ_FUNC(info->i_fd, buf, len) != (ssize_t)len)
|
||||
return -1;
|
||||
|
||||
return (ssize_t)len;
|
||||
@@ -1135,7 +1145,7 @@
|
||||
cdf_directory_t *d;
|
||||
char name[__arraycount(d->d_name)];
|
||||
@@ -806,9 +862,9 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
|
||||
cdf_print_elapsed_time(buf, sizeof(buf), tp);
|
||||
(void)fprintf(stderr, "timestamp %s\n", buf);
|
||||
} else {
|
||||
diff -u libmagic.orig/cdf.h libmagic/cdf.h
|
||||
--- libmagic.orig/cdf.h 2012-03-28 12:00:34.017709605 +0200
|
||||
+++ libmagic/cdf.h 2012-03-28 01:53:04.299331601 +0200
|
||||
diff -u libmagic.origin/cdf.h libmagic/cdf.h
|
||||
--- libmagic.origin/cdf.h 2012-07-15 18:17:25.046087660 +0800
|
||||
+++ libmagic/cdf.h 2012-07-15 18:20:42.730087520 +0800
|
||||
@@ -35,7 +35,7 @@
|
||||
#ifndef _H_CDF_
|
||||
#define _H_CDF_
|
||||
@@ -844,9 +900,9 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
|
||||
int cdf_read_header(const cdf_info_t *, cdf_header_t *);
|
||||
void cdf_swap_header(cdf_header_t *);
|
||||
void cdf_unpack_header(cdf_header_t *, char *);
|
||||
diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
|
||||
--- libmagic.orig/cdf_time.c 2012-03-28 12:00:34.017709605 +0200
|
||||
+++ libmagic/cdf_time.c 2012-03-28 01:53:04.299331601 +0200
|
||||
diff -u libmagic.origin/cdf_time.c libmagic/cdf_time.c
|
||||
--- libmagic.origin/cdf_time.c 2012-07-15 18:17:24.734087660 +0800
|
||||
+++ libmagic/cdf_time.c 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
|
||||
@@ -903,9 +959,9 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
|
||||
static const cdf_timestamp_t tst = 0x01A5E403C2D59C00ULL;
|
||||
static const char *ref = "Sat Apr 23 01:30:00 1977";
|
||||
char *p, *q;
|
||||
diff -u libmagic.orig/compress.c libmagic/compress.c
|
||||
--- libmagic.orig/compress.c 2012-03-28 12:00:34.012709598 +0200
|
||||
+++ libmagic/compress.c 2012-03-28 01:53:04.299331601 +0200
|
||||
diff -u libmagic.origin/compress.c libmagic/compress.c
|
||||
--- libmagic.origin/compress.c 2012-07-15 18:17:24.730087657 +0800
|
||||
+++ libmagic/compress.c 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -32,6 +32,7 @@
|
||||
* uncompress(method, old, n, newch) - uncompress old into new,
|
||||
* using method, return sizeof new
|
||||
@@ -990,7 +1046,23 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
|
||||
for (cnt = 0;; cnt++) {
|
||||
fd_set check;
|
||||
struct timeval tout = {0, 100 * 1000};
|
||||
@@ -301,7 +307,8 @@
|
||||
@@ -218,7 +224,7 @@
|
||||
|
||||
nocheck:
|
||||
do
|
||||
- switch ((rv = read(fd, buf, n))) {
|
||||
+ switch ((rv = FINFO_READ_FUNC(fd, buf, n))) {
|
||||
case -1:
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
@@ -295,13 +301,14 @@
|
||||
return -1;
|
||||
}
|
||||
(void)close(tfd);
|
||||
- if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
|
||||
+ if (FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
@@ -1011,6 +1083,15 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
|
||||
|
||||
/* XXX: const castaway, via strchr */
|
||||
z.next_in = (Bytef *)strchr((const char *)old + data_start,
|
||||
@@ -400,7 +405,7 @@
|
||||
(void) close(0);
|
||||
if (fd != -1) {
|
||||
(void) dup(fd);
|
||||
- (void) lseek(0, (off_t)0, SEEK_SET);
|
||||
+ (void) FINFO_LSEEK_FUNC(0, (off_t)0, SEEK_SET);
|
||||
} else {
|
||||
(void) dup(fdin[0]);
|
||||
(void) close(fdin[0]);
|
||||
@@ -465,20 +470,14 @@
|
||||
fdin[1] = -1;
|
||||
}
|
||||
@@ -1041,11 +1122,9 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
|
||||
}
|
||||
-#endif
|
||||
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
|
||||
Only in libmagic: config.h
|
||||
Only in libmagic.orig: file.c
|
||||
diff -u libmagic.orig/file.h libmagic/file.h
|
||||
--- libmagic.orig/file.h 2012-03-28 12:00:34.017709605 +0200
|
||||
+++ libmagic/file.h 2012-03-28 01:53:04.304322598 +0200
|
||||
diff -u libmagic.origin/file.h libmagic/file.h
|
||||
--- libmagic.origin/file.h 2012-07-15 18:17:25.046087660 +0800
|
||||
+++ libmagic/file.h 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -33,11 +33,9 @@
|
||||
#ifndef __file_h__
|
||||
#define __file_h__
|
||||
@@ -1165,7 +1244,13 @@ diff -u libmagic.orig/file.h libmagic/file.h
|
||||
protected void file_showstr(FILE *, const char *, size_t);
|
||||
protected size_t file_mbswidth(const char *);
|
||||
protected const char *file_getbuffer(struct magic_set *);
|
||||
@@ -443,11 +439,8 @@
|
||||
@@ -438,16 +434,14 @@
|
||||
size_t *);
|
||||
protected size_t file_pstring_length_size(const struct magic *);
|
||||
protected size_t file_pstring_get_length(const struct magic *, const char *);
|
||||
+protected size_t file_printedlen(const struct magic_set *ms);
|
||||
#ifdef __EMX__
|
||||
protected int file_os2_apptype(struct magic_set *, const char *, const void *,
|
||||
size_t);
|
||||
#endif /* __EMX__ */
|
||||
|
||||
@@ -1177,7 +1262,7 @@ diff -u libmagic.orig/file.h libmagic/file.h
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
extern int sys_nerr;
|
||||
@@ -460,17 +453,10 @@
|
||||
@@ -460,17 +454,10 @@
|
||||
#define strtoul(a, b, c) strtol(a, b, c)
|
||||
#endif
|
||||
|
||||
@@ -1197,10 +1282,22 @@ diff -u libmagic.orig/file.h libmagic/file.h
|
||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
#ifndef HAVE_GETLINE
|
||||
Only in libmagic.orig: file_opts.h
|
||||
diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
|
||||
--- libmagic.orig/fsmagic.c 2012-03-28 12:00:34.012709598 +0200
|
||||
+++ libmagic/fsmagic.c 2012-03-28 01:53:04.304322598 +0200
|
||||
@@ -500,4 +487,12 @@
|
||||
#define FILE_RCSID(id)
|
||||
#endif
|
||||
|
||||
+#ifdef PHP_WIN32
|
||||
+#define FINFO_LSEEK_FUNC _lseek
|
||||
+#define FINFO_READ_FUNC _read
|
||||
+#else
|
||||
+#define FINFO_LSEEK_FUNC lseek
|
||||
+#define FINFO_READ_FUNC read
|
||||
+#endif
|
||||
+
|
||||
#endif /* __file_h__ */
|
||||
diff -u libmagic.origin/fsmagic.c libmagic/fsmagic.c
|
||||
--- libmagic.origin/fsmagic.c 2012-07-15 18:17:24.730087657 +0800
|
||||
+++ libmagic/fsmagic.c 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -59,27 +59,21 @@
|
||||
# define minor(dev) ((dev) & 0xff)
|
||||
#endif
|
||||
@@ -1411,10 +1508,10 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
|
||||
-#else
|
||||
- if (file_printf(ms, "block special") == -1)
|
||||
- return -1;
|
||||
-#endif
|
||||
#endif
|
||||
- }
|
||||
- return 1;
|
||||
#endif
|
||||
-#endif
|
||||
- /* TODO add code to handle V7 MUX and Blit MUX files */
|
||||
+
|
||||
#ifdef S_IFIFO
|
||||
@@ -1523,9 +1620,9 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
|
||||
}
|
||||
|
||||
/*
|
||||
diff -u libmagic.orig/funcs.c libmagic/funcs.c
|
||||
--- libmagic.orig/funcs.c 2012-03-28 12:00:34.012709598 +0200
|
||||
+++ libmagic/funcs.c 2012-03-28 11:49:56.089607390 +0200
|
||||
diff -u libmagic.origin/funcs.c libmagic/funcs.c
|
||||
--- libmagic.origin/funcs.c 2012-07-15 18:17:25.046087660 +0800
|
||||
+++ libmagic/funcs.c 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -41,52 +41,42 @@
|
||||
#if defined(HAVE_WCTYPE_H)
|
||||
#include <wctype.h>
|
||||
@@ -1763,7 +1860,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
|
||||
+ pcre_cache_entry *pce;
|
||||
+ char *res;
|
||||
+ zval *repl;
|
||||
+ int res_len, rep_cnt;
|
||||
+ int res_len, rep_cnt = 0;
|
||||
+ TSRMLS_FETCH();
|
||||
+
|
||||
+ MAKE_STD_ZVAL(patt);
|
||||
@@ -1819,12 +1916,10 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
|
||||
+ return rep_cnt;
|
||||
}
|
||||
+
|
||||
Only in libmagic.orig: getline.c
|
||||
Only in libmagic.orig: getopt_long.c
|
||||
Only in libmagic: LICENSE
|
||||
diff -u libmagic.orig/magic.c libmagic/magic.c
|
||||
--- libmagic.orig/magic.c 2012-03-28 12:00:34.012709598 +0200
|
||||
+++ libmagic/magic.c 2012-03-28 11:42:50.404750579 +0200
|
||||
Common subdirectories: libmagic.origin/.libs and libmagic/.libs
|
||||
diff -u libmagic.origin/magic.c libmagic/magic.c
|
||||
--- libmagic.origin/magic.c 2012-07-15 18:17:25.046087660 +0800
|
||||
+++ libmagic/magic.c 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -25,11 +25,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
@@ -2200,9 +2295,9 @@ diff -u libmagic.orig/magic.c libmagic/magic.c
|
||||
|
||||
public const char *
|
||||
magic_error(struct magic_set *ms)
|
||||
diff -u libmagic.orig/magic.h libmagic/magic.h
|
||||
--- libmagic.orig/magic.h 2012-03-28 12:00:34.017709605 +0200
|
||||
+++ libmagic/magic.h 2012-03-28 01:53:04.304322598 +0200
|
||||
diff -u libmagic.origin/magic.h libmagic/magic.h
|
||||
--- libmagic.origin/magic.h 2012-07-15 18:17:24.734087660 +0800
|
||||
+++ libmagic/magic.h 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -85,6 +85,7 @@
|
||||
|
||||
const char *magic_getpath(const char *, int);
|
||||
@@ -2219,25 +2314,20 @@ diff -u libmagic.orig/magic.h libmagic/magic.h
|
||||
int magic_list(magic_t, const char *);
|
||||
int magic_errno(magic_t);
|
||||
|
||||
Only in libmagic.orig: Makefile.am
|
||||
Only in libmagic.orig: Makefile.in
|
||||
Only in libmagic.orig: mygetopt.h
|
||||
Only in libmagic: names.h
|
||||
Only in libmagic: patchlevel.h
|
||||
diff -u libmagic.orig/print.c libmagic/print.c
|
||||
--- libmagic.orig/print.c 2012-03-28 12:00:34.017709605 +0200
|
||||
+++ libmagic/print.c 2012-03-28 01:53:04.304322598 +0200
|
||||
diff -u libmagic.origin/print.c libmagic/print.c
|
||||
--- libmagic.origin/print.c 2012-07-15 18:21:02.846087501 +0800
|
||||
+++ libmagic/print.c 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -29,6 +29,9 @@
|
||||
* print.c - debugging printout routines
|
||||
*/
|
||||
|
||||
+#define _GNU_SOURCE
|
||||
+#include "php.h"
|
||||
+#include "main/snprintf.h"
|
||||
+
|
||||
#include "file.h"
|
||||
|
||||
#ifndef lint
|
||||
@@ -45,174 +48,21 @@
|
||||
@@ -46,174 +49,21 @@
|
||||
|
||||
#define SZOF(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
@@ -2419,9 +2509,206 @@ diff -u libmagic.orig/print.c libmagic/print.c
|
||||
}
|
||||
|
||||
protected const char *
|
||||
diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
|
||||
--- libmagic.orig/readcdf.c 2012-03-28 12:00:34.012709598 +0200
|
||||
+++ libmagic/readcdf.c 2012-03-28 01:53:04.304322598 +0200
|
||||
diff -u libmagic.origin/print.c.rej libmagic/print.c.rej
|
||||
--- libmagic.origin/print.c.rej 2012-07-15 18:17:24.762087659 +0800
|
||||
+++ libmagic/print.c.rej 2012-07-15 18:20:27.186087168 +0800
|
||||
@@ -1,12 +1,184 @@
|
||||
---- libmagic/print.c 2012-05-29 14:34:03.770376387 +0200
|
||||
-+++ libmagic.orig/print.c 2012-05-29 14:40:41.710960045 +0200
|
||||
-@@ -29,9 +29,6 @@
|
||||
- * print.c - debugging printout routines
|
||||
- */
|
||||
+--- libmagic.orig/print.c 2012-05-29 14:40:41.710960045 +0200
|
||||
++++ libmagic/print.c 2012-05-29 14:34:03.770376387 +0200
|
||||
+@@ -48,174 +51,21 @@
|
||||
|
||||
--#include "php.h"
|
||||
--#include "main/snprintf.h"
|
||||
+ #define SZOF(a) (sizeof(a) / sizeof(a[0]))
|
||||
+
|
||||
+-#ifndef COMPILE_ONLY
|
||||
+-protected void
|
||||
+-file_mdump(struct magic *m)
|
||||
+-{
|
||||
+- private const char optyp[] = { FILE_OPS };
|
||||
+-
|
||||
+- (void) fprintf(stderr, "%u: %.*s %u", m->lineno,
|
||||
+- (m->cont_level & 7) + 1, ">>>>>>>>", m->offset);
|
||||
+-
|
||||
+- if (m->flag & INDIR) {
|
||||
+- (void) fprintf(stderr, "(%s,",
|
||||
+- /* Note: type is unsigned */
|
||||
+- (m->in_type < file_nnames) ?
|
||||
+- file_names[m->in_type] : "*bad*");
|
||||
+- if (m->in_op & FILE_OPINVERSE)
|
||||
+- (void) fputc('~', stderr);
|
||||
+- (void) fprintf(stderr, "%c%u),",
|
||||
+- ((size_t)(m->in_op & FILE_OPS_MASK) <
|
||||
+- SZOF(optyp)) ?
|
||||
+- optyp[m->in_op & FILE_OPS_MASK] : '?',
|
||||
+- m->in_offset);
|
||||
+- }
|
||||
+- (void) fprintf(stderr, " %s%s", (m->flag & UNSIGNED) ? "u" : "",
|
||||
+- /* Note: type is unsigned */
|
||||
+- (m->type < file_nnames) ? file_names[m->type] : "*bad*");
|
||||
+- if (m->mask_op & FILE_OPINVERSE)
|
||||
+- (void) fputc('~', stderr);
|
||||
+-
|
||||
+- if (IS_STRING(m->type)) {
|
||||
+- if (m->str_flags) {
|
||||
+- (void) fputc('/', stderr);
|
||||
+- if (m->str_flags & STRING_COMPACT_WHITESPACE)
|
||||
+- (void) fputc(CHAR_COMPACT_WHITESPACE, stderr);
|
||||
+- if (m->str_flags & STRING_COMPACT_OPTIONAL_WHITESPACE)
|
||||
+- (void) fputc(CHAR_COMPACT_OPTIONAL_WHITESPACE,
|
||||
+- stderr);
|
||||
+- if (m->str_flags & STRING_IGNORE_LOWERCASE)
|
||||
+- (void) fputc(CHAR_IGNORE_LOWERCASE, stderr);
|
||||
+- if (m->str_flags & STRING_IGNORE_UPPERCASE)
|
||||
+- (void) fputc(CHAR_IGNORE_UPPERCASE, stderr);
|
||||
+- if (m->str_flags & REGEX_OFFSET_START)
|
||||
+- (void) fputc(CHAR_REGEX_OFFSET_START, stderr);
|
||||
+- if (m->str_flags & STRING_TEXTTEST)
|
||||
+- (void) fputc(CHAR_TEXTTEST, stderr);
|
||||
+- if (m->str_flags & STRING_BINTEST)
|
||||
+- (void) fputc(CHAR_BINTEST, stderr);
|
||||
+- if (m->str_flags & PSTRING_1_BE)
|
||||
+- (void) fputc(CHAR_PSTRING_1_BE, stderr);
|
||||
+- if (m->str_flags & PSTRING_2_BE)
|
||||
+- (void) fputc(CHAR_PSTRING_2_BE, stderr);
|
||||
+- if (m->str_flags & PSTRING_2_LE)
|
||||
+- (void) fputc(CHAR_PSTRING_2_LE, stderr);
|
||||
+- if (m->str_flags & PSTRING_4_BE)
|
||||
+- (void) fputc(CHAR_PSTRING_4_BE, stderr);
|
||||
+- if (m->str_flags & PSTRING_4_LE)
|
||||
+- (void) fputc(CHAR_PSTRING_4_LE, stderr);
|
||||
+- if (m->str_flags & PSTRING_LENGTH_INCLUDES_ITSELF)
|
||||
+- (void) fputc(
|
||||
+- CHAR_PSTRING_LENGTH_INCLUDES_ITSELF,
|
||||
+- stderr);
|
||||
+- }
|
||||
+- if (m->str_range)
|
||||
+- (void) fprintf(stderr, "/%u", m->str_range);
|
||||
+- }
|
||||
+- else {
|
||||
+- if ((size_t)(m->mask_op & FILE_OPS_MASK) < SZOF(optyp))
|
||||
+- (void) fputc(optyp[m->mask_op & FILE_OPS_MASK], stderr);
|
||||
+- else
|
||||
+- (void) fputc('?', stderr);
|
||||
+-
|
||||
+- if (m->num_mask) {
|
||||
+- (void) fprintf(stderr, "%.8llx",
|
||||
+- (unsigned long long)m->num_mask);
|
||||
+- }
|
||||
+- }
|
||||
+- (void) fprintf(stderr, ",%c", m->reln);
|
||||
+-
|
||||
+- if (m->reln != 'x') {
|
||||
+- switch (m->type) {
|
||||
+- case FILE_BYTE:
|
||||
+- case FILE_SHORT:
|
||||
+- case FILE_LONG:
|
||||
+- case FILE_LESHORT:
|
||||
+- case FILE_LELONG:
|
||||
+- case FILE_MELONG:
|
||||
+- case FILE_BESHORT:
|
||||
+- case FILE_BELONG:
|
||||
+- (void) fprintf(stderr, "%d", m->value.l);
|
||||
+- break;
|
||||
+- case FILE_BEQUAD:
|
||||
+- case FILE_LEQUAD:
|
||||
+- case FILE_QUAD:
|
||||
+- (void) fprintf(stderr, "%" INT64_T_FORMAT "d",
|
||||
+- (unsigned long long)m->value.q);
|
||||
+- break;
|
||||
+- case FILE_PSTRING:
|
||||
+- case FILE_STRING:
|
||||
+- case FILE_REGEX:
|
||||
+- case FILE_BESTRING16:
|
||||
+- case FILE_LESTRING16:
|
||||
+- case FILE_SEARCH:
|
||||
+- file_showstr(stderr, m->value.s, (size_t)m->vallen);
|
||||
+- break;
|
||||
+- case FILE_DATE:
|
||||
+- case FILE_LEDATE:
|
||||
+- case FILE_BEDATE:
|
||||
+- case FILE_MEDATE:
|
||||
+- (void)fprintf(stderr, "%s,",
|
||||
+- file_fmttime(m->value.l, 1));
|
||||
+- break;
|
||||
+- case FILE_LDATE:
|
||||
+- case FILE_LELDATE:
|
||||
+- case FILE_BELDATE:
|
||||
+- case FILE_MELDATE:
|
||||
+- (void)fprintf(stderr, "%s,",
|
||||
+- file_fmttime(m->value.l, 0));
|
||||
+- break;
|
||||
+- case FILE_QDATE:
|
||||
+- case FILE_LEQDATE:
|
||||
+- case FILE_BEQDATE:
|
||||
+- (void)fprintf(stderr, "%s,",
|
||||
+- file_fmttime((uint32_t)m->value.q, 1));
|
||||
+- break;
|
||||
+- case FILE_QLDATE:
|
||||
+- case FILE_LEQLDATE:
|
||||
+- case FILE_BEQLDATE:
|
||||
+- (void)fprintf(stderr, "%s,",
|
||||
+- file_fmttime((uint32_t)m->value.q, 0));
|
||||
+- break;
|
||||
+- case FILE_FLOAT:
|
||||
+- case FILE_BEFLOAT:
|
||||
+- case FILE_LEFLOAT:
|
||||
+- (void) fprintf(stderr, "%G", m->value.f);
|
||||
+- break;
|
||||
+- case FILE_DOUBLE:
|
||||
+- case FILE_BEDOUBLE:
|
||||
+- case FILE_LEDOUBLE:
|
||||
+- (void) fprintf(stderr, "%G", m->value.d);
|
||||
+- break;
|
||||
+- case FILE_DEFAULT:
|
||||
+- /* XXX - do anything here? */
|
||||
+- break;
|
||||
+- default:
|
||||
+- (void) fputs("*bad*", stderr);
|
||||
+- break;
|
||||
+- }
|
||||
+- }
|
||||
+- (void) fprintf(stderr, ",\"%s\"]\n", m->desc);
|
||||
+-}
|
||||
+-#endif
|
||||
+-
|
||||
+ /*VARARGS*/
|
||||
+ protected void
|
||||
+ file_magwarn(struct magic_set *ms, const char *f, ...)
|
||||
+ {
|
||||
+ va_list va;
|
||||
++ char *expanded_format;
|
||||
++ TSRMLS_FETCH();
|
||||
+
|
||||
+- /* cuz we use stdout for most, stderr here */
|
||||
+- (void) fflush(stdout);
|
||||
-
|
||||
- #include "file.h"
|
||||
+- if (ms->file)
|
||||
+- (void) fprintf(stderr, "%s, %lu: ", ms->file,
|
||||
+- (unsigned long)ms->line);
|
||||
+- (void) fprintf(stderr, "Warning: ");
|
||||
+ va_start(va, f);
|
||||
+- (void) vfprintf(stderr, f, va);
|
||||
++ vasprintf(&expanded_format, f, va);
|
||||
+ va_end(va);
|
||||
+- (void) fputc('\n', stderr);
|
||||
++
|
||||
++ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Warning: %s", expanded_format);
|
||||
++
|
||||
++ free(expanded_format);
|
||||
+ }
|
||||
|
||||
- #ifndef lint
|
||||
+ protected const char *
|
||||
diff -u libmagic.origin/readcdf.c libmagic/readcdf.c
|
||||
--- libmagic.origin/readcdf.c 2012-07-15 18:17:24.734087660 +0800
|
||||
+++ libmagic/readcdf.c 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -30,7 +30,11 @@
|
||||
#endif
|
||||
|
||||
@@ -2467,9 +2754,9 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
|
||||
c = cdf_ctime(&ts.tv_sec);
|
||||
if ((ec = strchr(c, '\n')) != NULL)
|
||||
*ec = '\0';
|
||||
diff -u libmagic.orig/readelf.c libmagic/readelf.c
|
||||
--- libmagic.orig/readelf.c 2012-03-28 12:00:34.017709605 +0200
|
||||
+++ libmagic/readelf.c 2012-03-28 01:53:04.308322618 +0200
|
||||
diff -u libmagic.origin/readelf.c libmagic/readelf.c
|
||||
--- libmagic.origin/readelf.c 2012-07-15 18:17:25.046087660 +0800
|
||||
+++ libmagic/readelf.c 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -49,7 +49,7 @@
|
||||
off_t, int *, int);
|
||||
private int doshn(struct magic_set *, int, int, int, off_t, int, size_t,
|
||||
@@ -2479,6 +2766,34 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
|
||||
int, size_t, int *);
|
||||
|
||||
#define ELF_ALIGN(a) ((((a) + align - 1) / align) * align)
|
||||
@@ -309,11 +309,11 @@
|
||||
* Loop through all the program headers.
|
||||
*/
|
||||
for ( ; num; num--) {
|
||||
- if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
+ if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
- if (read(fd, xph_addr, xph_sizeof) == -1) {
|
||||
+ if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
|
||||
file_badread(ms);
|
||||
return -1;
|
||||
}
|
||||
@@ -331,11 +331,11 @@
|
||||
* This is a PT_NOTE section; loop through all the notes
|
||||
* in the section.
|
||||
*/
|
||||
- if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
|
||||
+ if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
- bufsize = read(fd, nbuf,
|
||||
+ bufsize = FINFO_READ_FUNC(fd, nbuf,
|
||||
((xph_filesz < sizeof(nbuf)) ? xph_filesz : sizeof(nbuf)));
|
||||
if (bufsize == -1) {
|
||||
file_badread(ms);
|
||||
@@ -357,7 +357,7 @@
|
||||
#endif
|
||||
|
||||
@@ -2496,6 +2811,20 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
|
||||
|
||||
(void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
|
||||
offset += xnh_sizeof;
|
||||
@@ -859,11 +858,11 @@
|
||||
}
|
||||
|
||||
for ( ; num; num--) {
|
||||
- if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
+ if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
- if (read(fd, xsh_addr, xsh_sizeof) == -1) {
|
||||
+ if (FINFO_READ_FUNC(fd, xsh_addr, xsh_sizeof) == -1) {
|
||||
file_badread(ms);
|
||||
return -1;
|
||||
}
|
||||
@@ -888,20 +887,16 @@
|
||||
/* Things we can determine when we seek */
|
||||
switch (xsh_type) {
|
||||
@@ -2505,22 +2834,24 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
|
||||
- " for note");
|
||||
- return -1;
|
||||
- }
|
||||
- if ((noff = lseek(fd, (off_t)xsh_offset, SEEK_SET)) ==
|
||||
+ nbuf = emalloc((size_t)xsh_size);
|
||||
if ((noff = lseek(fd, (off_t)xsh_offset, SEEK_SET)) ==
|
||||
+ if ((noff = FINFO_LSEEK_FUNC(fd, (off_t)xsh_offset, SEEK_SET)) ==
|
||||
(off_t)-1) {
|
||||
file_badread(ms);
|
||||
- free(nbuf);
|
||||
+ efree(nbuf);
|
||||
return -1;
|
||||
}
|
||||
if (read(fd, nbuf, (size_t)xsh_size) !=
|
||||
- if (read(fd, nbuf, (size_t)xsh_size) !=
|
||||
+ if (FINFO_READ_FUNC(fd, nbuf, (size_t)xsh_size) !=
|
||||
(ssize_t)xsh_size) {
|
||||
- free(nbuf);
|
||||
+ efree(nbuf);
|
||||
file_badread(ms);
|
||||
return -1;
|
||||
}
|
||||
@@ -916,7 +911,7 @@
|
||||
@@ -916,10 +911,10 @@
|
||||
if (noff == 0)
|
||||
break;
|
||||
}
|
||||
@@ -2528,10 +2859,61 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
|
||||
+ efree(nbuf);
|
||||
break;
|
||||
case SHT_SUNW_cap:
|
||||
if (lseek(fd, (off_t)xsh_offset, SEEK_SET) ==
|
||||
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
--- libmagic.orig/softmagic.c 2012-03-28 12:00:34.012709598 +0200
|
||||
+++ libmagic/softmagic.c 2012-03-28 01:53:04.308322618 +0200
|
||||
- if (lseek(fd, (off_t)xsh_offset, SEEK_SET) ==
|
||||
+ if (FINFO_LSEEK_FUNC(fd, (off_t)xsh_offset, SEEK_SET) ==
|
||||
(off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
@@ -932,7 +927,7 @@
|
||||
MAX(sizeof cap32, sizeof cap64)];
|
||||
if ((coff += xcap_sizeof) > (off_t)xsh_size)
|
||||
break;
|
||||
- if (read(fd, cbuf, (size_t)xcap_sizeof) !=
|
||||
+ if (FINFO_READ_FUNC(fd, cbuf, (size_t)xcap_sizeof) !=
|
||||
(ssize_t)xcap_sizeof) {
|
||||
file_badread(ms);
|
||||
return -1;
|
||||
@@ -1051,12 +1046,12 @@
|
||||
}
|
||||
|
||||
for ( ; num; num--) {
|
||||
- if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
+ if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (read(fd, xph_addr, xph_sizeof) == -1) {
|
||||
+ if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
|
||||
file_badread(ms);
|
||||
return -1;
|
||||
}
|
||||
@@ -1095,11 +1090,11 @@
|
||||
* This is a PT_NOTE section; loop through all the notes
|
||||
* in the section.
|
||||
*/
|
||||
- if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
|
||||
+ if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
- bufsize = read(fd, nbuf, ((xph_filesz < sizeof(nbuf)) ?
|
||||
+ bufsize = FINFO_READ_FUNC(fd, nbuf, ((xph_filesz < sizeof(nbuf)) ?
|
||||
xph_filesz : sizeof(nbuf)));
|
||||
if (bufsize == -1) {
|
||||
file_badread(ms);
|
||||
@@ -1161,7 +1156,7 @@
|
||||
/*
|
||||
* If we cannot seek, it must be a pipe, socket or fifo.
|
||||
*/
|
||||
- if((lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
|
||||
+ if((FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
|
||||
fd = file_pipe2file(ms, fd, buf, nbytes);
|
||||
|
||||
if (fstat(fd, &st) == -1) {
|
||||
diff -u libmagic.origin/softmagic.c libmagic/softmagic.c
|
||||
--- libmagic.origin/softmagic.c 2012-07-15 18:17:24.722087658 +0800
|
||||
+++ libmagic/softmagic.c 2012-07-15 18:20:42.734087519 +0800
|
||||
@@ -41,6 +41,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
@@ -2718,7 +3100,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1669,6 +1642,65 @@
|
||||
@@ -1669,6 +1642,42 @@
|
||||
return file_strncmp(a, b, len, flags);
|
||||
}
|
||||
|
||||
@@ -2734,29 +3116,6 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
+
|
||||
+ for (i=0; i<Z_STRLEN_P(pattern); i++, j++) {
|
||||
+ switch (Z_STRVAL_P(pattern)[i]) {
|
||||
+ case '?':
|
||||
+ t[j] = '.';
|
||||
+ break;
|
||||
+ case '*':
|
||||
+ t[j++] = '.';
|
||||
+ t[j] = '*';
|
||||
+ break;
|
||||
+ case '.':
|
||||
+ t[j++] = '\\';
|
||||
+ t[j] = '.';
|
||||
+ break;
|
||||
+ case '\\':
|
||||
+ t[j++] = '\\';
|
||||
+ t[j] = '\\';
|
||||
+ break;
|
||||
+ case '(':
|
||||
+ t[j++] = '\\';
|
||||
+ t[j] = '(';
|
||||
+ break;
|
||||
+ case ')':
|
||||
+ t[j++] = '\\';
|
||||
+ t[j] = ')';
|
||||
+ break;
|
||||
+ case '~':
|
||||
+ t[j++] = '\\';
|
||||
+ t[j] = '~';
|
||||
@@ -2784,7 +3143,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
private int
|
||||
magiccheck(struct magic_set *ms, struct magic *m)
|
||||
{
|
||||
@@ -1825,67 +1857,163 @@
|
||||
@@ -1825,67 +1834,163 @@
|
||||
break;
|
||||
}
|
||||
case FILE_REGEX: {
|
||||
@@ -2795,23 +3154,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
- if (ms->search.s == NULL)
|
||||
- return 0;
|
||||
-
|
||||
+ zval *pattern;
|
||||
+ int options = 0;
|
||||
+ pcre_cache_entry *pce;
|
||||
+ TSRMLS_FETCH();
|
||||
+
|
||||
+ MAKE_STD_ZVAL(pattern);
|
||||
+ ZVAL_STRINGL(pattern, (char *)m->value.s, m->vallen, 0);
|
||||
+
|
||||
+ options |= PCRE_MULTILINE;
|
||||
+
|
||||
+ if (m->str_flags & STRING_IGNORE_CASE) {
|
||||
+ options |= PCRE_CASELESS;
|
||||
+ }
|
||||
+
|
||||
+ convert_libmagic_pattern(pattern, options);
|
||||
+
|
||||
l = 0;
|
||||
- l = 0;
|
||||
- rc = regcomp(&rx, m->value.s,
|
||||
- REG_EXTENDED|REG_NEWLINE|
|
||||
- ((m->str_flags & STRING_IGNORE_CASE) ? REG_ICASE : 0));
|
||||
@@ -2828,6 +3171,23 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
- size_t l = ms->search.s_len - 1;
|
||||
- char c = ms->search.s[l];
|
||||
- ((char *)(intptr_t)ms->search.s)[l] = '\0';
|
||||
+ zval *pattern;
|
||||
+ int options = 0;
|
||||
+ pcre_cache_entry *pce;
|
||||
+ TSRMLS_FETCH();
|
||||
+
|
||||
+ MAKE_STD_ZVAL(pattern);
|
||||
+ ZVAL_STRINGL(pattern, (char *)m->value.s, m->vallen, 0);
|
||||
+
|
||||
+ options |= PCRE_MULTILINE;
|
||||
+
|
||||
+ if (m->str_flags & STRING_IGNORE_CASE) {
|
||||
+ options |= PCRE_CASELESS;
|
||||
+ }
|
||||
+
|
||||
+ convert_libmagic_pattern(pattern, options);
|
||||
+
|
||||
+ l = v = 0;
|
||||
+#if (PHP_MAJOR_VERSION < 6)
|
||||
+ if ((pce = pcre_get_compiled_regex_cache(Z_STRVAL_P(pattern), Z_STRLEN_P(pattern) TSRMLS_CC)) == NULL) {
|
||||
#else
|
||||
@@ -2999,6 +3359,3 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
default:
|
||||
file_magerror(ms, "invalid type %d in magiccheck()", m->type);
|
||||
return -1;
|
||||
Only in libmagic.orig: strlcat.c
|
||||
Only in libmagic.orig: strlcpy.c
|
||||
Only in libmagic.orig: vasprintf.c
|
||||
@@ -753,7 +753,7 @@ private int
|
||||
apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
|
||||
const char *fn, int action)
|
||||
{
|
||||
int errs = 0;
|
||||
int errs = 0, mflen = 0;
|
||||
struct magic_entry *marray;
|
||||
uint32_t marraycount, i, mentrycount = 0, starttest;
|
||||
size_t files = 0, maxfiles = 0;
|
||||
@@ -782,7 +782,7 @@ apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
|
||||
goto out;
|
||||
}
|
||||
while ((d = readdir(dir)) != NULL) {
|
||||
if (snprintf(mfn, sizeof(mfn), "%s/%s", fn, d->d_name) < 0) {
|
||||
if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d->d_name)) < 0) {
|
||||
file_oomem(ms,
|
||||
strlen(fn) + strlen(d->d_name) + 2);
|
||||
errs++;
|
||||
@@ -804,14 +804,14 @@ apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
filearr[files++] = mfn;
|
||||
filearr[files++] = estrndup(mfn, mflen);
|
||||
}
|
||||
closedir(dir);
|
||||
qsort(filearr, files, sizeof(*filearr), cmpstrp);
|
||||
for (i = 0; i < files; i++) {
|
||||
load_1(ms, action, filearr[i], &errs, &marray,
|
||||
&marraycount);
|
||||
free(filearr[i]);
|
||||
efree(filearr[i]);
|
||||
}
|
||||
free(filearr);
|
||||
} else
|
||||
@@ -886,9 +886,14 @@ apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
|
||||
mentrycount += marray[i].cont_count;
|
||||
}
|
||||
out:
|
||||
for (i = 0; i < marraycount; i++)
|
||||
efree(marray[i].mp);
|
||||
efree(marray);
|
||||
for (i = 0; i < marraycount; i++) {
|
||||
if (marray[i].mp) {
|
||||
efree(marray[i].mp);
|
||||
}
|
||||
}
|
||||
if (marray) {
|
||||
efree(marray);
|
||||
}
|
||||
if (errs) {
|
||||
*magicp = NULL;
|
||||
*nmagicp = 0;
|
||||
@@ -1165,6 +1170,9 @@ parse(struct magic_set *ms, struct magic_entry **mentryp, uint32_t *nmentryp,
|
||||
return -1;
|
||||
}
|
||||
me = &(*mentryp)[*nmentryp - 1];
|
||||
if (me->mp == NULL) {
|
||||
return -1;
|
||||
}
|
||||
if (me->cont_count == me->max_count) {
|
||||
struct magic *nm;
|
||||
size_t cnt = me->max_count + ALLOC_CHUNK;
|
||||
@@ -1329,6 +1337,10 @@ parse(struct magic_set *ms, struct magic_entry **mentryp, uint32_t *nmentryp,
|
||||
if (m->type == FILE_INVALID) {
|
||||
if (ms->flags & MAGIC_CHECK)
|
||||
file_magwarn(ms, "type `%s' invalid", l);
|
||||
if (me->mp) {
|
||||
efree(me->mp);
|
||||
me->mp = NULL;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -2219,6 +2231,7 @@ apprentice_map(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
|
||||
mm = emalloc((size_t)st.sb.st_size);
|
||||
if (php_stream_read(stream, mm, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) {
|
||||
file_badread(ms);
|
||||
ret = 1;
|
||||
goto error1;
|
||||
}
|
||||
ret = 1;
|
||||
|
||||
@@ -306,10 +306,10 @@ cdf_read(const cdf_info_t *info, off_t off, void *buf, size_t len)
|
||||
if (info->i_fd == -1)
|
||||
return -1;
|
||||
|
||||
if (lseek(info->i_fd, off, SEEK_SET) == (off_t)-1)
|
||||
if (FINFO_LSEEK_FUNC(info->i_fd, off, SEEK_SET) == (off_t)-1)
|
||||
return -1;
|
||||
|
||||
if (read(info->i_fd, buf, len) != (ssize_t)len)
|
||||
if (FINFO_READ_FUNC(info->i_fd, buf, len) != (ssize_t)len)
|
||||
return -1;
|
||||
|
||||
return (ssize_t)len;
|
||||
|
||||
@@ -224,7 +224,7 @@ sread(int fd, void *buf, size_t n, int canbepipe)
|
||||
|
||||
nocheck:
|
||||
do
|
||||
switch ((rv = read(fd, buf, n))) {
|
||||
switch ((rv = FINFO_READ_FUNC(fd, buf, n))) {
|
||||
case -1:
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
@@ -301,7 +301,7 @@ file_pipe2file(struct magic_set *ms, int fd, const void *startbuf,
|
||||
return -1;
|
||||
}
|
||||
(void)close(tfd);
|
||||
if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
|
||||
if (FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
@@ -405,7 +405,7 @@ uncompressbuf(struct magic_set *ms, int fd, size_t method,
|
||||
(void) close(0);
|
||||
if (fd != -1) {
|
||||
(void) dup(fd);
|
||||
(void) lseek(0, (off_t)0, SEEK_SET);
|
||||
(void) FINFO_LSEEK_FUNC(0, (off_t)0, SEEK_SET);
|
||||
} else {
|
||||
(void) dup(fdin[0]);
|
||||
(void) close(fdin[0]);
|
||||
|
||||
@@ -434,6 +434,7 @@ protected int file_looks_utf8(const unsigned char *, size_t, unichar *,
|
||||
size_t *);
|
||||
protected size_t file_pstring_length_size(const struct magic *);
|
||||
protected size_t file_pstring_get_length(const struct magic *, const char *);
|
||||
protected size_t file_printedlen(const struct magic_set *ms);
|
||||
#ifdef __EMX__
|
||||
protected int file_os2_apptype(struct magic_set *, const char *, const void *,
|
||||
size_t);
|
||||
@@ -486,4 +487,12 @@ static const char *rcsid(const char *p) { \
|
||||
#define FILE_RCSID(id)
|
||||
#endif
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#define FINFO_LSEEK_FUNC _lseek
|
||||
#define FINFO_READ_FUNC _read
|
||||
#else
|
||||
#define FINFO_LSEEK_FUNC lseek
|
||||
#define FINFO_READ_FUNC read
|
||||
#endif
|
||||
|
||||
#endif /* __file_h__ */
|
||||
@@ -438,7 +438,7 @@ file_replace(struct magic_set *ms, const char *pat, const char *rep)
|
||||
pcre_cache_entry *pce;
|
||||
char *res;
|
||||
zval *repl;
|
||||
int res_len, rep_cnt;
|
||||
int res_len, rep_cnt = 0;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
MAKE_STD_ZVAL(patt);
|
||||
|
||||
@@ -309,11 +309,11 @@ dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
|
||||
* Loop through all the program headers.
|
||||
*/
|
||||
for ( ; num; num--) {
|
||||
if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
if (read(fd, xph_addr, xph_sizeof) == -1) {
|
||||
if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
|
||||
file_badread(ms);
|
||||
return -1;
|
||||
}
|
||||
@@ -331,11 +331,11 @@ dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
|
||||
* This is a PT_NOTE section; loop through all the notes
|
||||
* in the section.
|
||||
*/
|
||||
if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
|
||||
if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
bufsize = read(fd, nbuf,
|
||||
bufsize = FINFO_READ_FUNC(fd, nbuf,
|
||||
((xph_filesz < sizeof(nbuf)) ? xph_filesz : sizeof(nbuf)));
|
||||
if (bufsize == -1) {
|
||||
file_badread(ms);
|
||||
@@ -858,11 +858,11 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
|
||||
}
|
||||
|
||||
for ( ; num; num--) {
|
||||
if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
if (read(fd, xsh_addr, xsh_sizeof) == -1) {
|
||||
if (FINFO_READ_FUNC(fd, xsh_addr, xsh_sizeof) == -1) {
|
||||
file_badread(ms);
|
||||
return -1;
|
||||
}
|
||||
@@ -888,13 +888,13 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
|
||||
switch (xsh_type) {
|
||||
case SHT_NOTE:
|
||||
nbuf = emalloc((size_t)xsh_size);
|
||||
if ((noff = lseek(fd, (off_t)xsh_offset, SEEK_SET)) ==
|
||||
if ((noff = FINFO_LSEEK_FUNC(fd, (off_t)xsh_offset, SEEK_SET)) ==
|
||||
(off_t)-1) {
|
||||
file_badread(ms);
|
||||
efree(nbuf);
|
||||
return -1;
|
||||
}
|
||||
if (read(fd, nbuf, (size_t)xsh_size) !=
|
||||
if (FINFO_READ_FUNC(fd, nbuf, (size_t)xsh_size) !=
|
||||
(ssize_t)xsh_size) {
|
||||
efree(nbuf);
|
||||
file_badread(ms);
|
||||
@@ -914,7 +914,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
|
||||
efree(nbuf);
|
||||
break;
|
||||
case SHT_SUNW_cap:
|
||||
if (lseek(fd, (off_t)xsh_offset, SEEK_SET) ==
|
||||
if (FINFO_LSEEK_FUNC(fd, (off_t)xsh_offset, SEEK_SET) ==
|
||||
(off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
@@ -927,7 +927,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
|
||||
MAX(sizeof cap32, sizeof cap64)];
|
||||
if ((coff += xcap_sizeof) > (off_t)xsh_size)
|
||||
break;
|
||||
if (read(fd, cbuf, (size_t)xcap_sizeof) !=
|
||||
if (FINFO_READ_FUNC(fd, cbuf, (size_t)xcap_sizeof) !=
|
||||
(ssize_t)xcap_sizeof) {
|
||||
file_badread(ms);
|
||||
return -1;
|
||||
@@ -1046,12 +1046,12 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
|
||||
}
|
||||
|
||||
for ( ; num; num--) {
|
||||
if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (read(fd, xph_addr, xph_sizeof) == -1) {
|
||||
if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
|
||||
file_badread(ms);
|
||||
return -1;
|
||||
}
|
||||
@@ -1090,11 +1090,11 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
|
||||
* This is a PT_NOTE section; loop through all the notes
|
||||
* in the section.
|
||||
*/
|
||||
if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
|
||||
if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
|
||||
file_badseek(ms);
|
||||
return -1;
|
||||
}
|
||||
bufsize = read(fd, nbuf, ((xph_filesz < sizeof(nbuf)) ?
|
||||
bufsize = FINFO_READ_FUNC(fd, nbuf, ((xph_filesz < sizeof(nbuf)) ?
|
||||
xph_filesz : sizeof(nbuf)));
|
||||
if (bufsize == -1) {
|
||||
file_badread(ms);
|
||||
@@ -1156,7 +1156,7 @@ file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf,
|
||||
/*
|
||||
* If we cannot seek, it must be a pipe, socket or fifo.
|
||||
*/
|
||||
if((lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
|
||||
if((FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
|
||||
fd = file_pipe2file(ms, fd, buf, nbytes);
|
||||
|
||||
if (fstat(fd, &st) == -1) {
|
||||
|
||||
@@ -1654,29 +1654,6 @@ convert_libmagic_pattern(zval *pattern, int options)
|
||||
|
||||
for (i=0; i<Z_STRLEN_P(pattern); i++, j++) {
|
||||
switch (Z_STRVAL_P(pattern)[i]) {
|
||||
case '?':
|
||||
t[j] = '.';
|
||||
break;
|
||||
case '*':
|
||||
t[j++] = '.';
|
||||
t[j] = '*';
|
||||
break;
|
||||
case '.':
|
||||
t[j++] = '\\';
|
||||
t[j] = '.';
|
||||
break;
|
||||
case '\\':
|
||||
t[j++] = '\\';
|
||||
t[j] = '\\';
|
||||
break;
|
||||
case '(':
|
||||
t[j++] = '\\';
|
||||
t[j] = '(';
|
||||
break;
|
||||
case ')':
|
||||
t[j++] = '\\';
|
||||
t[j] = ')';
|
||||
break;
|
||||
case '~':
|
||||
t[j++] = '\\';
|
||||
t[j] = '~';
|
||||
@@ -1873,7 +1850,7 @@ magiccheck(struct magic_set *ms, struct magic *m)
|
||||
|
||||
convert_libmagic_pattern(pattern, options);
|
||||
|
||||
l = 0;
|
||||
l = v = 0;
|
||||
#if (PHP_MAJOR_VERSION < 6)
|
||||
if ((pce = pcre_get_compiled_regex_cache(Z_STRVAL_P(pattern), Z_STRLEN_P(pattern) TSRMLS_CC)) == NULL) {
|
||||
#else
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
--TEST--
|
||||
Bug #61964 (finfo_open with directory cause invalid free)
|
||||
--SKIPIF--
|
||||
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$magic_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
|
||||
|
||||
$ret = @finfo_open(FILEINFO_NONE, $magic_file . ".non-exits");
|
||||
var_dump($ret);
|
||||
|
||||
$dir = __DIR__ . "/test-folder";
|
||||
@mkdir($dir);
|
||||
|
||||
$magic_file_copy = $dir . "/magic.copy";
|
||||
$magic_file_copy2 = $magic_file_copy . "2";
|
||||
copy($magic_file, $magic_file_copy);
|
||||
copy($magic_file, $magic_file_copy2);
|
||||
|
||||
$ret = finfo_open(FILEINFO_NONE, $dir);
|
||||
var_dump($ret);
|
||||
|
||||
$ret = @finfo_open(FILEINFO_NONE, $dir);
|
||||
var_dump($ret);
|
||||
|
||||
$ret = @finfo_open(FILEINFO_NONE, $dir. "/non-exits-dir");
|
||||
var_dump($ret);
|
||||
|
||||
// write some test files to test folder
|
||||
file_put_contents($dir . "/test1.txt", "string\n> Core\n> Me");
|
||||
file_put_contents($dir . "/test2.txt", "a\nb\n");
|
||||
@mkdir($dir . "/test-inner-folder");
|
||||
|
||||
finfo_open(FILEINFO_NONE, $dir);
|
||||
echo "DONE: testing dir with files\n";
|
||||
|
||||
rmdir($dir . "/test-inner-folder");
|
||||
unlink($dir . "/test1.txt");
|
||||
unlink($dir . "/test2.txt");
|
||||
|
||||
unlink($magic_file_copy);
|
||||
unlink($magic_file_copy2);
|
||||
rmdir($dir);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
resource(%d) of type (file_info)
|
||||
resource(%d) of type (file_info)
|
||||
bool(false)
|
||||
|
||||
Notice: finfo_open(): Warning: offset `string' invalid in %sbug61964.php on line %d
|
||||
|
||||
Notice: finfo_open(): Warning: offset ` Core' invalid in %sbug61964.php on line %d
|
||||
|
||||
Notice: finfo_open(): Warning: type `Core' invalid in %sbug61964.php on line %d
|
||||
|
||||
Notice: finfo_open(): Warning: offset `a' invalid in %sbug61964.php on line %d
|
||||
|
||||
Notice: finfo_open(): Warning: type `a' invalid in %sbug61964.php on line %d
|
||||
|
||||
Notice: finfo_open(): Warning: offset `b' invalid in %sbug61964.php on line %d
|
||||
|
||||
Notice: finfo_open(): Warning: type `b' invalid in %sbug61964.php on line %d
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at '%stest-folder'. in %sbug61964.php on line %d
|
||||
DONE: testing dir with files
|
||||
===DONE===
|
||||
@@ -18,9 +18,11 @@ ksort($results);
|
||||
var_dump($results);
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(6) {
|
||||
array(7) {
|
||||
["%s/resources/dir.zip"]=>
|
||||
string(15) "application/zip"
|
||||
["%s/resources/test.awk"]=>
|
||||
string(10) "text/plain"
|
||||
["%s/resources/test.bmp"]=>
|
||||
string(14) "image/x-ms-bmp"
|
||||
["%s/resources/test.gif"]=>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
--TEST--
|
||||
Test finfo_file() function : regex rules
|
||||
--SKIPIF--
|
||||
<?php require_once(dirname(__FILE__) . '/skipif.inc');
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
die('skip.. only for Windows');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/**
|
||||
* Works with the unix file command:
|
||||
* $ file -m magic resources/test.awk
|
||||
* resources/test.awk: awk script, ASCII text
|
||||
*/
|
||||
$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
|
||||
$finfo = finfo_open( FILEINFO_MIME, $magicFile );
|
||||
|
||||
echo "*** Testing finfo_file() : regex rules ***\n";
|
||||
|
||||
// Calling finfo_file() with all possible arguments
|
||||
$file = __DIR__ . '/resources/test.awk';
|
||||
var_dump( finfo_file( $finfo, $file ) );
|
||||
var_dump( finfo_file( $finfo, $file, FILEINFO_CONTINUE ) );
|
||||
|
||||
// Windows uses libfileinfo 1.0.5-dev
|
||||
// this may be causing the slightly different output from the first
|
||||
// finfo_file() call
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
*** Testing finfo_file() : regex rules ***
|
||||
string(10) "text/plain"
|
||||
string(22) "awk script, ASCII text"
|
||||
===DONE===
|
||||
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Test finfo_file() function : regex rules
|
||||
--SKIPIF--
|
||||
<?php require_once(dirname(__FILE__) . '/skipif.inc');
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
die('skip.. only for Non Windows Systems');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/**
|
||||
* Works with the unix file command:
|
||||
* $ file -m magic resources/test.awk
|
||||
* resources/test.awk: awk script, ASCII text
|
||||
*/
|
||||
$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
|
||||
$finfo = finfo_open( FILEINFO_MIME, $magicFile );
|
||||
|
||||
echo "*** Testing finfo_file() : regex rules ***\n";
|
||||
|
||||
// Calling finfo_file() with all possible arguments
|
||||
$file = __DIR__ . '/resources/test.awk';
|
||||
var_dump( finfo_file( $finfo, $file ) );
|
||||
var_dump( finfo_file( $finfo, $file, FILEINFO_CONTINUE ) );
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
*** Testing finfo_file() : regex rules ***
|
||||
string(28) "text/plain; charset=us-ascii"
|
||||
string(22) "awk script, ASCII text"
|
||||
===DONE===
|
||||
@@ -19,23 +19,23 @@ bool(false)
|
||||
resource(%d) of type (file_info)
|
||||
resource(%d) of type (file_info)
|
||||
|
||||
Warning: finfo_open(%s/123): failed to open stream: No such file or directory in %s on line %d
|
||||
Warning: finfo_open(%s123): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(%s/123): failed to open stream: No such file or directory in %s on line %d
|
||||
Warning: finfo_open(%s123): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at '%s/123'. in %s on line %d
|
||||
Warning: finfo_open(): Failed to load magic database at '%s123'. in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo_open(%s/1): failed to open stream: No such file or directory in %s on line %d
|
||||
Warning: finfo_open(%s1): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(%s/1): failed to open stream: No such file or directory in %s on line %d
|
||||
Warning: finfo_open(%s1): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at '%s/1'. in %s on line %d
|
||||
Warning: finfo_open(): Failed to load magic database at '%s1'. in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo_open(/foo/bar/inexistent): failed to open stream: No such file or directory in %s on line %d
|
||||
Warning: finfo_open(%sinexistent): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(/foo/bar/inexistent): failed to open stream: No such file or directory in %s on line %d
|
||||
Warning: finfo_open(%sinexistent): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at '/foo/bar/inexistent'. in %s on line %d
|
||||
Warning: finfo_open(): Failed to load magic database at '%sinexistent'. in %s on line %d
|
||||
bool(false)
|
||||
@@ -0,0 +1,53 @@
|
||||
--TEST--
|
||||
Test finfo_open() function : error functionality
|
||||
--SKIPIF--
|
||||
<?php require_once(dirname(__FILE__) . '/skipif.inc');
|
||||
if(substr(PHP_OS, 0, 3) != 'WIN' )
|
||||
die("skip Not Valid for Linux");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : resource finfo_open([int options [, string arg]])
|
||||
* Description: Create a new fileinfo resource.
|
||||
* Source code: ext/fileinfo/fileinfo.c
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
|
||||
|
||||
echo "*** Testing finfo_open() : error functionality ***\n";
|
||||
|
||||
// on 5_4, this line generates additional warning messages that 5_3 does not. functionally, it should be fine (should pass)
|
||||
var_dump( finfo_open( FILEINFO_MIME, 'foobarfile' ) );
|
||||
var_dump( finfo_open( array(), $magicFile ) );
|
||||
var_dump( finfo_open( FILEINFO_MIME, $magicFile, 'extraArg' ) );
|
||||
var_dump( finfo_open( PHP_INT_MAX - 1, $magicFile ) );
|
||||
var_dump( finfo_open( 'foobar' ) );
|
||||
|
||||
var_dump( new finfo('foobar') );
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
*** Testing finfo_open() : error functionality ***
|
||||
|
||||
Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %sfinfo_open_error-win32.php on line %d
|
||||
|
||||
Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %sfinfo_open_error-win32.php on line %d
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at '%sfoobarfile'. in %sfinfo_open_error-win32.php on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo_open() expects parameter 1 to be long, array given in %sfinfo_open_error-win32.php on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo_open() expects at most 2 parameters, 3 given in %sfinfo_open_error-win32.php on line %d
|
||||
bool(false)
|
||||
resource(6) of type (file_info)
|
||||
|
||||
Warning: finfo_open() expects parameter 1 to be long, string given in %sfinfo_open_error-win32.php on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo::finfo() expects parameter 1 to be long, string given in %sfinfo_open_error-win32.php on line %d
|
||||
NULL
|
||||
===DONE===
|
||||
@@ -1,7 +1,10 @@
|
||||
--TEST--
|
||||
Test finfo_open() function : error functionality
|
||||
--SKIPIF--
|
||||
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
||||
<?php require_once(dirname(__FILE__) . '/skipif.inc');
|
||||
if(substr(PHP_OS, 0, 3) == 'WIN' )
|
||||
die("skip Not Valid for Windows");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : resource finfo_open([int options [, string arg]])
|
||||
@@ -27,11 +30,11 @@ var_dump( new finfo('foobar') );
|
||||
--EXPECTF--
|
||||
*** Testing finfo_open() : error functionality ***
|
||||
|
||||
Warning: finfo_open(%s/foobarfile): failed to open stream: No such file or directory in %s on line %d
|
||||
Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(%s/foobarfile): failed to open stream: No such file or directory in %s on line %d
|
||||
Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at '%s/foobarfile'. in %s on line %d
|
||||
Warning: finfo_open(): Failed to load magic database at '%sfoobarfile'. in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo_open() expects parameter 1 to be long, array given in %s on line %d
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
BEGIN { print "START" }
|
||||
@@ -1,7 +1,13 @@
|
||||
--TEST--
|
||||
Bug #52209 (INPUT_ENV returns NULL for set variables (CLI))
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("filter") || !empty($_ENV['PWD'])) die("skip"); ?>
|
||||
<?php
|
||||
/* This test makes no sense on windows as an empty variable
|
||||
would never show up in the "set" list. Which means, it's
|
||||
always undefined in PHP. */
|
||||
if(substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows");
|
||||
if (!extension_loaded("filter") || !empty($_ENV['PWD'])) die("skip");
|
||||
?>
|
||||
--INI--
|
||||
variables_order=GPCSE
|
||||
--FILE--
|
||||
|
||||
@@ -10,10 +10,22 @@ Bug #48555 (ImageFTBBox() differs from previous versions for texts with new line
|
||||
$cwd = dirname(__FILE__);
|
||||
$font = "$cwd/Tuffy.ttf";
|
||||
$box = ImageFTBBox(14, 0, $font, "Text without line-break");
|
||||
echo 'Top without line-break: ' . $box[7] . "\n";
|
||||
//echo 'Top without line-break: ' . $box[7] . "\n";
|
||||
$without_line_break = $box[7];
|
||||
$box = ImageFTBBox(14, 0, $font, "Text with\nline-break\none more");
|
||||
echo 'Top with line-break: ' . $box[7] . "\n";
|
||||
//echo 'Top with line-break: ' . $box[7] . "\n";
|
||||
$with_line_break = $box[7];
|
||||
|
||||
var_dump($without_line_break);
|
||||
var_dump($with_line_break);
|
||||
if ($with_line_break==$without_line_break) {
|
||||
echo "with line break == without line break".PHP_EOL;
|
||||
} else {
|
||||
echo "with line break != without line break".PHP_EOL;
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Top without line-break: -14
|
||||
Top with line-break: -14
|
||||
int(-%d)
|
||||
int(-%d)
|
||||
with line break == without line break
|
||||
@@ -0,0 +1,90 @@
|
||||
--TEST--
|
||||
gmp_gcdext() basic tests
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("gmp")) print "skip";
|
||||
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
|
||||
die('skip windows only test');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$n = gmp_init("34293864345");
|
||||
$n1 = gmp_init("23434293864345");
|
||||
|
||||
$a = array(
|
||||
array(123,45),
|
||||
array(4341,9734),
|
||||
array(23487,333),
|
||||
array(-234234,-123123),
|
||||
array(-100,-2234),
|
||||
array(345,"34587345"),
|
||||
array(345,"0"),
|
||||
array("345556456",345873),
|
||||
array("34545345556456","323432445873"),
|
||||
array($n, $n1),
|
||||
);
|
||||
|
||||
foreach ($a as $val) {
|
||||
$r = gmp_gcdext($val[0],$val[1]);
|
||||
var_dump(gmp_strval($r['g']));
|
||||
var_dump(gmp_strval($r['s']));
|
||||
var_dump(gmp_strval($r['t']));
|
||||
}
|
||||
|
||||
var_dump(gmp_gcdext($val[0],array()));
|
||||
var_dump(gmp_gcdext(array(),array()));
|
||||
var_dump(gmp_gcdext(array(),array(),1));
|
||||
var_dump(gmp_gcdext(array()));
|
||||
var_dump(gmp_gcdext());
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(1) "3"
|
||||
string(2) "41"
|
||||
string(4) "-112"
|
||||
string(1) "1"
|
||||
string(4) "-805"
|
||||
string(3) "359"
|
||||
string(1) "3"
|
||||
string(2) "32"
|
||||
string(5) "-2257"
|
||||
string(4) "3003"
|
||||
string(3) "-10"
|
||||
string(2) "19"
|
||||
string(1) "2"
|
||||
string(2) "67"
|
||||
string(2) "-3"
|
||||
string(2) "15"
|
||||
string(7) "-601519"
|
||||
string(1) "6"
|
||||
string(3) "345"
|
||||
string(1) "1"
|
||||
string(1) "0"
|
||||
string(1) "1"
|
||||
string(5) "84319"
|
||||
string(9) "-84241831"
|
||||
string(1) "1"
|
||||
string(12) "167180205823"
|
||||
string(15) "-17856272782919"
|
||||
string(3) "195"
|
||||
string(15) "-23387298979862"
|
||||
string(11) "34225091793"
|
||||
|
||||
Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: gmp_gcdext() expects exactly 2 parameters, 3 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: gmp_gcdext() expects exactly 2 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: gmp_gcdext() expects exactly 2 parameters, 0 given in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
--TEST--
|
||||
gmp_gcdext() basic tests
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("gmp")) print "skip"; ?>
|
||||
<?php if (!extension_loaded("gmp")) print "skip";
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
die('skip.. only for Non Windows Systems');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
--TEST--
|
||||
gmp_nextprime()
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("gmp")) print "skip";
|
||||
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
|
||||
die('skip windows only test');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$n = gmp_nextprime(-1);
|
||||
var_dump(gmp_strval($n));
|
||||
$n = gmp_nextprime(0);
|
||||
var_dump(gmp_strval($n));
|
||||
$n = gmp_nextprime(-1000);
|
||||
var_dump(gmp_strval($n));
|
||||
$n = gmp_nextprime(1000);
|
||||
var_dump(gmp_strval($n));
|
||||
$n = gmp_nextprime(100000);
|
||||
var_dump(gmp_strval($n));
|
||||
$n = gmp_nextprime(array());
|
||||
var_dump(gmp_strval($n));
|
||||
$n = gmp_nextprime("");
|
||||
var_dump(gmp_strval($n));
|
||||
$n = gmp_nextprime(new stdclass());
|
||||
var_dump(gmp_strval($n));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(1) "2"
|
||||
string(1) "2"
|
||||
string(4) "-997"
|
||||
string(4) "1009"
|
||||
string(6) "100003"
|
||||
|
||||
Warning: gmp_nextprime(): Unable to convert variable to GMP - wrong type in %s on line %d
|
||||
string(1) "0"
|
||||
string(1) "0"
|
||||
|
||||
Warning: gmp_nextprime(): Unable to convert variable to GMP - wrong type in %s on line %d
|
||||
string(1) "0"
|
||||
Done
|
||||
|
||||
Loaded 100 of 679 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user