Attempt to write outside buffer bounds
See original GitHub issueExpected Behavior
I want to extract an asar file using asar extract app.asar
command.
Actual Behavior
I get the following error:
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to write outside buffer bounds
To Reproduce
Run asar extract app.asar
command on asar file.
Screenshots https://i.imgur.com/zmNOSqq.png
Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Attempt to write outside buffer bounds" · Issue #7047 · ...
I've had multiple users report a RangeError: Attempt to write outside buffer bounds error that originates inside the Buffer constructor. Here's ...
Read more >MongoDB RangeError: attempt to write outside buffer bounds
Any idea when MongoDB throws RangeError: attempt to write outside buffer bounds? Please suggest. Below method insert the data in Mongodb
Read more >API "Attempt to write outside buffer bounds"
Hi,When I use the API with:GET /outbreaks/{id}/relationships/exportIt gives the following error: "Attempt to write outside buffer bounds"Do you know why?
Read more >Buffer out of bounds error when reading empty byte buffers
Buffer out of bounds error when reading empty byte buffers. 162 views ... RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to write outside buffer bounds.
Read more >Using rules to query MySQL, Attempt to access memory ...
You should be able to make external API calls from rules provided you have whitelisted the auth0 ... Attempt to write outside buffer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can someone please provide a minimal testcase for this?
The error “attempted to write outside buffer bounds” means exactly that, when attempting to write to the buffer it went outside its capacity, meaning it got past the amount of elements of what it’s supposed to have. In this case
CocosCreator
ASAR has been packed in such a way that it doesn’t even read properly the file because the contents have been encrypted.The unpacking process of the ASAR files starts from the very beginning, of course… The extractor needs to read the headers first and then verify its contents, like where each file is (you can read more about ASAR file format here: ASAR Format) afterwards, it just proceeds to unpack the file given its header information.
Going back to the discussion, as per example:
this means they have packaged their application with a specific transformation option that may have probably encrypted the contents of the headers… since when you open the file only the header is encrypted, and not the actual file contents, or even the names, which if you ask me if quite a smart thing to do!👌