projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
094d82f
)
-cosmetics
author
Christian Grothoff
<christian@grothoff.org>
Sat, 25 Jun 2016 17:32:18 +0000
(17:32 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Sat, 25 Jun 2016 17:32:18 +0000
(17:32 +0000)
src/identity/identity_api.c
patch
|
blob
|
history
diff --git
a/src/identity/identity_api.c
b/src/identity/identity_api.c
index 598f6085f4d5af4b96c736dcedaf2f184679d054..2154337046be148d0eb6c17e2a6b4e3212b6afbc 100644
(file)
--- 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]) ) )
{