}
const struct GNUNET_MessageHeader *mod = GNUNET_MQ_extract_nested_mh (res);
+ if (NULL == mod)
+ {
+ GNUNET_break_op (0);
+ return;
+ }
uint16_t mod_size = ntohs (mod->size);
switch (ntohs (mod->type))
const char *name = (const char *) &pmod[1];
uint16_t name_size = ntohs (pmod->name_size);
- if ('\0' != name[name_size - 1])
+ if (0 == name_size
+ || mod_size - sizeof (*pmod) < name_size
+ || '\0' != name[name_size - 1])
{
- GNUNET_break (0);
+ GNUNET_break_op (0);
return;
}
sr->var_cb (sr->cls, mod, name, name + name_size,
struct GNUNET_MQ_Envelope *env = GNUNET_MQ_get_last_envelope (chn->mq);
if (NULL != env)
{
- GNUNET_MQ_notify_sent (env, (GNUNET_MQ_NotifyCallback) channel_cleanup, chn);
+ GNUNET_MQ_notify_sent (env, (GNUNET_SCHEDULER_TaskCallback) channel_cleanup, chn);
}
else
{
GNUNET_MQ_handler_end ()
};
- chn->mq = GNUNET_CLIENT_connecT (chn->cfg, "psyc",
+ chn->mq = GNUNET_CLIENT_connect (chn->cfg, "psyc",
handlers, master_disconnected, mst);
GNUNET_assert (NULL != chn->mq);
chn->tmit = GNUNET_PSYC_transmit_create (chn->mq);
GNUNET_MQ_handler_end ()
};
- chn->mq = GNUNET_CLIENT_connecT (chn->cfg, "psyc",
+ chn->mq = GNUNET_CLIENT_connect (chn->cfg, "psyc",
handlers, slave_disconnected, slv);
GNUNET_assert (NULL != chn->mq);
chn->tmit = GNUNET_PSYC_transmit_create (chn->mq);