Commit 5fa4e6f
Fix some color related crashes in libgd
Summary:
Various paths use the color as an index into a 256 element table
without checking it, and passing -7 as a color to imageline would
unconditionally cause it to treat the image as truecolor, seg-faulting
if it wasn't.
Reviewed By: alexmalyshev
Differential Revision: D3658241
fbshipit-source-id: 0f4a9f32dce0a733b5749451b239badd0bfc4d491 parent c097912 commit 5fa4e6f
File tree
7 files changed
+30
-4
lines changed- hphp
- runtime/ext/gd
- libgd
- test/slow/ext_gd
7 files changed
+30
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3891 | 3891 | | |
3892 | 3892 | | |
3893 | 3893 | | |
3894 | | - | |
3895 | | - | |
3896 | | - | |
| 3894 | + | |
| 3895 | + | |
3897 | 3896 | | |
3898 | 3897 | | |
3899 | 3898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1014 | 1020 | | |
1015 | 1021 | | |
1016 | 1022 | | |
| |||
1284 | 1290 | | |
1285 | 1291 | | |
1286 | 1292 | | |
| 1293 | + | |
| 1294 | + | |
1287 | 1295 | | |
1288 | 1296 | | |
1289 | 1297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
| 669 | + | |
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| 673 | + | |
| 674 | + | |
673 | 675 | | |
674 | 676 | | |
675 | 677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1818 | 1818 | | |
1819 | 1819 | | |
1820 | 1820 | | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
1821 | 1825 | | |
1822 | 1826 | | |
1823 | 1827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments