Fixing an index out of bounds on binary files smaller than a full hash window

pmeunier
Jul 1, 2021, 3:52 PM
F6S2RUVPUGZDCDAI7D2MZNSLUTQZU3CPQXX6LRQ2P7KGQCJV7BQQC

Dependencies

  • [2] TGA6QXGI Initial support for binary diffs (conflicts are not yet supported in the output)
  • [3] LV34DUJY Formatting

Change contents

  • replacement in libpijul/src/diff/bin.rs at line 46
    [2.3771][2.3771:3831]()
    let mut ad = RollingAdler32::from_buffer(&b[..window]);
    [2.3771]
    [2.3831]
    let mut ad = RollingAdler32::from_buffer(&b[..window.min(b.len())]);