/* Make there's enough remaining data for the specified length
* and that the action length is a multiple of 64 bits. */
- if ((actions_len < len) || (len % 8) != 0)
+ if (!len || (actions_len < len) || (len % 8) != 0)
return OFPBAC_BAD_LEN;
type = ntohs(ah->type);
/* Make there's enough remaining data for the specified length
* and that the action length is a multiple of 64 bits. */
- if ((actions_len < len) || (len % 8) != 0) {
+ if (!len || (actions_len < len) || (len % 8) != 0) {
return OFPBAC_BAD_LEN;
}