Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: base/android/java/src/org/chromium/base/library_loader/Linker.java

Issue 371943003: Set parcel data position to 0 when cloning the relro bundle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/library_loader/Linker.java
diff --git a/base/android/java/src/org/chromium/base/library_loader/Linker.java b/base/android/java/src/org/chromium/base/library_loader/Linker.java
index 292a62091792b406ff5c0cf5effbcb3ef2365433..49a76b6a66d2ace3fede660143c564d0e49811a7 100644
--- a/base/android/java/src/org/chromium/base/library_loader/Linker.java
+++ b/base/android/java/src/org/chromium/base/library_loader/Linker.java
@@ -489,14 +489,15 @@ public class Linker {
if (bundle != null) {
bundle.setClassLoader(LibInfo.class.getClassLoader());
clonedBundle = new Bundle(LibInfo.class.getClassLoader());
- Parcel p = Parcel.obtain();
- bundle.writeToParcel(p, 0);
- clonedBundle.readFromParcel(p);
- p.recycle();
+ Parcel parcel = Parcel.obtain();
+ bundle.writeToParcel(parcel, 0);
+ parcel.setDataPosition(0);
+ clonedBundle.readFromParcel(parcel);
+ parcel.recycle();
}
if (DEBUG) {
Log.i(TAG, "useSharedRelros() called with " + bundle +
- ",cloned " + clonedBundle);
+ ", cloned " + clonedBundle);
}
synchronized (Linker.class) {
// Note that in certain cases, this can be called before
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698