projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
625bf37
)
UBIFS: correct key comparison
author
Adrian Hunter
<ext-adrian.hunter@nokia.com>
Fri, 5 Sep 2008 12:20:04 +0000
(15:20 +0300)
committer
Artem Bityutskiy
<Artem.Bityutskiy@nokia.com>
Tue, 30 Sep 2008 08:12:57 +0000
(11:12 +0300)
The comparison was working, but more by accident than design.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
fs/ubifs/tnc_misc.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ubifs/tnc_misc.c
b/fs/ubifs/tnc_misc.c
index a25c1cc1f8d9df4e11fcaf6af3362f1606c9b259..b48db999903e6d34b40c5066a9f30844723b70f8 100644
(file)
--- a/
fs/ubifs/tnc_misc.c
+++ b/
fs/ubifs/tnc_misc.c
@@
-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",