• Calder Kitagawa's avatar
    [Zucchini]: Stricter patch read · 63f65c0a
    Calder Kitagawa authored
    This enforces a stricter patch read in a few ways:
    - Raw Deltas of 0 are forbidden. These are unused values which have no
      meaning and should not appear.
    - Extra Data length must be equal to the size of the patch element
      minus the total length of equivalences.
    - Element match headers must have regions of nonzero length.
    
    This change also annotates a number of "unsafe" values read from the
    patch that could be sources of error later if unchecked. It also adds
    caveats about under what conditions emitted values are considered to
    be safe/unsafe.
    
    Bug: 837096
    Change-Id: I1b7614d92b85c0a1546d8dccb7d371d28b2a4cd3
    Reviewed-on: https://chromium-review.googlesource.com/1037186
    Commit-Queue: Calder Kitagawa <ckitagawa@google.com>
    Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
    Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#555396}
    63f65c0a
patch_reader.h 9.25 KB