diff options
| author | 2021-10-13 20:53:00 +0800 | |
|---|---|---|
| committer | 2021-11-25 22:05:31 +0800 | |
| commit | 91333788a0df38b2edeb5bcedd1f46e2cac9eb54 (patch) | |
| tree | f3838dcbed42f589278a5064368b3ecbb54edc04 /libs/input/PointerController.cpp | |
| parent | 61c79dbc8dc763bf59cd37d83dd831b6b9cca3b0 (diff) | |
net: fix NPE when reading IP configurations
When the default gateway is not used in IP configurations,
for example the gateway info in ip configurations was fed with
custom gateway address
```
out.writeUTF(GATEWAY_KEY);
out.writeInt(0); // Default route.
out.writeInt(1); // Have a gateway.
out.writeUTF(staticIpConfiguration.getGateway().getHostAddress());
```
A NPE occurred.
When there is no destination, assume it is default route and use
the gateway address in all cases.
Test: manual
Change-Id: I5904efad5d277de6724f81d99e62c21ff8347caa
Signed-off-by: gary-wzl77 <gary.wang@canonical.com>
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions