Fix 'The value of offset is out of range.'

This commit is contained in:
SpreedBLood 2021-03-13 03:13:03 +01:00
parent c0bd2fa6c1
commit f52e7773a3

View File

@ -197,6 +197,10 @@ SWFBuffer.prototype.readShapeWithStyle = function() {
*/ */
SWFBuffer.prototype.readTagCodeAndLength = function() { SWFBuffer.prototype.readTagCodeAndLength = function() {
if (this.pointer === this.length) {
return false;
}
var n = this.readUIntLE(16) var n = this.readUIntLE(16)
, tagType = n >> 6 , tagType = n >> 6
, tagLength = n & RECORDHEADER_LENTH_FULL; , tagLength = n & RECORDHEADER_LENTH_FULL;