Ensure that only UTF8 strings are passed to a DBus message iterator.
This CL changes UdevDevice to only set the drive model and filesystem
label of a disk if they are valid UTF8 strings, which prevents an
asertion error in DBus message iterator due to non-UTF8 strings.
BUG=chromium-os:26281
TEST=Tested the following:
1. Build cros-disks for {x86,amd64,arm}-generic.
2. Run cros-disks unit tests.
(cherry picked from commit b036aa58b8d2af5977c05236fed31b62a5b1a555)
Change-Id: I6adc21fd418ba0334ed46a2d85b43e00b1020307
Reviewed-on: https://gerrit.chromium.org/gerrit/17331
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
3 files changed