libsnapshot: fix incorrect assumption of cow images

libsnapshot used to assume CoW images are always mapped
with device mapper, and call GetDeviceString directly.
However, in tests, it is possible that it is mapped as loop
devices. Fix the incorrect assumption and calls
IImageManager::GetMappedImageDevice instead.

Test: libsnapshot_fuzzer with corpus
Bug: 154633114
Change-Id: I1ec39744480e514ae7a7902643ed863e0ca0a340
(cherry picked from commit e6c1a8427643a066d4f272a9ef9f9f1bd8b7449e)
Merged-In: I1ec39744480e514ae7a7902643ed863e0ca0a340
2 files changed