diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h index e8aa72eaded5a0fbf8bb71a17299f9847d2dad2a..53127a94e2190b7650579251d621a25ff58c04e5 100644 --- a/include/net/iw_handler.h +++ b/include/net/iw_handler.h @@ -545,7 +545,8 @@ iwe_stream_add_point(struct iw_request_info *info, char *stream, char *ends, memcpy(stream + lcp_len, ((char *) &iwe->u) + IW_EV_POINT_OFF, IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN); - memcpy(stream + point_len, extra, iwe->u.data.length); + if (iwe->u.data.length && extra) + memcpy(stream + point_len, extra, iwe->u.data.length); stream += event_len; } return stream;