aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_uri.c
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2010-06-25 17:09:22 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2010-06-25 17:09:22 +0000
commita8cde9fa2959d200352c14208edec90aa0125999 (patch)
tree7981195bd6888c66134b59e2ff0478559e1e9498 /src/fs/fs_uri.c
parent94197a7bfd4f85255d0eeecf66f8c0bff093898c (diff)
check
git-svn-id: https://gnunet.org/svn/gnunet@11955 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/fs/fs_uri.c')
-rw-r--r--src/fs/fs_uri.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index f2c291784a..8f9fbba65b 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -1091,8 +1091,13 @@ GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri)
switch (ret->type)
{
case ksk:
+ if (ret->data.ksk.keywordCount >= GNUNET_MAX_MALLOC_CHECKED / sizeof (char*))
+ {
+ GNUNET_break (0);
+ return NULL;
+ }
if (ret->data.ksk.keywordCount > 0)
- {
+ {
ret->data.ksk.keywords
= GNUNET_malloc (ret->data.ksk.keywordCount * sizeof (char *));
for (i = 0; i < ret->data.ksk.keywordCount; i++)