Skip to content

Commit

Permalink
Fix integer overflow in mediadrmserver
Browse files Browse the repository at this point in the history
bug:37710346
Change-Id: If18cfb5bb1d1f1b2997d2a0e1685590d674181f4
(cherry picked from commit eb21712)
  • Loading branch information
jefftinker authored and andi34 committed Aug 26, 2017
1 parent 1d73f65 commit c163d2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drm/mediadrm/plugins/clearkey/InitDataParser.cpp
Expand Up @@ -109,7 +109,7 @@ android::status_t InitDataParser::parsePssh(const Vector<uint8_t>& initData,
memcpy(&keyIdCount, &initData[readPosition], sizeof(keyIdCount));
keyIdCount = ntohl(keyIdCount);
readPosition += sizeof(keyIdCount);
if (readPosition + (keyIdCount * kKeyIdSize) !=
if (readPosition + ((uint64_t)keyIdCount * kKeyIdSize) !=
initData.size() - sizeof(uint32_t)) {
return android::ERROR_DRM_CANNOT_HANDLE;
}
Expand Down

0 comments on commit c163d2f

Please sign in to comment.