ERR_BUFFER_OUT_OF_BOUNDS while parsing png (windows, linux subsystem)
See original GitHub issueRunning imageSize
on the attached png throws an out of bounds exeption while using Linux on Windows. The package works fine for other png and jpg files. The package works fine parsing the same file on macOS.
Error:
internal/buffer.js:70
throw new ERR_BUFFER_OUT_OF_BOUNDS();
^
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to access memory outside buffer bounds
at boundsError (internal/buffer.js:70:11)
at Buffer.readUInt16LE (internal/buffer.js:229:5)
at Object.validate (/<redacted>/node_modules/image-size/dist/types/cur.js:7:20)
at finder (/<redacted>/node_modules/image-size/dist/detector.js:26:55)
at Array.find (<anonymous>)
at Object.detector (/<redacted>/node_modules/image-size/dist/detector.js:27:17)
at lookup (/<redacted>/node_modules/image-size/dist/index.js:32:29)
at imageSize (/<redacted>/node_modules/image-size/dist/index.js:102:16)
at <redacted> (/<redacted>/makeManifest.js:20:7)
code: 'ERR_BUFFER_OUT_OF_BOUNDS'
}
Image file:
System: OS: Ubuntu 18.04 bionic [Ubuntu on Windows 10] Kernel: x86_64 Linux 4.4.0-18362-Microsoft CPU: Intel Core i7-8565U @ 8x 2.001Ghz image-size version: 0.8.3 (npm)
Issue Analytics
- State:
- Created 4 years ago
- Comments:21 (10 by maintainers)
Top Results From Across the Web
Troubleshooting Windows Subsystem for Linux | Microsoft Learn
Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
Read more >FAQ's about Windows Subsystem for Linux - WSL
Find answers to frequently asked questions (FAQs) about the Windows Subsystem for Linux, such as 'What can I do with WSL?'.
Read more >Manual installation steps for older versions of WSL
Step by step instructions to manually install WSL on older versions of Windows, rather than using the wsl install command.
Read more >Advanced settings configuration in WSL - Microsoft Learn
A guide to the wsl.conf and .wslconfig files used for configuring settings when running multiple Linux distributions on Windows Subsystem ...
Read more >Release Notes for WSL | Microsoft Learn
Make wsl.exe present when the Windows Subsystem for Linux optional component is not enabled to improve feature discoverability. Change wsl.exe ...
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
Unfortunately the Node upgrade did not solve the issue…
We’re upgrading to Node 16. We hope this will also magically solve this issue. I will keep you posted