diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-03-16 20:17:11 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-03-16 20:17:11 +0000 |
commit | ec6070143ee16c62f606a467de0b7bbe120c8101 (patch) | |
tree | 0f99bde4d8736a999c06ffb3f13bd363af155b60 /usr.bin/signify/signify.c | |
parent | b77a30dd4c51405106e1e59f2acaeaeb336f634f (diff) |
grow buffer faster
Diffstat (limited to 'usr.bin/signify/signify.c')
-rw-r--r-- | usr.bin/signify/signify.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c index fee496f7dfb..a6b1addbe35 100644 --- a/usr.bin/signify/signify.c +++ b/usr.bin/signify/signify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signify.c,v 1.54 2014/03/16 18:12:08 tedu Exp $ */ +/* $OpenBSD: signify.c,v 1.55 2014/03/16 20:17:10 tedu Exp $ */ /* * Copyright (c) 2013 Ted Unangst <tedu@openbsd.org> * @@ -189,7 +189,7 @@ readmsg(const char *filename, unsigned long long *msglenp) while (1) { if (space == 0) { - space = chunklen; + space = msglen + chunklen; if (!(msg = realloc(msg, msglen + space + 1))) errx(1, "realloc"); } |