summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/readconf.c b/readconf.c
index 9c5638b07..d7011d7f7 100644
--- a/readconf.c
+++ b/readconf.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: readconf.c,v 1.14 2000/05/09 01:03:01 damien Exp $"); 17RCSID("$Id: readconf.c,v 1.15 2000/05/30 03:44:53 damien Exp $");
18 18
19#include "ssh.h" 19#include "ssh.h"
20#include "cipher.h" 20#include "cipher.h"
@@ -464,6 +464,8 @@ parse_int:
464 case oCipher: 464 case oCipher:
465 intptr = &options->cipher; 465 intptr = &options->cipher;
466 cp = strtok(NULL, WHITESPACE); 466 cp = strtok(NULL, WHITESPACE);
467 if (!cp)
468 fatal("%.200s line %d: Missing argument.", filename, linenum);
467 value = cipher_number(cp); 469 value = cipher_number(cp);
468 if (value == -1) 470 if (value == -1)
469 fatal("%.200s line %d: Bad cipher '%s'.", 471 fatal("%.200s line %d: Bad cipher '%s'.",
@@ -474,6 +476,8 @@ parse_int:
474 476
475 case oCiphers: 477 case oCiphers:
476 cp = strtok(NULL, WHITESPACE); 478 cp = strtok(NULL, WHITESPACE);
479 if (!cp)
480 fatal("%.200s line %d: Missing argument.", filename, linenum);
477 if (!ciphers_valid(cp)) 481 if (!ciphers_valid(cp))
478 fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.", 482 fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.",
479 filename, linenum, cp ? cp : "<NONE>"); 483 filename, linenum, cp ? cp : "<NONE>");
@@ -484,6 +488,8 @@ parse_int:
484 case oProtocol: 488 case oProtocol:
485 intptr = &options->protocol; 489 intptr = &options->protocol;
486 cp = strtok(NULL, WHITESPACE); 490 cp = strtok(NULL, WHITESPACE);
491 if (!cp)
492 fatal("%.200s line %d: Missing argument.", filename, linenum);
487 value = proto_spec(cp); 493 value = proto_spec(cp);
488 if (value == SSH_PROTO_UNKNOWN) 494 if (value == SSH_PROTO_UNKNOWN)
489 fatal("%.200s line %d: Bad protocol spec '%s'.", 495 fatal("%.200s line %d: Bad protocol spec '%s'.",
@@ -691,7 +697,7 @@ void
691fill_default_options(Options * options) 697fill_default_options(Options * options)
692{ 698{
693 if (options->forward_agent == -1) 699 if (options->forward_agent == -1)
694 options->forward_agent = 1; 700 options->forward_agent = 0;
695 if (options->forward_x11 == -1) 701 if (options->forward_x11 == -1)
696 options->forward_x11 = 0; 702 options->forward_x11 = 0;
697 if (options->gateway_ports == -1) 703 if (options->gateway_ports == -1)