- changed status to resolved
mhttpd crash in getcwd()
Issue #297
resolved
I see getcwd() return NULL. This is strange, but maybe correct if truely it cannot find where we are. It looks like getcwd() does quite a bit of directory listing and traversal. Certainly if current directory was deleted, getcwd() would not find it.
Anyhow, this causes a crash in mhttpd, in get_resources() or something link that.
I think code should be prepared for getcwd() returning NULL and do something reasonable.
P.S. my copy of “man getcwd” reads this “On failure, these functions return NULL, and errno is set to indicate the error”.
K.O.
Comments (1)
-
reporter - Log in to comment
fixed a26e1babc0d9aca2b10fd242702ab2958345c9d4 K.O.