Skip to content

Conversation

nekifirus
Copy link
Contributor

@nekifirus nekifirus commented Nov 28, 2018

fix #1

  • If photo has no barcodes and file don't have EOI 0xFF, 0xD9 - zbar return {:error, "Premature end of JPEG file\n"} and all works correctly.

  • But If photo has barcode, zbar return {:ok, data: barcode_dada} and {:ok, data: "Premature end of JPEG file\n"}

All we need - add new clause and skip information about broken file - as result - we have barcode on broken file too, and application not raise.

@GregMefford
Copy link
Collaborator

Wow, I don't know how I missed the notification on this for so long! Sorry about that and thanks so much for taking the time to submit a PR! Let me play around with this a bit and get it merged.

@GregMefford GregMefford merged commit 3e91b5b into elixir-vision:master Aug 3, 2019
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

Successfully merging this pull request may close these issues.

Crash on jpeg with "Premature end of JPEG file"
2 participants