aboutsummaryrefslogtreecommitdiff
path: root/src/identity
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-06-25 17:32:18 +0000
committerChristian Grothoff <christian@grothoff.org>2016-06-25 17:32:18 +0000
commit41f06b9223347f779237d0d56ef8fe9e2d813789 (patch)
treeb6e5a6293db29e990a18b3beaef2f542f283c68f /src/identity
parent094d82ff254a1497237f986ee81ddad936549c5a (diff)
-cosmetics
Diffstat (limited to 'src/identity')
-rw-r--r--src/identity/identity_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c
index 598f6085f4..2154337046 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]) ) )
{