strcmp: fix overflow and possibly signedness error