Skip to content
  • Ralph Giles's avatar
    vorbiscomment: Fix handling very short files. · 77384f71
    Ralph Giles authored
    
    
    When setting up a new chain link, vcedit_open_callbacks
    always tries to read a new chunk at the edit of the
    stream identification loop. This could fail if the
    whole segment fits within a single, already buffered
    chunk.
    
    Instead, check for a new available page before trying
    to buffer more data. As long as there's a data page
    available after the header pages, this will succeed,
    exiting early without trying to load data unnecessarily.
    
    Thanks to lsd for reporting the issue.
    
    Signed-off-by: default avatarThomas Daede <tdaede@mozilla.com>
    77384f71