]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Null pointer dereference
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 5 Jun 2017 22:29:58 +0000 (18:29 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 5 Jun 2017 22:29:58 +0000 (18:29 -0400)
src/lib/util/socket.c

index 288312827cdcdf63d260b209a2cbb5ef3a1f07e9..5566bab580b80d3fc1745069c0725114935b5eea 100644 (file)
@@ -732,7 +732,7 @@ int fr_socket_server_udp(fr_ipaddr_t const *src_ipaddr, uint16_t *src_port, char
        }
 #endif
 
-       *src_port = my_port;
+       if (src_port) *src_port = my_port;
 
        return sockfd;
 }