From a1be794fec9126d32edbe0cbd4d32676f722240a Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Mon, 23 Nov 2026 11:07:32 +0700 Subject: [PATCH] android-res: mark the table partial when library records are omitted Library records past their chunk or beyond the 256-record cap are not read, so the table is partial. Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com> --- crates/android-res/src/arsc.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/android-res/src/arsc.rs b/crates/android-res/src/arsc.rs index 8db61e26c..c9b9507a0 100644 --- a/crates/android-res/src/arsc.rs +++ b/crates/android-res/src/arsc.rs @@ -459,6 +459,9 @@ fn parse_package(data: &[u8], pos: usize, cs: usize, global: &StringPool, table: if n > available { table.warnings.push(format!("package {name}: library records run past their chunk")); } + if n > available.min(256) { + table.truncated = true; + } for i in 0..n.min(256).min(available) { let e = c + ch + i * 260; if let Some(lid) = r.u32_le(e) {