From 2ae83f4f628d4da96f363d0668380ba1f753b867 Mon Sep 17 00:00:00 2001 From: Fabien Sanglard Date: Thu, 19 Jan 2017 11:13:20 -0800 Subject: [PATCH] Fix security vulnerability Test: hammerhead Bug: 32628763 Change-Id: I19a81b63fffee8f323a5925c7e8633fbd640b91c --- services/surfaceflinger/SurfaceFlinger.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 9d94c874fe..b62e701554 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1912,8 +1912,7 @@ void SurfaceFlinger::setTransactionState( if (s.client != NULL) { sp binder = s.client->asBinder(); if (binder != NULL) { - String16 desc(binder->getInterfaceDescriptor()); - if (desc == ISurfaceComposerClient::descriptor) { + if (binder->queryLocalInterface(ISurfaceComposerClient::descriptor) != NULL) { sp client( static_cast(s.client.get()) ); transactionFlags |= setClientStateLocked(client, s.state); } -- 2.11.0