From: Christian Grothoff Date: Sat, 25 Jun 2016 17:32:18 +0000 (+0000) Subject: -cosmetics X-Git-Tag: initial-import-from-subversion-38251~694 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=41f06b9223347f779237d0d56ef8fe9e2d813789;p=oweals%2Fgnunet.git -cosmetics --- diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c index 598f6085f..215433704 100644 --- a/src/identity/identity_api.c +++ b/src/identity/identity_api.c @@ -477,11 +477,11 @@ static int check_identity_set_default (void *cls, const struct GNUNET_IDENTITY_SetDefaultMessage *sdm) { - uint16_t size = ntohs (sdm->header.size); + uint16_t size = ntohs (sdm->header.size) - sizeof (*sdm); uint16_t name_len = ntohs (sdm->name_len); const char *str = (const char *) &sdm[1]; - if ( (size != name_len + sizeof (struct GNUNET_IDENTITY_SetDefaultMessage)) || + if ( (size != name_len) || ( (0 != name_len) && ('\0' != str[name_len - 1]) ) ) {