update_engine: check type when reading Services property of
connection manager.
Before reading the first element of the Services array, verify that the
value is, in fact, an array of the correct type. This prevents a crash in
the case where the new connection manager (shill) sends the Services as an
array of D-Bus strings, rather than an array of D-Bus object paths.
BUG=chromium-os:27987
TEST=manual, unit tests
Manual testing: ran image_to_live with DUT running flimflam and shill. With
flimflam, update_engine behaves as before patch. With shill, the patch
resolves a crash that would occur when copying the first element of the
Services property into |out_path|.
Change-Id: I4e1d02b5ae471dce9d8b87a0c7a4f2d859c88df7
Reviewed-on: https://gerrit.chromium.org/gerrit/18508
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
3 files changed