A malicious server or man-in-the-middle could trigger a crash.
Escape the provided filename before using it.