Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Nov 2012 16:39:10 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r243287 - stable/8/sys/netinet/libalias
Message-ID:  <201211191639.qAJGdAiM000749@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Nov 19 16:39:09 2012
New Revision: 243287
URL: http://svnweb.freebsd.org/changeset/base/243287

Log:
  MFC r241648: Avoid potential bad pointer dereference.
  
    Previously RuleAdd would leave entry->la unset for the first entry in
    the proxyList.
  
  Sponsored by: ADARA Networks

Modified:
  stable/8/sys/netinet/libalias/alias_proxy.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/netinet/   (props changed)

Modified: stable/8/sys/netinet/libalias/alias_proxy.c
==============================================================================
--- stable/8/sys/netinet/libalias/alias_proxy.c	Mon Nov 19 16:16:34 2012	(r243286)
+++ stable/8/sys/netinet/libalias/alias_proxy.c	Mon Nov 19 16:39:09 2012	(r243287)
@@ -210,13 +210,13 @@ RuleAdd(struct libalias *la, struct prox
 
 	LIBALIAS_LOCK_ASSERT(la);
 
+	entry->la = la;
 	if (la->proxyList == NULL) {
 		la->proxyList = entry;
 		entry->last = NULL;
 		entry->next = NULL;
 		return;
 	}
-	entry->la = la;
 
 	rule_index = entry->rule_index;
 	ptr = la->proxyList;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211191639.qAJGdAiM000749>