saitoha / libsixel

A SIXEL encoder/decoder implementation derived from kmiya's sixel (https://github.com/saitoha/sixel).
MIT License
2.46k stars 82 forks source link

Add malloc size check #93

Closed knok closed 4 years ago

knok commented 5 years ago

80 caused by zero-size malloc.

knok commented 5 years ago

The original code seems size check in rpl_malloc: https://github.com/saitoha/libsixel/blob/master/converters/malloc_stub.c#L43 and if size equals 0, try to allocate 1 byte instead of 0,but this problem seems to access over this area.