diff -u markdown-1.0.1/Markdown.pl markdown-1.0.1/Markdown.pl --- markdown-1.0.1/Markdown.pl +++ markdown-1.0.1/Markdown.pl @@ -218,7 +218,7 @@ my $text; { local $/; # Slurp the whole file - $text = <>; + defined($text = <>) or exit 2; } print Markdown($text); } diff -u markdown-1.0.1/debian/changelog markdown-1.0.1/debian/changelog --- markdown-1.0.1/debian/changelog +++ markdown-1.0.1/debian/changelog @@ -1,3 +1,10 @@ +markdown (1.0.1-10) unstable; urgency=medium + + * Exit with a non-zero exit code if the input file cannot be opened, + thanks to Chris Lamb, closes: #886032. + + -- Matt Kraai Mon, 01 Jan 2018 16:09:01 -0800 + markdown (1.0.1-9) unstable; urgency=medium * Seed the random number generator with the SOURCE_DATE_EPOCH