Converted str* functions to their (more secure) strn* counterparts