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: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by Dan Carpenter and committed by Al Viro eec11535 b8826e50

+1 -1
+1 -1
fs/hfs/dir.c
··· 169 * Can be done after the list insertion; exclusion with 170 * hfs_delete_cat() is provided by directory lock. 171 */ 172 - memcpy(&rd->key, &fd.key, sizeof(struct hfs_cat_key)); 173 out: 174 hfs_find_exit(&fd); 175 return err;
··· 169 * Can be done after the list insertion; exclusion with 170 * hfs_delete_cat() is provided by directory lock. 171 */ 172 + memcpy(&rd->key, &fd.key->cat, sizeof(struct hfs_cat_key)); 173 out: 174 hfs_find_exit(&fd); 175 return err;