(GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->availability_success)) ||
(GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->availability_trials)) ||
(GNUNET_OK != GNUNET_BIO_write (wh, sr->keyword_bitmap,
- (sr->uri->data.ksk.keywordCount + 7) / 8)) )
+ (sr->uri == NULL) ? 0 : (sr->uri->data.ksk.keywordCount + 7) / 8)) )
{
GNUNET_break (0);
sr->keyword_bitmap = GNUNET_malloc ((sr->uri->data.ksk.keywordCount + 7) / 8); /* round up, count bits */
if (GNUNET_OK != GNUNET_BIO_read (rh, "keyword-bitmap",
sr->keyword_bitmap,
- (sr->uri->data.ksk.keywordCount + 7) / 8))
+ (sr->uri == NULL) ? 0 : (sr->uri->data.ksk.keywordCount + 7) / 8))
{
GNUNET_break (0);
goto cleanup;