Skip to content
Myr

stb_image_write: handle malloc failure in zlib

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parent 4fd9019 · Browse files · 1 file+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:stb_image_write.h+2 added
815 unmodified lines
816 unsigned int bitbuf=0;817 int i,j, bitcount=0;818 unsigned char *out = NULL;819 unsigned char ***hash_table = (unsigned char***) STBIW_MALLOC(stbiw__ZHASH * sizeof(char**));820 if (hash_table == NULL)821 return NULL;822 if (quality < 5) quality = 5;823824 stbiw__sbpush(out, 0x78); // DEFLATE 32K window825 stbiw__sbpush(out, 0x5e); // FLEVEL = 1
734 unmodified lines