diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-07 08:38:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-07 08:38:01 +0000 |
commit | 0f8b11c7c8fa59eded68dc57de5410b7a313a031 (patch) | |
tree | 34c54c7a5621040bec7fffe5b13701a84dac860d /src/fs/fs_publish_ublock.c | |
parent | 6d17dd07e0a6a1e18cae9590621e05130fc160fc (diff) | |
download | gnunet-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.c | 5 |
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 | { |