coderforlife / ms-compress

Open source implementations of Microsoft compression algorithms
205 stars 46 forks source link

ms_deflate doesn't like NULL in field #19

Closed nemequ closed 9 years ago

nemequ commented 9 years ago

ms_deflate will return MSCOMP_ARG_ERROR when the in field is NULL, even when in_avail == 0.

I do this in Squash a lot when calling it with MSCOMP_FINISH or MSCOMP_FLUSH and I don't have any more data. Getting around it now by passing a pointer to a uint8_t on the stack (still with 0 for in_avail) and ms-compress is fine with it.