• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

Revisión114df4642694524969ca24749fc4cd81f91679fb (tree)
Tiempo2019-06-11 03:35:12
AutorMichael Wachenschwanz <mwachens@goog...>
CommiterNikoli Cartagena

Log Message

Clear the Parcel before writing an exception during a transaction

This prevents any object data from being accidentally overwritten by the
exception, which could cause unexpected malformed objects to be sent
across the transaction.

Test: atest CtsOsTestCases:ParcelTest#testExceptionOverwritesObject
Bug: 34175893
Change-Id: Iaf80a0ad711762992b8ae60f76d861c97a403013
Merged-In: Iaf80a0ad711762992b8ae60f76d861c97a403013
(cherry picked from commit f8ef5bcf21c87d8617f5e11810cc94350298d114)

Cambiar Resumen

Diferencia incremental

--- a/core/java/android/os/Binder.java
+++ b/core/java/android/os/Binder.java
@@ -574,6 +574,8 @@ public class Binder implements IBinder {
574574 Log.w(TAG, "Caught a RuntimeException from the binder stub implementation.", e);
575575 }
576576 } else {
577+ // Clear the parcel before writing the exception
578+ reply.setDataSize(0);
577579 reply.setDataPosition(0);
578580 reply.writeException(e);
579581 }