lkml.org 
[lkml]   [2016]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] hfs: fix hfs_readdir()
Hm, I completely didn't see that it was a union instead of a struct.  I
still think my fix is actually correct though. Now that you point out
the union, I see that my change is equivalent to just removing the '&'
char.

- memcpy(&rd->key, &fd.key, sizeof(struct hfs_cat_key));
+ memcpy(&rd->key, fd.key, sizeof(struct hfs_cat_key));

We don't want to copy sizeof(*fd.key) because that would write past the
end of the destination struct.

On Tue, Jan 26, 2016 at 10:18:56AM -0800, Viacheslav Dubeyko wrote:
> Another worry could be the "search_key" field of the struct
> hfs_find_data.

I don't understand what you mean here.

regards,
dan carpenter

\
 
 \ /
  Last update: 2016-01-26 20:21    [W:1.147 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site