diff options
author | Alessio Balsini <balsini@google.com> | 2020-01-30 16:28:05 +0000 |
---|---|---|
committer | Alessio Balsini <balsini@google.com> | 2020-01-30 22:42:54 +0000 |
commit | fb5de5bc8f315ac699460865dbaeb50734fd0ffc (patch) | |
tree | ce9f934cdba0a7bd816b4e9783d7b08150a0030e /libutils/Threads.cpp | |
parent | fce02741d398afb440e80c2e5036168e0ea1cdb6 (diff) |
Propagate failure of MetadataBuilder creation in CreateUpdateSnapshots
In a device with malformed metadata, the MetadataBuilder returns a
nullptr that may cause segmentation faults when using the builder.
Fix by handling the nullptr exception in CreateUpdateSnapshot and
propagating the error to its caller.
Bug: n/a
Test: libsnapshot_test
Change-Id: Ie9148a552cf4bb223ab8d54b1d30d2b13d92bb22
Signed-off-by: Alessio Balsini <balsini@google.com>
Diffstat (limited to 'libutils/Threads.cpp')
0 files changed, 0 insertions, 0 deletions