emikulic / darkhttpd

When you need a web server in a hurry.
https://unix4lyfe.org/darkhttpd/
ISC License
1.03k stars 83 forks source link

Prevent user from setting wwwroot to NULL #47

Closed g-rden closed 6 months ago

g-rden commented 6 months ago

Do error when user gives NULL as input for wwwroot and fixed incorrect strlen check for wwwroot.

Previously ./darkhttpd / and ./darkhttpd '' would set wwwroot to NULL. Which would still serve /, but I think this is how it was supposed to be in the first place.