Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2094c334 authored by Adrian Hunter's avatar Adrian Hunter Committed by Artem Bityutskiy
Browse files

UBIFS: correct key comparison



The comparison was working, but more by accident than design.

Signed-off-by: default avatarAdrian Hunter <ext-adrian.hunter@nokia.com>
parent 625bf371
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -480,8 +480,8 @@ int ubifs_tnc_read_node(struct ubifs_info *c, struct ubifs_zbranch *zbr,
	}

	/* Make sure the key of the read node is correct */
	key_read(c, key, &key1);
	if (memcmp(node + UBIFS_KEY_OFFSET, &key1, c->key_len)) {
	key_read(c, node + UBIFS_KEY_OFFSET, &key1);
	if (!keys_eq(c, key, &key1)) {
		ubifs_err("bad key in node at LEB %d:%d",
			  zbr->lnum, zbr->offs);
		dbg_tnc("looked for key %s found node's key %s",