diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-02-12 19:05:31 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-12 19:05:31 -0800 |
| commit | 288b37832588b5ae2e9b8bbc3d8587118aedc979 (patch) | |
| tree | c22499e8526af720ef51c05adadcd19412ebaa1d | |
| parent | 171b2aebb4e61afa4c487c246b7decb9608d121b (diff) | |
| parent | 87d6e96a1c1a54c93d41a3ebf74c502bf806400d (diff) | |
Merge "qcacld-2.0: Fix NULL pointer reference issue in adf_nbuf.c" into wlan-cld2.driver.lnx.1.0-dev
| -rw-r--r-- | CORE/SERVICES/COMMON/adf/adf_nbuf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CORE/SERVICES/COMMON/adf/adf_nbuf.c b/CORE/SERVICES/COMMON/adf/adf_nbuf.c index 503b5a3c1231..ab38e62afbd4 100644 --- a/CORE/SERVICES/COMMON/adf/adf_nbuf.c +++ b/CORE/SERVICES/COMMON/adf/adf_nbuf.c @@ -1751,6 +1751,11 @@ int adf_nbuf_update_radiotap(struct mon_rx_status *rx_status, adf_nbuf_t nbuf, /* If no headroom, append to tail */ uint8_t *rtap_start = adf_nbuf_put_tail(nbuf, rtap_len); + if (!rtap_start) { + adf_print("No enough tail room to save radiotap len: " + "%d", rtap_len); + return 0; + } adf_os_mem_copy(rtap_start, rthdr, rtap_len); adf_nbuf_trim_tail(nbuf, rtap_len); } |
