protection against buffer overflows

used strncmp instead of strcmp