}
else if (cmd == RSPAMD_FUZZY_EXT_SOURCE_IP4) {
if (end - p >= sizeof (in_addr_t)) {
- p += sizeof (in_addr_t);
n_ext ++;
st_len += sizeof (in_addr_t);
}
}
else if (cmd == RSPAMD_FUZZY_EXT_SOURCE_IP6) {
if (end - p >= sizeof (struct in6_addr)) {
- p += sizeof (struct in6_addr);
n_ext ++;
st_len += sizeof (struct in6_addr);
}
p += sizeof (struct in6_addr);
}
+ else {
+ /* Invalid command */
+ return FALSE;
+ }
}
else {
/* Truncated extension */
data_buf += sizeof (struct in6_addr);
ext = ext->next;
}
+ else {
+ g_assert_not_reached ();
+ }
}
/* Last next should be NULL */