From: Christian Grothoff Date: Sun, 27 Mar 2011 14:26:14 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~18888 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7654b33afa6a06c925dde3d12f2e70e0ed1ae6eb;hp=816b7a1abcc0a5e6665273958101e3c95447e56b;p=oweals%2Fgnunet.git fix --- diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 80b9c4f11..eec4adeea 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c @@ -630,6 +630,7 @@ handle_p2p_reply (void *cls, struct PutMessage *pm; size_t msize; + GNUNET_assert (data_len < GNUNET_SERVER_MAX_MESSAGE_SIZE); prd = GSF_pending_request_get_data_ (pr); if (NULL == data) { @@ -665,7 +666,7 @@ handle_p2p_reply (void *cls, GNUNET_break (0); return; } - pm = GNUNET_malloc (sizeof (msize)); + pm = GNUNET_malloc (msize); pm->header.type = htons (GNUNET_MESSAGE_TYPE_FS_PUT); pm->header.size = htons (msize); pm->type = htonl (type);