aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs')
-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 f2c291784..8f9fbba65 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)
1091 switch (ret->type) 1091 switch (ret->type)
1092 { 1092 {
1093 case ksk: 1093 case ksk:
1094 if (ret->data.ksk.keywordCount >= GNUNET_MAX_MALLOC_CHECKED / sizeof (char*))
1095 {
1096 GNUNET_break (0);
1097 return NULL;
1098 }
1094 if (ret->data.ksk.keywordCount > 0) 1099 if (ret->data.ksk.keywordCount > 0)
1095 { 1100 {
1096 ret->data.ksk.keywords 1101 ret->data.ksk.keywords
1097 = GNUNET_malloc (ret->data.ksk.keywordCount * sizeof (char *)); 1102 = GNUNET_malloc (ret->data.ksk.keywordCount * sizeof (char *));
1098 for (i = 0; i < ret->data.ksk.keywordCount; i++) 1103 for (i = 0; i < ret->data.ksk.keywordCount; i++)