diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-08 20:58:01 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-08 20:58:01 +0000 |
commit | 122792815124040db93ccf704d9c62b7c9a3fb77 (patch) | |
tree | 4daaca9369e0bebb713a90dd859c70df8f8cadb5 | |
parent | 3ab2dc907ca80824db9ce5b94d203eb3992deba2 (diff) |
off by one in key too long detection
-rw-r--r-- | usr.sbin/bgpd/parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 08df1ccb395..91647e5b16f 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.109 2004/05/08 20:56:10 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.110 2004/05/08 20:58:00 henning Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1565,7 +1565,7 @@ str2key(char *s, char *dest, size_t max_len) unsigned i; char t[3]; - if (strlen(s) / 2 >= max_len) { + if (strlen(s) / 2 > max_len) { yyerror("key too long"); return (-1); } |