1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-16 00:04:40 +00:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Nick Craig-Wood
f79d46b07e mega VENDOR PATCH FIXME FIXME
Fix crash caused by compkey too short

Fixes #3055
2019-03-18 22:26:10 +00:00
2 changed files with 4 additions and 2 deletions

View File

@@ -37,8 +37,6 @@ func (d *Dir) Attr(ctx context.Context, a *fuse.Attr) (err error) {
a.Crtime = modTime
// FIXME include Valid so get some caching?
// FIXME fs.Debugf(d.path, "Dir.Attr %+v", a)
a.Size = 512
a.Blocks = 1
return nil
}

View File

@@ -721,6 +721,10 @@ func (m *Mega) addFSNode(itm FSNode) (*Node, error) {
switch {
case itm.T == FILE:
if len(compkey) < 8 {
m.logf("ignoring item: compkey too short (%d): %#v", len(compkey), itm)
return nil, nil
}
key = []uint32{compkey[0] ^ compkey[4], compkey[1] ^ compkey[5], compkey[2] ^ compkey[6], compkey[3] ^ compkey[7]}
default:
key = compkey