Check raw data size 68/260668/3
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 1 Jul 2021 01:15:47 +0000 (10:15 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 2 Jul 2021 00:37:41 +0000 (09:37 +0900)
commit92cde7a2b229ff7872865c7f92f88b3b17f0b998
tree4e1c7014dfc103d509bc31065ce33abfda5ac2ab
parent5458c3365fd36e5aa9429e2b1ff38e4590b36892
Check raw data size

If the device was turned off when the application was writing the
preference data, the data can be corrupted. If the data is corrupted,
the application will be crashed when reading the data.
To prevent crash issue, this patch adds to check whether the size of the
raw data is valid or not.

Change-Id: I09379f294104200aa0fc4d3799ddc2a56a96745b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
preference/backend-interface.hh
preference/file-backend-internal.cc
preference/file-backend-internal.hh
preference/file-internal.cc
preference/file-internal.hh
tool/preference_tool.cc