aboutsummaryrefslogtreecommitdiff
path: root/src/util/container_meta_data.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-10-09 14:09:48 +0000
committerChristian Grothoff <christian@grothoff.org>2014-10-09 14:09:48 +0000
commita3f8f3168da5fe5599aaf110e308d763e748b2ef (patch)
treef68cda6e3f083ed404ea7bbeda51025e9c2a1cf4 /src/util/container_meta_data.c
parent418a0a7494b42f6fb3b3fd0b080969199fe6cb28 (diff)
-fix #3550
Diffstat (limited to 'src/util/container_meta_data.c')
-rw-r--r--src/util/container_meta_data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c
index ea1172d562..2e9efea1a6 100644
--- a/src/util/container_meta_data.c
+++ b/src/util/container_meta_data.c
@@ -1047,7 +1047,8 @@ GNUNET_CONTAINER_meta_data_deserialize (const char *input, size_t size)
ic = ntohl (hdr.entries);
dataSize = ntohl (hdr.size);
- if ((sizeof (struct MetaDataEntry) * ic) > dataSize)
+ if ( ((sizeof (struct MetaDataEntry) * ic) > dataSize) ||
+ (dataSize / ic < sizeof (struct MetaDataEntry)) )
{
GNUNET_break_op (0);
return NULL;