Skip to content

Conversation

lovell
Copy link
Member

@lovell lovell commented Mar 19, 2025

Ensures we check both the old_position and result for a possible error when seeking.

Fixes https://issues.oss-fuzz.com/issues/404288018

@lovell lovell force-pushed the heifload-wait-for-file-size-eof branch from bcbc672 to d2416db Compare March 21, 2025 14:20
@jcupitt
Copy link
Member

jcupitt commented Mar 21, 2025

Oh nice. Does this stop the annoying bad seeks errors we were getting?

@lovell
Copy link
Member Author

lovell commented Mar 21, 2025

Not sure, perhaps we should check the return value of old_position sooner so we don't even perform the SEEK_SET?

@kleisauke
Copy link
Member

I'm wondering why libheif leaves the buffer/file/stream in this state. Seeking to SEEK_CUR ought to be safe. PR strukturag/libheif#1492 was also found using the same OSS-Fuzz reproducer.

Oh nice. Does this stop the annoying bad seeks errors we were getting?

AFAIK, the last occurrence of those bad seek errors was fixed via PR #1921. I also haven't seen such errors from "the wild", at least not in the past seven days (since our log data isn't retained any longer).

@jcupitt jcupitt merged commit d2b025c into libvips:master Mar 22, 2025
6 checks passed
@lovell lovell deleted the heifload-wait-for-file-size-eof branch March 22, 2025 18:09
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