diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-07-01 17:38:17 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-07-01 17:39:41 +0200 |
| commit | c5556291624eec58ed9de186474dfcc858dca691 (patch) | |
| tree | 74581654f511f35afed65984b08c5dbbd1191fa8 /documentation | |
| parent | 42c27da73582cc126c7a621e9f15aca7d359060a (diff) | |
Fix "Segfault if using very large selections" (issue #451)
- Fix reading the size (aka "lower bound") of selection data.
- Use Fl::fatal() to terminate the process if memory for the selection
(aka clipboard) data can't be allocated. This should rarely
happen but if it does this is at least a "clean" exit and does
not overwrite arbitrary data waiting for later errors that are
hard to debug (as the old code would have done).
Todo: find a better solution because this can be caused by
another faulty process (the "selection owner"). It would be good
if we could ignore the transfer rather than killing the process.
- Continue processing the INCR protocol if another "unexpected" event
is received. Such events can definitely happen but the current code
can't deal with this because other events might cause recursions.
Hence such events are currently ignored.
Example: pressing and holding ctrl/v would trigger another clipboard
transfer while we're still processing one.
Todo: maybe process "other" events correctly while processing the INCR
protocol. The current processing is done inside a function and would
need to call fl_handle() with potential recursions, hence this would
likely need major refactoring.
Diffstat (limited to 'documentation')
0 files changed, 0 insertions, 0 deletions
