Skip to content

Commit d898254

Browse files
committed
fix magiskboot error,try support kernel 6.12 patch
1 parent e3166ce commit d898254

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
- name: Build resetprop
3636
run: ./build.py -vr native resetprop
3737

38+
- name: Build magiskboot
39+
run: ./build.py -vr native magiskboot
40+
3841
- name: Stop gradle daemon
3942
run: ./app/gradlew --stop
4043

native/src/boot/bootimg.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ static int find_dtb_offset(const uint8_t *buf, unsigned sz) {
284284
if (totalsize > end - curr)
285285
continue;
286286

287+
if (totalsize <= fdt_hdr->off_dt_strings)
288+
continue;
289+
287290
// Check that fdt_header.off_dt_struct does not overflow kernel image size
288291
uint32_t off_dt_struct = fdt_hdr->off_dt_struct;
289292
if (off_dt_struct > end - curr)

0 commit comments

Comments
 (0)