Commit eec11535 authored by Dan Carpenter's avatar Dan Carpenter Committed by Al Viro

hfs: fix hfs_readdir()

I was looking through static analysis warnings and there is a bug here
that goes all the way back to the start of git.  Basically we're copying
the pointer and nearby garbage instead of the data the fd.key pointer is
pointing to.
Signed-off-by: default avatarDan Carpenter <>
Reviewed-by: default avatarVyacheslav Dubeyko <>
Signed-off-by: default avatarAl Viro <>
parent b8826e50
......@@ -169,7 +169,7 @@ static int hfs_readdir(struct file *file, struct dir_context *ctx)
* Can be done after the list insertion; exclusion with
* hfs_delete_cat() is provided by directory lock.
memcpy(&rd->key, &fd.key, sizeof(struct hfs_cat_key));
memcpy(&rd->key, &fd.key->cat, sizeof(struct hfs_cat_key));
return err;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment