After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738314 - Avoid crash if SelectionRequest gets through external means
Avoid crash if SelectionRequest gets through external means
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: st
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-10-10 17:18 UTC by Carlos Garnacho
Modified: 2014-10-10 17:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
st: Bail out on clipboard requests if there is no text. (967 bytes, patch)
2014-10-10 17:18 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2014-10-10 17:18:32 UTC
On bug #738312 I've been playing with X11/wayland clipboard interoperation. These patches however make gnome-shell crash whenever a SelectionRequest event is received, but no text is stored. I'm attaching a simple patch to bail out on handling SelectionRequest if there is no text.
Comment 1 Carlos Garnacho 2014-10-10 17:18:59 UTC
Created attachment 288242 [details] [review]
st: Bail out on clipboard requests if there is no text.

If a selection request happens through foreign means, the selected
text is NULL, and a crash happens.
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-10-10 17:22:43 UTC
Review of attachment 288242 [details] [review]:

Looks good to me.
Comment 3 Carlos Garnacho 2014-10-10 17:39:01 UTC
Attachment 288242 [details] pushed as eaec459 - st: Bail out on clipboard requests if there is no text.