]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Do not crash if input is redirected from /dev/null.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 5 Jul 2010 06:32:00 +0000 (08:32 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 5 Jul 2010 06:32:00 +0000 (08:32 +0200)
src/certtool-cfg.c

index d6988ecbf0f5c849ca18921c699fc1e86928f3e3..41bcc17b4a12d13369fc77a5c4aaa5877728bc32 100644 (file)
@@ -250,6 +250,10 @@ read_int_with_default (const char *input_str, int def)
 
   printf (input_str, def);
   in = readline ("");
+  if (in == NULL)
+    {
+      return def;
+    }
 
   l = strtol (in, &endptr, 0);