False read from a previous write and segmentation fault on a second read · Issue #113 · astrand/xclip · GitHub
Skip to content

False read from a previous write and segmentation fault on a second read #113

Open

Description

@changkun

Version: 11cba613840b0d0e76dc2ea6d4ec7cc5f23daf88

$ echo test > x.txt
$ cat x.txt
test
$ cat x.txt | xclip -in -selection clipboard
$ xclip -out -selection clipboard -t image/png
test
$ xclip -out -selection clipboard -t image/png
[1]    619206 segmentation fault (core dumped)  xclip -out -selection clipboard -t image/png

Version 0.13:

$ echo test > x.txt
$ cat x.txt
test
$ cat x.txt | xclip -in -selection clipboard
$ xclip -out -selection clipboard -t image/png
test
$ xclip -out -selection clipboard -t image/png
test

Explaination:

The -t option does not work with -in when specifying inputs.
An input by default as text but can be read as image/png TARGET.

Expect:

$ echo test > x.txt
$ cat x.txt
test
$ cat x.txt | xclip -in -selection clipboard
$ xclip -out -selection clipboard -t image/png
Error: target image/png not available
$ xclip -out -selection clipboard -t image/png
Error: target image/png not available

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions