aboutsummaryrefslogtreecommitdiffstats
path: root/g10/build-packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/build-packet.c')
-rw-r--r--g10/build-packet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c
index 1235a451e..e39756dac 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -800,11 +800,12 @@ build_sig_subpkt (PKT_signature *sig, sigsubpkttype_t type,
}
else if (oldarea) {
newarea = m_realloc (oldarea, sizeof (*newarea) + n - 1);
- newarea->size = sizeof (*newarea) + n - 1;
+ newarea->size = n;
/*log_debug ("reallocating area for type %d\n", type );*/
}
else {
newarea = m_alloc (sizeof (*newarea) + n - 1);
+ newarea->size = n;
/*log_debug ("allocating area for type %d\n", type );*/
}
newarea->len = n;