]> git.ipfire.org Git - thirdparty/sarg.git/commit - ip2name.c
Prevent a segfault if a host name doesn't resolve to an IP address
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 5 Nov 2015 20:09:31 +0000 (21:09 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 5 Nov 2015 20:09:31 +0000 (21:09 +0100)
commit075352778d23d67b9b736cf43a284e190189e047
tree84c94cbe73c5c374b01cf595b1acadee0c0570a1
parent51f6da273beef37080bc9e6940aa5451fdae7664
Prevent a segfault if a host name doesn't resolve to an IP address

If getaddrinfo fails, the linked list is not initialized. It must therefore
not be freed.

The error occurred when datafile was defined in sarg.conf and datafile_url
was set to ip (the default value).

Thanks to Evgeniy Yakushev for finding and reporting this bug.
ip2name.c