refs: use strncmp() instead of strlen() and memcmp()