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

Commit fd20296c authored by git-you.kim72.gmail.com's avatar git-you.kim72.gmail.com Committed by Jean-Baptiste Queru
Browse files

Fix Issue #35489: drm content corruption on GB



If rawContent is copied into mediaBuf, readBuf is copied to wrong address.
mediaBuf should be forwarded by readBytes.

Change-Id: I4fc9c1f7f4e3d5dfe3c7e5cd92261608f6b3e248
Signed-off-by: default avatargit-you.kim72.gmail.com <you.kim72@gmail.com>
parent 28dba4fc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1478,13 +1478,13 @@ static int32_t drm_readBinaryContentFromInputStream(T_DRM_Session_Node* s, int32

    if (NULL != s->readBuf && s->readBufLen > 0) { /* read from backup buffer */
        if (leftLen <= s->readBufLen) {
            memcpy(mediaBuf, s->readBuf + s->readBufOff, leftLen);
            memcpy(mediaBuf + readBytes, s->readBuf + s->readBufOff, leftLen);
            s->readBufOff += leftLen;
            s->readBufLen -= leftLen;
            readBytes += leftLen;
            leftLen = 0;
        } else {
            memcpy(mediaBuf, s->readBuf + s->readBufOff, s->readBufLen);
            memcpy(mediaBuf + readBytes, s->readBuf + s->readBufOff, s->readBufLen);
            s->readBufOff += s->readBufLen;
            leftLen -= s->readBufLen;
            readBytes += s->readBufLen;