62df66 bus-message: fix calculation of offsets table

2 files Authored by Zbigniew Jędrzejewski-Szmek 4 years ago, Committed by Packit Service 4 years ago,
    bus-message: fix calculation of offsets table
    
    The offsets specify the ends of variable length data. We would trust the
    incoming data, putting the offsets specified in our message
    into the offsets tables after doing some superficial verification.
    But when actually reading the data we apply alignment, so we would take
    the previous offset, align it, making it bigger then current offset, and
    then we'd try to read data of negative length.
    
    In the attached example, the message specifies the following offsets:
    [1, 4]
    but the alignment of those items is
    [1, 8]
    so we'd calculate the second item as starting at 8 and ending at 4.
    
    (cherry picked from commit 12603b84d2fb07603e2ea94b240c6b78ad17510e)
    
    Resolves: #1696224
    
    patch_name: 0167-bus-message-fix-calculation-of-offsets-table.patch
    present_in_specfile: true
    location_in_specfile: 167
    squash_commits: true