• Artem Bityutskiy's avatar
    UBIFS: do not write rubbish into truncation scanning node · 5b7a3a2e
    Artem Bityutskiy authored
    In the scanning code, in 'ubifs_add_snod()', we write rubbish into
    'snod->key', because we assume that on-flash truncation nodes have a key, but
    they do not. If the other parts of UBIFS then mistakenly try to look-up
    the truncation node key (they should not do this, but may do because of a bug),
    we can succeed and corrupt TNC. It looks like we did have such a situation in
    'sort_nodes()' in gc.c.
    Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
    5b7a3a2e
scan.c 9.37 KB