Permalink
Browse files

- lophttpd: fixed error checking in rproxy

  • Loading branch information...
stealth committed Mar 27, 2015
1 parent 2f085c4 commit d83bb133c379298189c960a681caa5ffa6025f12
Showing with 3 additions and 2 deletions.
  1. +1 −0 misc.cc
  2. +2 −2 rproxy.cc
View
@@ -76,6 +76,7 @@ struct ctypes content_types[] = {
{".cc", "text/x-c++src"},
{".cpp", "text/x-c++src"},
{".cxx", "text/x-c++src"},
{".css", "text/css"},
{".dtd", "text/x-dtd"},
{".dvi", "application/x-dvi"},
{".fig", "image/x-xfig"},
View
@@ -161,10 +161,10 @@ int rproxy::loop()
}
if (af == AF_INET) {
if (inet_ntop(af, &sin4.sin_addr, from, sizeof(from)) < 0)
if (inet_ntop(af, &sin4.sin_addr, from, sizeof(from)) == NULL)
continue;
} else {
if (inet_ntop(af, &sin6.sin6_addr, from, sizeof(from)) < 0)
if (inet_ntop(af, &sin6.sin6_addr, from, sizeof(from)) == NULL)
continue;
}

0 comments on commit d83bb13

Please sign in to comment.