diff options
author | Steven Moreland <smoreland@google.com> | 2018-01-17 18:52:25 -0800 |
---|---|---|
committer | Steven Moreland <smoreland@google.com> | 2018-01-17 18:52:25 -0800 |
commit | 8a33ca28a70cf7f9594553ad2342c997b9a0a4b1 (patch) | |
tree | b5ae40a75e056d5e6eeacee9a5e442b65b477bb1 | |
parent | b5145a4ef609a462a48e05640d0998271f48edf6 (diff) | |
download | ipacfg-mgr-8a33ca28a70cf7f9594553ad2342c997b9a0a4b1.tar.gz |
Fix null ptr dereference and bad memory access.
Bug: 62799790
Test: vts_ibase_test
Change-Id: I067bee0cfe626144f78d1aa78156a6e5e56853da
-rw-r--r-- | msm8998/hal/src/HAL.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/msm8998/hal/src/HAL.cpp b/msm8998/hal/src/HAL.cpp index e19a149..11dd26d 100644 --- a/msm8998/hal/src/HAL.cpp +++ b/msm8998/hal/src/HAL.cpp @@ -611,9 +611,11 @@ Return<void> HAL::removeDownstream Return<void> HAL::debug ( - const hidl_handle& fd, + const hidl_handle& handle, const hidl_vec<hidl_string>& /* options */ ) { - mLogs.toFd(fd->data[0]); + if (handle != nullptr && handle->numFds >= 1) { + mLogs.toFd(handle->data[0]); + } return Void(); } /* debug */ |