diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-03-24 19:30:46 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-03-24 19:30:46 +0000 |
commit | 9ac0acb2484d3b73542315f2164e1a08f80d989c (patch) | |
tree | 28c907be27d0f9bd875011322410db55dbcc9b34 /src/fs/gnunet-helper-fs-publish.c | |
parent | e8a3316b8b361bff25b1fd09509e57abef1ef549 (diff) | |
download | gnunet-9ac0acb2484d3b73542315f2164e1a08f80d989c.tar.gz gnunet-9ac0acb2484d3b73542315f2164e1a08f80d989c.zip |
-fix #2232
Diffstat (limited to 'src/fs/gnunet-helper-fs-publish.c')
-rw-r--r-- | src/fs/gnunet-helper-fs-publish.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fs/gnunet-helper-fs-publish.c b/src/fs/gnunet-helper-fs-publish.c index 4bb77fa22..b96559cd1 100644 --- a/src/fs/gnunet-helper-fs-publish.c +++ b/src/fs/gnunet-helper-fs-publish.c | |||
@@ -373,8 +373,13 @@ extract_files (struct ScanTreeNode *item) | |||
373 | 373 | ||
374 | memcpy (buf, item->filename, slen); | 374 | memcpy (buf, item->filename, slen); |
375 | size = GNUNET_CONTAINER_meta_data_serialize (meta, | 375 | size = GNUNET_CONTAINER_meta_data_serialize (meta, |
376 | &dst, size - slen, | 376 | &dst, size, |
377 | GNUNET_CONTAINER_META_DATA_SERIALIZE_PART); | 377 | GNUNET_CONTAINER_META_DATA_SERIALIZE_PART); |
378 | if (size < 0) | ||
379 | { | ||
380 | GNUNET_break (0); | ||
381 | size = 0; | ||
382 | } | ||
378 | GNUNET_CONTAINER_meta_data_destroy (meta); | 383 | GNUNET_CONTAINER_meta_data_destroy (meta); |
379 | if (GNUNET_OK != | 384 | if (GNUNET_OK != |
380 | write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_META_DATA, | 385 | write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_META_DATA, |