Commit 220cc23
committed
Bug 1966443: Ignore NULs in clipboard paste and DND drop operations r=stransky,geckoview-reviewers,mac-reviewers,bradwerth,tcampbell
Windows and GTK null-terminate text flavors in clipboard and DND operations.
For other platforms, it sanitizes text to ensure that there are no surprise
NUL characters in it, since NSStrings and Java strings in general can.
On a related note, GTK expects text to be obtained with gtk_selection_data_get_text,
not gtk_selection_data_get_data (and it guarantees null-termination), so
this patch makes that change as well.
Differential Revision: https://phabricator.services.mozilla.com/D2568771 parent 9e6fb6b commit 220cc23
File tree
5 files changed
+31
-14
lines changed- widget
- android
- cocoa
- gtk
5 files changed
+31
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
| 223 | + | |
223 | 224 | | |
224 | | - | |
| 225 | + | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1664 | 1664 | | |
1665 | 1665 | | |
1666 | 1666 | | |
1667 | | - | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
1668 | 1671 | | |
1669 | 1672 | | |
1670 | 1673 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 251 | + | |
255 | 252 | | |
256 | 253 | | |
257 | 254 | | |
| |||
1574 | 1571 | | |
1575 | 1572 | | |
1576 | 1573 | | |
1577 | | - | |
1578 | | - | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
1579 | 1583 | | |
1580 | 1584 | | |
1581 | 1585 | | |
| |||
2341 | 2345 | | |
2342 | 2346 | | |
2343 | 2347 | | |
2344 | | - | |
2345 | | - | |
2346 | | - | |
2347 | | - | |
| 2348 | + | |
2348 | 2349 | | |
2349 | 2350 | | |
2350 | 2351 | | |
| |||
2989 | 2990 | | |
2990 | 2991 | | |
2991 | 2992 | | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
2992 | 3001 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
0 commit comments