From owner-cvs-usrsbin Sat Jul 26 20:42:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA15219 for cvs-usrsbin-outgoing; Sat, 26 Jul 1997 20:42:51 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA15179; Sat, 26 Jul 1997 20:42:28 -0700 (PDT) From: Bill Paul Received: (from wpaul@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id UAA26484; Sat, 26 Jul 1997 20:41:54 -0700 (PDT) Date: Sat, 26 Jul 1997 20:41:54 -0700 (PDT) Message-Id: <199707270341.UAA26484@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-usrsbin@FreeBSD.ORG Subject: cvs commit: src/usr.sbin/ypserv yp_dnslookup.c Sender: owner-cvs-usrsbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wpaul 1997/07/26 20:41:54 PDT Modified files: usr.sbin/ypserv yp_dnslookup.c Log: Fix a bug in the async DNS resolver that can crash ypserv. yp_prune_dnsq() is not sane: if the TTL on a pending but unanswered query hits 0 and the circular queue entry is removed and free()d, the for() loop may still try to use the entry pointer (which now points at no longer valid memory). usually, deleting only the last entry off the end of the queue worked, but if more than one was deleted, the server would crash. I changed things a bit so this shouldn't happen anymore. Also arranged to call the prune routine a bit more often. Revision Changes Path 1.11 +9 -4 src/usr.sbin/ypserv/yp_dnslookup.c