diff options
| author | Jonathan Basseri <misterikkit@google.com> | 2017-09-14 15:58:16 -0700 |
|---|---|---|
| committer | Jonathan Basseri <misterikkit@google.com> | 2017-09-14 18:16:12 -0700 |
| commit | fc3b35f7b391d7917d54b0c9fa331c5daf408702 (patch) | |
| tree | de8532e251f21b27f603617d73822537e4bdfdfa /server/InterfaceController.cpp | |
| parent | c61286619ff79895129b26e0cc14a6c43aff960d (diff) | |
Fix use-after-free in XfrmControllerTest.
The test was capturing 'optval' and 'optlen' from setsockopt calls, but
by the time the code under test has returned, the memory pointed to by
optval is no longer valid. Update the test to copy the data before it
is too late.
If you are confused about how the gTest API is used here, look at
SaveArg and SaveArgPointee here:
https://github.com/google/googletest/blob/master/googlemock/docs/CheatSheet.md#side-effects
Bug: 65495297
Test: runtest -x system/netd/server/netd_unit_test.cpp
Change-Id: I490485dc8e1ef3569234653fa63af1c6409c075e
Diffstat (limited to 'server/InterfaceController.cpp')
0 files changed, 0 insertions, 0 deletions
