summaryrefslogtreecommitdiff
path: root/usr.bin/signify/signify.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-01-15 22:21:02 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-01-15 22:21:02 +0000
commit7766ea8762107fdcb5c6a2b6224abf19709404b6 (patch)
tree85f7193e3777a3cbfdf9bd390035e0cc4191334a /usr.bin/signify/signify.c
parentf0651ca00567a3afe5c6f3388b1dbe6b1ce5d2df (diff)
use PATH_MAX for path buffers. in case, you know...
Diffstat (limited to 'usr.bin/signify/signify.c')
-rw-r--r--usr.bin/signify/signify.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c
index 861bbac82dd..7ef990d9ad7 100644
--- a/usr.bin/signify/signify.c
+++ b/usr.bin/signify/signify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signify.c,v 1.97 2015/01/09 21:49:59 tedu Exp $ */
+/* $OpenBSD: signify.c,v 1.98 2015/01/15 22:21:01 tedu Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -19,6 +19,7 @@
#include <netinet/in.h>
#include <resolv.h>
+#include <limits.h>
#include <stdint.h>
#include <fcntl.h>
#include <string.h>
@@ -507,7 +508,7 @@ verify(const char *pubkeyfile, const char *msgfile, const char *sigfile,
#ifndef VERIFYONLY
#define HASHBUFSIZE 224
struct checksum {
- char file[1024];
+ char file[PATH_MAX];
char hash[HASHBUFSIZE];
char algo[32];
};
@@ -647,7 +648,7 @@ main(int argc, char **argv)
{
const char *pubkeyfile = NULL, *seckeyfile = NULL, *msgfile = NULL,
*sigfile = NULL;
- char sigfilebuf[1024];
+ char sigfilebuf[PATH_MAX];
const char *comment = "signify";
int ch, rounds;
int embedded = 0;