Hi GNUtoo and others,

Denis 'GNUtoo' Carikli:
>> [0001-Revert-Point-ResXMLTree-to-a-copy-of-the-asset-buffe.patch
> The commit reverted by the patch above is this one:
>> commit 953d2a3493aaceb3209afc7eef1ff1e7f7242908
>> (replicant/replicant-6.0, m/replicant-6.0-dev) Author: Wolfgang
>> Wiedmeyer <wolf...@wiedmeyer.de> Date:   Thu Nov 2 23:01:34 2017 +0100
>>
>>     Point ResXMLTree to a copy of the asset buffer in
>> AssetManager::getPkgName() 
>>     This ensures that there is no dangling pointer when the asset is
>> closed. Without this fix, a device ends up in a boot loop when an app
>> is installed that was created using aapt2.
>>     
>>     Reference:
>>     
>> https://github.com/TwidereProject/Twidere-Android/issues/963#issuecomment-335616312
>>     
>>     Signed-off-by: Wolfgang Wiedmeyer <wolf...@wiedmeyer.de>
> 
> Your commit message could give a bit more context on the issue, for
> instance with something like that:
>> This reverts commit 953d2a3493aaceb3209afc7eef1ff1e7f7242908.
>>
>> The 953d2a3493aaceb3209afc7eef1ff1e7f7242908 commit (Point ResXMLTree
>> to a copy of the asset buffer in AssetManager::getPkgName()) was
>> a fix for preventing devices from ending in a boot loop when an
>> application that was created with aapt2 was installed.
>>
>> Since upstream has now fixed it we can now drop this patch to use
>> upstream's fix instead. 

please review the updated description for the revert commit.

side note: I pushed just now few of the merged branches to
git.replicant.us if you want to go look the end result.

Joonas
From bd9457c96f934c2d025cbf2fb0ed2145ea74fcbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylm...@iki.fi>
Date: Mon, 27 Aug 2018 13:38:07 -0400
Subject: [PATCH] Revert "Point ResXMLTree to a copy of the asset buffer in
 AssetManager::getPkgName()"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit 953d2a3493aaceb3209afc7eef1ff1e7f7242908.

The 953d2a3493aaceb3209afc7eef1ff1e7f7242908 commit (Point ResXMLTree
to a copy of the asset buffer in AssetManager::getPkgName()) was a fix
for preventing devices from ending in a boot loop when an application
that was created with aapt2 was installed.

Since upstream has now fixed it with commit "AssetManager: fix
use-after-free of asset" we can now drop this patch to use
upstream's fix instead.

Signed-off-by: Joonas Kylmälä <joonas.kylm...@iki.fi>
---
 libs/androidfw/AssetManager.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index f99154ea6fd..e6e45633dc4 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -421,7 +421,7 @@ String8 AssetManager::getPkgName(const char *apkPath) {
 
         Asset* manifestAsset = openNonAssetInPathLocked(kAndroidManifest, Asset::ACCESS_BUFFER, ap);
         tree.setTo(manifestAsset->getBuffer(true),
-		   manifestAsset->getLength(), true);
+                       manifestAsset->getLength());
         tree.restart();
 
         size_t len;
-- 
2.11.0

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to