Description: Exit with a non-zero exit code if the input file cannot be opened
Author: Chris Lamb <lamby@debian.org>
Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=886032;filename=markdown.diff.txt;msg=5
Bug-Debian: https://bugs.debian.org/886032
Forwarded: no
Reviewed-by: Matt Kraai <kraai@debian.org>
Last-Update: 2018-01-01
---
 Markdown.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Markdown.pl b/Markdown.pl
index 9264381..b07c9c8 100755
--- a/Markdown.pl
+++ b/Markdown.pl
@@ -218,7 +218,7 @@ elsif (! $g_perl_module) {
 		my $text;
 		{
 			local $/;               # Slurp the whole file
-			$text = <>;
+			defined($text = <>) or exit 2;
 		}
         print Markdown($text);
     }
-- 
2.43.0

