svn commit: r249885 - user/adrian/net80211_tx/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Thu Apr 25 08:33:23 UTC 2013


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);
 }


More information about the svn-src-user mailing list