aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_publish_ublock.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-07 08:38:01 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-07 08:38:01 +0000
commit0f8b11c7c8fa59eded68dc57de5410b7a313a031 (patch)
tree34c54c7a5621040bec7fffe5b13701a84dac860d /src/fs/fs_publish_ublock.c
parent6d17dd07e0a6a1e18cae9590621e05130fc160fc (diff)
downloadgnunet-0f8b11c7c8fa59eded68dc57de5410b7a313a031.tar.gz
gnunet-0f8b11c7c8fa59eded68dc57de5410b7a313a031.zip
-fix, handle case where there is no update
Diffstat (limited to 'src/fs/fs_publish_ublock.c')
-rw-r--r--src/fs/fs_publish_ublock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fs/fs_publish_ublock.c b/src/fs/fs_publish_ublock.c
index 9ddff0655..1e1d1e233 100644
--- a/src/fs/fs_publish_ublock.c
+++ b/src/fs/fs_publish_ublock.c
@@ -157,7 +157,10 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h,
157 GNUNET_assert (mdsize >= 0); 157 GNUNET_assert (mdsize >= 0);
158 uris = GNUNET_FS_uri_to_string (uri); 158 uris = GNUNET_FS_uri_to_string (uri);
159 slen = strlen (uris) + 1; 159 slen = strlen (uris) + 1;
160 ulen = strlen (ulabel) + 1; 160 if (NULL == ulabel)
161 ulen = 0;
162 else
163 ulen = strlen (ulabel) + 1;
161 size = mdsize + sizeof (struct UBlock) + slen + ulen; 164 size = mdsize + sizeof (struct UBlock) + slen + ulen;
162 if (size > MAX_UBLOCK_SIZE) 165 if (size > MAX_UBLOCK_SIZE)
163 { 166 {