OSDN Git Service

Fix security vulnerability
authorFabien Sanglard <sanglardf@google.com>
Thu, 19 Jan 2017 19:13:20 +0000 (11:13 -0800)
committerFabien Sanglard <sanglardf@google.com>
Thu, 19 Jan 2017 19:13:20 +0000 (11:13 -0800)
Test: hammerhead
Bug: 32628763
Change-Id: I19a81b63fffee8f323a5925c7e8633fbd640b91c

services/surfaceflinger/SurfaceFlinger.cpp

index 9d94c87..b62e701 100644 (file)
@@ -1912,8 +1912,7 @@ void SurfaceFlinger::setTransactionState(
         if (s.client != NULL) {
             sp<IBinder> binder = s.client->asBinder();
             if (binder != NULL) {
-                String16 desc(binder->getInterfaceDescriptor());
-                if (desc == ISurfaceComposerClient::descriptor) {
+                if (binder->queryLocalInterface(ISurfaceComposerClient::descriptor) != NULL) {
                     sp<Client> client( static_cast<Client *>(s.client.get()) );
                     transactionFlags |= setClientStateLocked(client, s.state);
                 }