vermaneerajin / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

Shellinabox segfaults when fails to resolve a hostname #71

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set your hostname to a random string.
2. Start shellinaboxd with ssl enabled.
3. Watch it segfault.

The segfault is caused by a NULL pointer dereference at libhttp/ssl.c:629. This 
happens when gethostbyname on the previous line fails to resolve the host, 
which is to say every time if your hostname is fictional.

I'm attaching a quick patch which resolves the problem for me.

Original issue reported on code.google.com by vmage...@gmail.com on 1 Jul 2010 at 10:44

Attachments:

GoogleCodeExporter commented 8 years ago
This bug is not fixed in the top of the tree in SVN. If you get a chance, 
please confirm that everything works fine for you now.

And thanks for tracking down this problem!

Original comment by zod...@gmail.com on 2 Jul 2010 at 7:02

GoogleCodeExporter commented 8 years ago
Yup, the latest SVN seems to work for me.

As a note: the FreeBSD port was committed recently [1] with the patch
I attached above. Hopefully it's adequate for the time being.

[1] http://www.freshports.org/www/shellinabox/

Original comment by vmage...@gmail.com on 5 Jul 2010 at 8:09