Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlicWriter panics during to postage stamp creation. #5

Closed
wangds opened this issue Oct 22, 2016 · 0 comments
Closed

FlicWriter panics during to postage stamp creation. #5

wangds opened this issue Oct 22, 2016 · 0 comments

Comments

@wangds
Copy link
Owner

wangds commented Oct 22, 2016

In commit 4709cfc src/codec/codec018.rs:145,
the postage stamp is initialised with:

let mut pstamp = Vec::with_capacity(dst_w * dst_h);

It should instead be initialised with:

let mut pstamp = vec![0; dst_w * dst_h];

Vec::with_capacity does not allocate any elements, causing a panic due to
index out of range.

@wangds wangds closed this as completed in 8eaf56c Oct 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant