DivestOS/Patches/LineageOS-17.1/android_external_hardened_malloc/0001-Broken_Cameras.patch
Tad a9f6672fed hardened_malloc fixes for broken devices
- enable the patchset for 18.1
- add an ugly patch that extends the Pixel 3* camera workaround to all camera executables

Signed-off-by: Tad <tad@spotco.us>
2022-03-16 02:01:19 -04:00

26 lines
923 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Tue, 15 Mar 2022 22:18:26 -0400
Subject: [PATCH] Expand workaround to all camera executables
Signed-off-by: Tad <tad@spotco.us>
---
h_malloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/h_malloc.c b/h_malloc.c
index de693c9..95a6ba3 100644
--- a/h_malloc.c
+++ b/h_malloc.c
@@ -1057,8 +1057,8 @@ COLD static void handle_bugs(void) {
return;
}
- const char camera_provider[] = "/vendor/bin/hw/android.hardware.camera.provider@2.4-service_64";
- if (strcmp(camera_provider, path) == 0) {
+ // Any camera executable on system partition
+ if (strstr(path, "camera") != NULL && (strncmp("/system", path, 7) == 0 || strncmp("/vendor", path, 7) == 0)) {
ro.zero_on_free = false;
ro.purge_slabs = false;
ro.region_quarantine_protect = false;