Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to read beyond buffer length #22

Open
yayscripting opened this issue Jun 4, 2014 · 2 comments
Open

Trying to read beyond buffer length #22

yayscripting opened this issue Jun 4, 2014 · 2 comments

Comments

@yayscripting
Copy link

Hi,

I'm getting the following error once I try to upload something via your example/upload file.

assert.js:102
  throw new assert.AssertionError({
        ^
AssertionError: Trying to read beyond buffer length
    at readUInt32 (buffer.js:649:12)
    at Buffer.readUInt32BE (buffer.js:673:10)
    at AES.decryptCBC (/Obfuscated/node_modules/mega/lib/crypto/index.js:78:21)
    at File._setAttributes (/Obfuscated/node_modules/mega/lib/file.js:67:28)
    at new File (/Obfuscated/node_modules/mega/lib/file.js:27:23)
    at Storage._importFile (/Obfuscated/node_modules/mega/lib/storage.js:229:32)
    at Array.forEach (native)
    at Storage.reload.api.on.deleted (/Obfuscated/node_modules/mega/lib/storage.js:175:16)
    at Request.API.request [as _callback] (/Obfuscated/node_modules/mega/lib/api.js:76:5)
    at Request.init.self.callback (/Obfuscated/node_modules/mega/node_modules/request/request.js:121:22)

Any clue how to solve it?

@yayscripting
Copy link
Author

In addition, all tests pass:

$ node ./node_modules/mega/test/index.js 
All passed.

@tonistiigi
Copy link
Owner

From the stack trace I would think this happens on reload not on upload.

If you can debug the contents of the api call then this would probably help(this would leak your file keys!). This may also be related to the missing support for shared files and directory links. Are you using those features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants