diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-25 17:09:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-25 17:09:22 +0000 |
commit | bb388a929978c6feecc29133d071f1448619a3d4 (patch) | |
tree | 7981195bd6888c66134b59e2ff0478559e1e9498 /src/fs/fs_uri.c | |
parent | d49a189d3d0b53680fb39983b346f6dfc14e6bc8 (diff) | |
download | gnunet-bb388a929978c6feecc29133d071f1448619a3d4.tar.gz gnunet-bb388a929978c6feecc29133d071f1448619a3d4.zip |
check
Diffstat (limited to 'src/fs/fs_uri.c')
-rw-r--r-- | src/fs/fs_uri.c | 7 |
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++) |