diff options
-rw-r--r-- | src/fuzzy_storage.c | 14 | ||||
-rw-r--r-- | src/libutil/addr.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 53e9f1efa..6242e47c7 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -1256,17 +1256,17 @@ rspamd_fuzzy_extensions_from_wire (struct fuzzy_session *s, guchar *buf, gsize b p += sizeof (in_addr_t); } else if (cmd == RSPAMD_FUZZY_EXT_SOURCE_IP6) { - if (end - p >= sizeof (in6_addr_t)) { - p += sizeof (in6_addr_t); + if (end - p >= sizeof (struct in6_addr)) { + p += sizeof (struct in6_addr); n_ext ++; - st_len += sizeof (in6_addr_t); + st_len += sizeof (struct in6_addr); } else { /* Truncation */ return FALSE; } - p += sizeof (in6_addr_t); + p += sizeof (struct in6_addr); } } else { @@ -1323,11 +1323,11 @@ rspamd_fuzzy_extensions_from_wire (struct fuzzy_session *s, guchar *buf, gsize b ext->ext = RSPAMD_FUZZY_EXT_SOURCE_IP6; ext->next = ext + 1; - ext->length = sizeof (in6_addr_t); + ext->length = sizeof (struct in6_addr); ext->payload = dest; - memcpy (dest, p, sizeof (in6_addr_t)); + memcpy (dest, p, sizeof (struct in6_addr)); p += sizeof (in_addr_t); - data_buf += sizeof (in6_addr_t); + data_buf += sizeof (struct in6_addr); ext = ext->next; } } diff --git a/src/libutil/addr.h b/src/libutil/addr.h index 483ad9434..010291008 100644 --- a/src/libutil/addr.h +++ b/src/libutil/addr.h @@ -86,7 +86,7 @@ rspamd_inet_addr_t *rspamd_inet_address_from_rnds ( /** * Parse string with ipv6 address of length `len` to `target` which should be - * at least sizeof (in6_addr_t) + * at least sizeof (struct in6_addr) * @param text input string * @param len length of `text` (if 0, then `text` must be zero terminated) * @param target target structure |