mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
vfs_fruit: fix unpacking of AppleDouble files
OS X AppleDouble files may contain a FinderInfo AppleDouble entry larger then 32 bytes containing additional packed xattrs. ad_unpack() must deal with this in a way that allows callers to possibly fixup the entry. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
5e5f060907
commit
ef4b415510
@ -596,12 +596,14 @@ static bool ad_unpack(struct adouble *ad, const int nentries)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (off > bufsize) {
|
||||
if ((off > bufsize) && (eid != ADEID_RFORK)) {
|
||||
DEBUG(1, ("bogus eid %d: off: %" PRIu32 ", len: %" PRIu32 "\n",
|
||||
eid, off, len));
|
||||
return false;
|
||||
}
|
||||
if ((eid != ADEID_RFORK) && ((off + len) > bufsize)) {
|
||||
if ((eid != ADEID_RFORK) &&
|
||||
(eid != ADEID_FINDERI) &&
|
||||
((off + len) > bufsize)) {
|
||||
DEBUG(1, ("bogus eid %d: off: %" PRIu32 ", len: %" PRIu32 "\n",
|
||||
eid, off, len));
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user