Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Apr 2013 08:33:22 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r249885 - user/adrian/net80211_tx/sys/dev/ath
Message-ID:  <201304250833.r3P8XM76071066@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Thu Apr 25 08:33:22 2013
New Revision: 249885
URL: http://svnweb.freebsd.org/changeset/base/249885

Log:
  Handle NULL payload ALQ messages.

Modified:
  user/adrian/net80211_tx/sys/dev/ath/if_ath_alq.c

Modified: user/adrian/net80211_tx/sys/dev/ath/if_ath_alq.c
==============================================================================
--- user/adrian/net80211_tx/sys/dev/ath/if_ath_alq.c	Thu Apr 25 07:04:56 2013	(r249884)
+++ user/adrian/net80211_tx/sys/dev/ath/if_ath_alq.c	Thu Apr 25 08:33:22 2013	(r249885)
@@ -184,9 +184,11 @@ if_ath_alq_post(struct if_ath_alq *alq, 
 	/*
 	 * Copy the payload _after_ the header field.
 	 */
-	memcpy(((char *) ap) + sizeof(struct if_ath_alq_hdr),
-	    buf,
-	    len);
+	if (buf != NULL) {
+		memcpy(((char *) ap) + sizeof(struct if_ath_alq_hdr),
+		    buf,
+		    len);
+	}
 
 	alq_post(alq->sc_alq_alq, ale);
 }



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