svn commit: r193701 - projects/mesh11s/sys/net80211

Rui Paulo rpaulo at FreeBSD.org
Mon Jun 8 10:43:20 UTC 2009


Author: rpaulo
Date: Mon Jun  8 10:43:20 2009
New Revision: 193701
URL: http://svn.freebsd.org/changeset/base/193701

Log:
  Initialize i_len and return ENOMEM if len is bigger than i_len.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/mesh11s/sys/net80211/ieee80211_hwmp.c

Modified: projects/mesh11s/sys/net80211/ieee80211_hwmp.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_hwmp.c	Mon Jun  8 10:05:05 2009	(r193700)
+++ projects/mesh11s/sys/net80211/ieee80211_hwmp.c	Mon Jun  8 10:43:20 2009	(r193701)
@@ -969,7 +969,8 @@ hwmp_ioctl_get80211(struct ieee80211vap 
 		}
 		mtx_unlock(&hs->hs_lock);
 		if (len > ireq->i_len || ireq->i_len < sizeof(*fi))
-			return EFAULT;
+			return ENOMEM;
+		ireq->i_len = len;
 		p = malloc(len, M_TEMP, M_NOWAIT | M_ZERO);
 		if (p == NULL)
 			return ENOMEM;


More information about the svn-src-projects mailing list