Closed Bug 1460810 Opened 2 years ago Closed 2 years ago

[Wayland] - Segfault while pasting text

Categories

(Core :: Widget: Gtk, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: evan, Assigned: evan)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20180405092205

Steps to reproduce:

When Firefox is built with Wayland support, I consistently get a crash if I try to paste text on hangouts.google.com. I previously reported this issue in bug #1438136.

Attached is a patch that I generated to avoid the segfault. The issue is pretty simple, related to mixing signed/unsigned types. Note that pasting is still broken for me with this patch applied, this just prevents Firefox from segfaulting.

This is my first patch, I'm not really familiar with the process to get this merged.
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Attachment #8974902 - Flags: review?(stransky)
Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Assignee: nobody → stransky
Comment on attachment 8974902 [details] [diff] [review]
wayland-paste.patch

Yes, I see that, Thanks. gtk_selection_data_get_length() returns -1 when there's no selection available.
Attachment #8974902 - Flags: review?(stransky) → review+
Assignee: stransky → evan
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: checkin-needed
Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c3b4294017c
[Gtk/Wayland] Handle error value (-1) returned by gtk_section_data_get_length(), r=stransky
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8c3b4294017c
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.