Let sockaddr_storage_to_ip() assert that the address family is AF_INET or AF_INET6
authorFabian Keil <fk@fabiankeil.de>
Sun, 4 Jun 2017 14:43:10 +0000 (14:43 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sun, 4 Jun 2017 14:43:10 +0000 (14:43 +0000)
Privoxy currently doesn't support any other address families
so there's no need to pretent to handle them.

filters.c

index 2ae03de..b6b46e0 100644 (file)
--- a/filters.c
+++ b/filters.c
@@ -1,4 +1,4 @@
-const char filters_rcs[] = "$Id: filters.c,v 1.204 2017/03/08 13:13:18 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.205 2017/06/04 14:42:54 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/filters.c,v $
@@ -113,6 +113,7 @@ static int sockaddr_storage_to_ip(const struct sockaddr_storage *addr,
                                   in_port_t **port)
 {
    assert(NULL != addr);
+   assert(addr->ss_family == AF_INET || addr->ss_family == AF_INET6);
 
    switch (addr->ss_family)
    {