xclip icon indicating copy to clipboard operation
xclip copied to clipboard

Do not dereference garbage pointers in sel_buf (doOut)

Open jamesjer opened this issue 3 years ago • 1 comments

We've been seeing segfaults in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1947285. An analysis of the bug is available at that URL. Briefly, sel_buf contains garbage bytes when the while loop is entered, and those bytes can be dereferenced or passed to free().

jamesjer avatar Jun 10 '21 18:06 jamesjer

Worth noting that this solution solves the problem described in PR #117 , but in a way that doesn't break the pathing where sel_buf has data that needs to be freed.

spotrh avatar Jun 10 '21 19:06 spotrh