Automattic / Automattic/node-canvas
Segfault when generating some indexed paletted PNGs
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
I'm trying to use canvas to draw some polygons and output an indexed, paletted png. This code works for some sets of polygons but for others I get the error:
```
libpng error: Wrote palette index exceeding num_palette
Segmentation fault (core dumped)
```
I've attached a script that generates this segfault every time on my machine, though on some other machines it just spits out the error and doesn't segfault.
[canvas-error.zip](https://github.com/Automattic/node-canvas/files/2699761/canvas-error.zip)
## Your Environment
* canvas@2.2.0
* libpng 1.6.x
* Environment is Fedora Linux 29
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.