Skip to content

Commit 01a0d70

Browse files
Calvin304Herschel
authored andcommitted
avm2: Fix parsing of methods with more than 127 arguments
this change follows section 4.5 of https://www.adobe.com/content/dam/acom/en/devnet/pdf/avm2overview.pdf (dead link, use an archive)
1 parent 5be7f42 commit 01a0d70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swf/src/avm2/read.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ impl<'a> Reader<'a> {
242242
}
243243

244244
fn read_method(&mut self) -> Result<Method> {
245-
let num_params = self.read_u8()?;
245+
let num_params = self.read_u30()?;
246246
let return_type = self.read_index()?;
247247
let mut params = Vec::with_capacity(num_params as usize);
248248
for _ in 0..num_params {

0 commit comments

Comments
 (0)