aboutsummaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/parse-packet.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index bdf68c551..b1d1e17df 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -1245,11 +1245,8 @@ parse_signature( IOBUF inp, int pkttype, unsigned long pktlen,
goto leave;
}
if( n ) {
- /* we add 8 extra bytes so that we have space for the signature
- * status cache. Well we are wasting this if there is a cache
- * packet already, but in the other case it avoids an realloc */
- sig->unhashed = m_alloc (sizeof(*sig->unhashed) + n + 8 - 1 );
- sig->unhashed->size = n + 8;
+ sig->unhashed = m_alloc (sizeof(*sig->unhashed) + n - 1 );
+ sig->unhashed->size = n;
sig->unhashed->len = n;
if( iobuf_read(inp, sig->unhashed->data, n ) != n ) {
log_error("premature eof while reading "