Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Out of memory error when parsing bytes #3

Copy link
Copy link
@frewsxcv

Description

@frewsxcv
Issue body actions
extern crate flac;

use std::io::{self, Read, Cursor};
use flac::{ByteStream, Stream};

fn main() {
    let input = b"\x66\x4c\x61\x43\x04\x30\x30\x30\x00\x00\x00\x00\x30\x30\x30\x30";
    let s = Stream::<ByteStream>::from_buffer(input);
    if let Ok(mut stream) = s {
        let _ = stream.info();
        let _ = stream.metadata();
        let mut iter = stream.iter();
        while iter.next().is_some() {
        }
    }
}
coreyf@aflstagingmachine ~/afl-flac-staging-area> cargo run --verbose
       Fresh strsim v0.3.0
       Fresh libc v0.2.5
       Fresh regex-syntax v0.2.2
       Fresh nom v1.1.0
       Fresh rustc-serialize v0.3.16
       Fresh gcc v0.3.21
       Fresh memchr v0.1.7
       Fresh hound v1.1.0
       Fresh afl-coverage-plugin v0.0.1 (file:///home/coreyf/afl-flac-staging-area)
       Fresh aho-corasick v0.4.0
       Fresh regex v0.1.48
       Fresh afl-coverage v0.0.1 (file:///home/coreyf/afl-flac-staging-area)
       Fresh docopt v0.6.78
       Fresh flac v0.1.0
       Fresh afl-staging-area v0.1.0 (file:///home/coreyf/afl-flac-staging-area)
     Running `target/debug/afl-staging-area`
fatal runtime error: out of memory
Process didn't exit successfully: `target/debug/afl-staging-area` (signal: 4)

Found using afl.rs

schneiderfelipe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.