Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0981df6e authored by Nick Kralevich's avatar Nick Kralevich
Browse files

IMediaPlayer.cpp: make sure structures are initialized to 0

Credit https://code.google.com/p/android/issues/detail?id=183310

Bug: 23515142
Change-Id: Idbd66fb148bd0ac1dd78f8651d0164f2a41e2427
(cherry picked from commit b73b826c)
parent 9a2be5d4
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -510,6 +510,7 @@ status_t BnMediaPlayer::onTransact(
            CHECK_INTERFACE(IMediaPlayer, data, reply);
            CHECK_INTERFACE(IMediaPlayer, data, reply);


            struct sockaddr_in endpoint;
            struct sockaddr_in endpoint;
            memset(&endpoint, 0, sizeof(endpoint));
            int amt = data.readInt32();
            int amt = data.readInt32();
            if (amt == sizeof(endpoint)) {
            if (amt == sizeof(endpoint)) {
                data.read(&endpoint, sizeof(struct sockaddr_in));
                data.read(&endpoint, sizeof(struct sockaddr_in));
@@ -524,6 +525,7 @@ status_t BnMediaPlayer::onTransact(
            CHECK_INTERFACE(IMediaPlayer, data, reply);
            CHECK_INTERFACE(IMediaPlayer, data, reply);


            struct sockaddr_in endpoint;
            struct sockaddr_in endpoint;
            memset(&endpoint, 0, sizeof(endpoint));
            status_t res = getRetransmitEndpoint(&endpoint);
            status_t res = getRetransmitEndpoint(&endpoint);


            reply->writeInt32(res);
            reply->writeInt32(res);