librasn / rasn

A Safe #[no_std] ASN.1 Codec Framework
Other
183 stars 43 forks source link

stack overflow when comparing &ObjectIdentifier with &[u32] #222

Closed knecht closed 4 months ago

knecht commented 4 months ago
#[test]
fn test_stack_overflow() {
    let arr: &[u32] = &[1, 2, 3];
    let oid = ObjectIdentifier::new(arr).unwrap();
    if &oid != arr {
        assert!(false);
    }
    println!("done");
}

results in fatal runtime error: stack overflow at least with rust-1.74.1

XAMPPRocky commented 4 months ago

Thank you for your issue! This is probably a deref recursion issue in the trait implementation. It should be a simple one line fix, I'd be happy to review a PR as I'm a bit busy myself right now.