size_t msize;
uint32_t session_id;
- GNUNET_break (address->transport_name != NULL);
- namelen = (address->transport_name == NULL) ? 0 : strlen (address->transport_name) + 1;
+ GNUNET_assert (address->transport_name != NULL);
+ namelen = strlen (address->transport_name) + 1;
+ GNUNET_assert (namelen > 1);
msize = sizeof (struct AddressDestroyedMessage) + address->address_length + namelen;
if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
(address->address_length >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
return;
}
- if ((plugin_name_length != 0) &&
- (plugin_name[plugin_name_length - 1] != '\0'))
+ if ( (plugin_name_length == 0) ||
+ (plugin_name[plugin_name_length - 1] != '\0'))
{
GNUNET_break (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);