prom: fix coverity 277312, 277317
If one attempts to add a pattern with zero length, first time
it will succeed, and the second time it will cause an invalid memcmp call.
Solution: do not allow to add zero-length patterns.
Type: fix
@@ -305,6 +305,8 @@ prom_stat_patterns_add (u8 **patterns)
{
found = 0;
len = vec_len (*pattern);
+ if (len == 0)
+ continue;
vec_foreach (existing, pm->stats_patterns)
{
if (vec_len (*existing) != len)
