summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorray <ray@openbsd.org>2006-12-16 06:18:35 +0000
committerray <ray@openbsd.org>2006-12-16 06:18:35 +0000
commitd2336aa48ef5dea4cbaff0002144014e26b9a8da (patch)
treedfdfb8e9d9b5eadd15163bf61df7d86e1893263b
parentacpi can fit onto the cd ramdisks (diff)
downloadwireguard-openbsd-d2336aa48ef5dea4cbaff0002144014e26b9a8da.tar.xz
wireguard-openbsd-d2336aa48ef5dea4cbaff0002144014e26b9a8da.zip
strlen fix.
OK jaredy@ and millert@.
-rw-r--r--lib/libkeynote/signature.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkeynote/signature.c b/lib/libkeynote/signature.c
index 7019b4ec37e..5c3919cc55e 100644
--- a/lib/libkeynote/signature.c
+++ b/lib/libkeynote/signature.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signature.c,v 1.17 2004/06/29 11:35:56 msf Exp $ */
+/* $OpenBSD: signature.c,v 1.18 2006/12/16 06:18:35 ray Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@@ -1150,7 +1150,7 @@ kn_sign_assertion(char *buf, int buflen, char *key, char *sigalg, int vflag)
return (char *) NULL;
}
- if (sigalg[strlen(sigalg) - 1] != ':')
+ if (sigalg[0] == '\0' || sigalg[strlen(sigalg) - 1] != ':')
{
keynote_errno = ERROR_SYNTAX;
return (char *) NULL;