Package: unrar
Version: 1:5.3.2-1
Severity: normal
Dear Maintainer,
In short: I automatically sent invalid input to the file-overwrite-prompt,
crashing it.
What led up to the situation?
touch b
rar a b.rar b
Now I was copy pasting something like the following command (everthing between
the quotes) into xfce4-terminal:
"unrar x b.rar
e12345678901234567890123456789012345678901234567
0123456789012345678901234567890
"
Note that the clipboard should contain the last newline / linefeed, also the
'e' at the beginning seems to be important, the numbers are not. Now I get the
following output:
UNRAR 5.30 beta 2 freeware Copyright (c) 1993-2015 Alexander Roshal
Extracting from b.rar
Would you like to replace the existing file b
0 bytes, modified on 2016-11-05 05:19
with a new one
0 bytes, modified on 2016-11-05 05:19
[Y]es, [N]o, [A]ll, n[E]ver, [R]ename, [Q]uit
No files to extract
Segmentation fault
When increasing the clipboard to the output changes, e.g.:
"unrar x b.rar
e12345678901234567890123456789012345678901234567
012345678901234567890123456789012345678901234567
"
results in:
UNRAR 5.30 beta 2 freeware Copyright (c) 1993-2015 Alexander Roshal
Extracting from b.rar
Would you like to replace the existing file b
0 bytes, modified on 2016-11-05 05:19
with a new one
0 bytes, modified on 2016-11-05 05:19
[Y]es, [N]o, [A]ll, n[E]ver, [R]ename, [Q]uit
No files to extract
Fatal error: glibc detected an invalid stdio handle
Aborted
It seems to me that the additional two lines after the command are being sent
to the prompt and effectively fuzzying it. Indeed the problem can be reproduced
like this:
echo "e12345678901234567890123456789012345678901234567
012345678901234567890123456789012345678901234567
" | unrar x b.rar
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (950, 'testing'), (54, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.5.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages unrar depends on:
ii libc6 2.24-5
ii libgcc1 1:6.2.0-10
ii libstdc++6 6.2.0-10
unrar recommends no packages.
unrar suggests no packages.
-- no debconf information