When I copy some text from a github commit inside Chrome,
the selection cannot be converted to text.
When I run xclip -o with that selection in the paste buffer,
I get a segmentation fault because free is being called with
an invalid argument (presumably because xcout isn't setting the
sel_buf pointer correctly on error).
When I copy some text from a github commit inside Chrome, the selection cannot be converted to text. When I run
xclip -o
with that selection in the paste buffer, I get a segmentation fault becausefree
is being called with an invalid argument (presumably because xcout isn't setting thesel_buf
pointer correctly on error).To fix this, remove the call to
free
in the error case, as it isn't really necessary anyway as the program is about to exit.When the
free
call is removed,xclip
prints this error instead of seg-faulting: