Skip to content

Commit fd20296

Browse files
YouKimJean-Baptiste Queru
authored andcommitted
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: git-you.kim72.gmail.com <you.kim72@gmail.com>
1 parent 28dba4f commit fd20296

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

media/libdrm/mobile1/src/objmng/drm_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,13 +1478,13 @@ static int32_t drm_readBinaryContentFromInputStream(T_DRM_Session_Node* s, int32
14781478

14791479
if (NULL != s->readBuf && s->readBufLen > 0) { /* read from backup buffer */
14801480
if (leftLen <= s->readBufLen) {
1481-
memcpy(mediaBuf, s->readBuf + s->readBufOff, leftLen);
1481+
memcpy(mediaBuf + readBytes, s->readBuf + s->readBufOff, leftLen);
14821482
s->readBufOff += leftLen;
14831483
s->readBufLen -= leftLen;
14841484
readBytes += leftLen;
14851485
leftLen = 0;
14861486
} else {
1487-
memcpy(mediaBuf, s->readBuf + s->readBufOff, s->readBufLen);
1487+
memcpy(mediaBuf + readBytes, s->readBuf + s->readBufOff, s->readBufLen);
14881488
s->readBufOff += s->readBufLen;
14891489
leftLen -= s->readBufLen;
14901490
readBytes += s->readBufLen;

0 commit comments

Comments
 (0)