Added missing strnlen. Fixes #2616.