android_packages_modules_Vi.../libs
Pierre-Clément Tosi 68980bee75 libs: libfdt: Fix Fdt::header() using bad pointer
Fix a bug where a reference to the DT was erroneously obtained through
&self (instead of self) which was causing Fdt::totalsize() to return a
wrong value (probably read from the stack where &self pointed to), in
turn making Fdt::as_slice() return the wrong region of memory. This UB
seems to have consistently resulted in fdt.totalsize() == 0 i.e.
fdt.as_slice() == &[] and has gone unnoticed until now.

Avoid casting pointers with as in as_{mut_,}ptr().

Bug: 280425124
Test: atest MicrodroidHostTests
Change-Id: Ie31f6c6f19e756ee843d1fd2f11f106590e99395
Merged-In: Ie31f6c6f19e756ee843d1fd2f11f106590e99395
2023-05-09 13:29:35 +00:00
..
apexutil Importing rustc-1.66.0 2023-01-26 18:24:25 +00:00
apkverify Test for min/mx sdk in APK signatures 2023-03-09 17:29:43 +00:00
avb libs/avb: Introduce libavb_baremetal 2023-02-13 13:19:31 +00:00
capabilities Update TEST_MAPPING files 2023-01-07 00:27:50 +00:00
devicemapper Merge "Update usage of uuid crate" 2023-03-30 18:46:33 +00:00
fdtpci pvmfw: parse and validate incoming device tree 2023-03-15 16:16:33 +09:00
hyp [hypervisor] Gunyah support 2023-05-09 13:27:29 +00:00
hypervisor_props Don't start composd if VMs are not supported 2023-02-15 13:17:56 +00:00
libfdt libs: libfdt: Fix Fdt::header() using bad pointer 2023-05-09 13:29:35 +00:00
nested_virt Use ro.product.vendor.device to determine if running on Cuttlefish 2022-10-17 14:03:28 +00:00
statslog_virtualization
vbmeta [avb] Convert C enum to Rust enum in libavb_bindgen 2022-12-15 16:11:01 +00:00
vmconfig