verify: use 'cmp_pattern' from 'lib/pattern.c' to compare pattern and buffer