commit | ad947558444c2eba74f0e1b02830eff71be9bf51 | [log] [tgz] |
---|---|---|
author | Greg Kerr <kerrnel@chromium.org> | Fri Nov 11 23:35:35 2016 |
committer | chrome-bot <chrome-bot@chromium.org> | Sun Nov 13 23:58:48 2016 |
tree | 20cd7185558d73113584bb39be8090cd32cb18cd | |
parent | 36a28c557a29b01deccef42c565a8666ae1a5d22 [diff] |
Fix buffer overflow in unit tests. The imageloader unit tests have a buffer overflow do to an unsafe implicit conversion of non-null terminated data to an std::string. This manually wraps the data in a StringPiece. BUG=chromium:664658 TEST=FEATURES=test emerge-${BOARD} imageloader Change-Id: I18270654de2e2e3e90955ab581d3f6597ff674ba Reviewed-on: https://chromium-review.googlesource.com/410040 Commit-Ready: Greg Kerr <kerrnel@chromium.org> Tested-by: Greg Kerr <kerrnel@chromium.org> Reviewed-by: Ricky Zhou <rickyz@chromium.org>
This aims to provide a generic utility to load (mount) and unload (unmount) verified disk images through DBus IPC.
imageloader
imageloadclient
imageloader
can be run as root and can handle mounting and unmounting of disk images. imageloadclient
is a simple client (intended to be run as chronos) that can talk to imageloader
and ask it to mount and unmount stuff. When imageloader
is not running, DBus can invoke it via the one time run option (imageloader -o
) and get the task done.