mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-08-03 03:46:07 -04:00
Pull in old cherrypicks + 5 missing patches from syphyr
This adds 3 expat patches for n-asb-2022-09 from https://github.com/syphyr/android_external_expat/commits/cm-14.1 and also applies 2 of them to 15.1 Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
df3db92d5a
commit
202033c013
89 changed files with 7138 additions and 15 deletions
38
Patches/LineageOS-14.1/android_system_bt/320420.patch
Normal file
38
Patches/LineageOS-14.1/android_system_bt/320420.patch
Normal file
|
@ -0,0 +1,38 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Manton <cmanton@google.com>
|
||||
Date: Wed, 29 Sep 2021 17:49:25 -0700
|
||||
Subject: [PATCH] osi: Prevent memory allocations with MSB set
|
||||
|
||||
Limit allocations on 32bit to 2 GB
|
||||
Limit allocations on 64bit to 8 Exabyte
|
||||
|
||||
Bug: 197868577
|
||||
Tag: #refactor
|
||||
Test: gd/cert/run
|
||||
Ignore-AOSP-First: Security
|
||||
Change-Id: I1c347084d7617b1e364a3241f1b37b398a2a6c6a
|
||||
(cherry picked from commit cee4d086c959e174328a0e173398d99f59ccbb1f)
|
||||
---
|
||||
osi/src/allocator.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/osi/src/allocator.c b/osi/src/allocator.c
|
||||
index 3d821a826..a81a206a9 100644
|
||||
--- a/osi/src/allocator.c
|
||||
+++ b/osi/src/allocator.c
|
||||
@@ -63,6 +63,7 @@ char *osi_strndup(const char *str, size_t len) {
|
||||
}
|
||||
|
||||
void *osi_malloc(size_t size) {
|
||||
+ assert((ssize_t)size >= 0);
|
||||
size_t real_size = allocation_tracker_resize_for_canary(size);
|
||||
void *ptr = malloc(real_size);
|
||||
assert(ptr);
|
||||
@@ -70,6 +71,7 @@ void *osi_malloc(size_t size) {
|
||||
}
|
||||
|
||||
void *osi_calloc(size_t size) {
|
||||
+ assert((ssize_t)size >= 0);
|
||||
size_t real_size = allocation_tracker_resize_for_canary(size);
|
||||
void *ptr = calloc(1, real_size);
|
||||
assert(ptr);
|
Loading…
Add table
Add a link
Reference in a new issue