Package: markdown
Version: 1.0.1-10.1
Severity: important

markdown(1) does various funny things if a filename contains characters
that are not usually used in filenames:

$ echo a > '>t0'
$ ls -l
total 4
-rw-rw-r-- 1 zefram zefram 2 Jul 16 23:20 '>t0'
$ markdown '>t0'
$ ls -l
total 4
-rw-rw-r-- 1 zefram zefram 2 Jul 16 23:20 '>t0'
-rw-rw-r-- 1 zefram zefram 0 Jul 16 23:20  t0
$ echo b > 't1 '
$ markdown 't1 '
Can't open t1 : No such file or directory at /usr/bin/markdown line 221.
$

These arise from its use of the <> Perl operator, which is not suitable
for the implementation of a read-from-list-of-files kind of command.
Because the range of misbehaviour includes writing to arbitrary files
and running arbitrary commands, this is a more severe bug than normal.

-zefram

Reply via email to