summaryrefslogtreecommitdiff
path: root/usr.bin/signify/signify.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-03-16 22:43:14 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-03-16 22:43:14 +0000
commit9c80d20b9f590b645f0238bae37adc5520223789 (patch)
tree7db510ed413fc88af8604c853981c5ef6b2b9011 /usr.bin/signify/signify.c
parent8d9f27e5030cf6130f84c689e1800a29826944c0 (diff)
oops, forgot the err function here. noticed by Henri Kemppainen
Diffstat (limited to 'usr.bin/signify/signify.c')
-rw-r--r--usr.bin/signify/signify.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c
index 0a40c46ec28..4f5180b0400 100644
--- a/usr.bin/signify/signify.c
+++ b/usr.bin/signify/signify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signify.c,v 1.56 2014/03/16 22:01:35 tedu Exp $ */
+/* $OpenBSD: signify.c,v 1.57 2014/03/16 22:43:13 tedu Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -382,7 +382,8 @@ sign(const char *seckeyfile, const char *msgfile, const char *sigfile,
memcpy(sig.pkalg, PKALG, 2);
if ((secname = strstr(seckeyfile, ".sec")) && strlen(secname) == 4) {
if (snprintf(sigcomment, sizeof(sigcomment), VERIFYWITH "%.*s.pub",
- (int)strlen(seckeyfile) - 4, seckeyfile) >= sizeof(sigcomment));
+ (int)strlen(seckeyfile) - 4, seckeyfile) >= sizeof(sigcomment))
+ err(1, "comment too long");
} else {
if (snprintf(sigcomment, sizeof(sigcomment), "signature from %s",
comment) >= sizeof(sigcomment))