提交 2094c334 编写于 作者: A Adrian Hunter 提交者: Artem Bityutskiy

UBIFS: correct key comparison

The comparison was working, but more by accident than design.
Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com>
上级 625bf371
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册