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

Replace low-level file access and HEIF file parsing #1242

Merged
merged 86 commits into from
Aug 21, 2024
Merged

Conversation

farindk
Copy link
Contributor

@farindk farindk commented Jul 15, 2024

This is a major rework of how libheif parses input files and handles reading and writing especially large files.
The goal is to

  • support reading and writing files that are larger than fits in memory,
  • to read/modify/write existing files.

@farindk farindk marked this pull request as draft July 15, 2024 19:26
@farindk farindk merged commit ac68f83 into master Aug 21, 2024
17 of 36 checks passed
@farindk
Copy link
Contributor Author

farindk commented Aug 21, 2024

Not finished, but progressed far enough that I decided to merge it into 'master'.

@kleisauke
Copy link
Contributor

The libvips fuzzers detected a crash in this implementation that didn't occur on v1.18.2.

$ build-v1.18.2/examples/heif-dec crash-a88cb4551382b7015408ee76bc731e2e99188db6
File contains 2 images
Could not decode image: 0: Invalid input: Unspecified: Corrupt frame detected
$ build-master/examples/heif-dec crash-a88cb4551382b7015408ee76bc731e2e99188db6
terminate called after throwing an instance of 'std::length_error'
  what():  vector::_M_default_append
Aborted (core dumped)

Is it too early to report bugs found by fuzzers? I could share the file privately or publicly, whichever you prefer.

@farindk
Copy link
Contributor Author

farindk commented Aug 24, 2024

@kleisauke Would be great if you could share the file. Just attaching it here would be fine I think.

@kleisauke
Copy link
Contributor

Great! You can find the file here:
crash-a88cb4551382b7015408ee76bc731e2e99188db6.zip (zipped due to GitHub's upload restrictions)

@farindk
Copy link
Contributor Author

farindk commented Aug 24, 2024

@kleisauke Thanks. The out-of-memory crash should be fixed now.

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.

3 participants