diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2006-12-16 06:18:36 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2006-12-16 06:18:36 +0000 |
commit | fdfc0807cb0b853b58666cfa2d7e289f2fa32dea (patch) | |
tree | 65f01fd68bbfb0e7144e8323a04623508f0d30d7 /lib/libkeynote | |
parent | 218b6b3fd2dabd98931a02214380592b8713ab03 (diff) |
strlen fix.
OK jaredy@ and millert@.
Diffstat (limited to 'lib/libkeynote')
-rw-r--r-- | lib/libkeynote/signature.c | 4 |
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; |