diff --git a/flash-lso/Cargo.toml b/flash-lso/Cargo.toml index 1bf5d88..b22e94d 100644 --- a/flash-lso/Cargo.toml +++ b/flash-lso/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flash-lso" -version = "0.3.0" +version = "0.3.1" authors = ["CUB3D "] description = "Fast and safe SOL/AMF0/AMF3 format parsing. Supports serde, Adobe flex and cyclic references" repository = "https://github.com/CUB3D/rust-sol" diff --git a/flash-lso/src/amf3.rs b/flash-lso/src/amf3.rs index 02131c6..29be857 100644 --- a/flash-lso/src/amf3.rs +++ b/flash-lso/src/amf3.rs @@ -301,7 +301,6 @@ impl AMF3Decoder { pub fn parse_element_object<'a>(&self, i: &'a [u8]) -> IResult<&'a [u8], Element> { let (i, mut length) = read_int(i)?; - println!("Obj length = {}", length); if length & REFERENCE_FLAG == 0 { let len_usize: usize = (length >> 1) diff --git a/flash-lso/src/element_cache.rs b/flash-lso/src/element_cache.rs index 9cb7a07..b4327eb 100644 --- a/flash-lso/src/element_cache.rs +++ b/flash-lso/src/element_cache.rs @@ -34,9 +34,7 @@ impl ElementCache { } pub fn to_length(&self, val: T, length: u32) -> Length { - println!("Looking up {:?}", val); if let Some(i) = self.get_index(val) { - println!("ref = {}", i); Length::Reference(i) } else { Length::Size(length) diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock index 11bf158..b80348a 100644 --- a/fuzz/Cargo.lock +++ b/fuzz/Cargo.lock @@ -12,6 +12,12 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" + [[package]] name = "bitflags" version = "1.2.1" @@ -36,6 +42,41 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41f21b581d2f0cb891554812435667bb9610d74feb1a4c6415bf09c28ff0381d" +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core", + "quote", + "syn", +] + [[package]] name = "derive-try-from-primitive" version = "1.0.0" @@ -47,13 +88,36 @@ dependencies = [ "syn", ] +[[package]] +name = "enumset" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "959a80a2062fedd66ed41d99736212de987b3a8c83a4c2cef243968075256bd1" +dependencies = [ + "enumset_derive", + "num-traits", + "serde", +] + +[[package]] +name = "enumset_derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74bef436ac71820c5cf768d7af9ba33121246b09a00e09a55d94ef8095a875ac" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "flash-lso" -version = "0.2.0" +version = "0.3.0" dependencies = [ "cookie-factory", "derive-try-from-primitive", - "log", + "enumset", "nom", ] @@ -65,6 +129,18 @@ dependencies = [ "libfuzzer-sys", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "lexical-core" version = "0.7.4" @@ -88,15 +164,6 @@ dependencies = [ "cc", ] -[[package]] -name = "log" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -dependencies = [ - "cfg-if", -] - [[package]] name = "memchr" version = "2.3.3" @@ -114,6 +181,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "num-traits" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +dependencies = [ + "autocfg", +] + [[package]] name = "proc-macro2" version = "1.0.19" @@ -138,12 +214,24 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +[[package]] +name = "serde" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" + [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strsim" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" + [[package]] name = "syn" version = "1.0.36"