2
0

Fix mpw_push_buf regression.

This commit is contained in:
Maarten Billemont 2017-08-02 23:13:51 -04:00
parent 10f2c107c6
commit bb8829b66f

View File

@ -38,7 +38,7 @@ int mpw_verbosity = inf_level;
bool mpw_push_buf(uint8_t **const buffer, size_t *const bufferSize, const void *pushBuffer, const size_t pushSize) { bool mpw_push_buf(uint8_t **const buffer, size_t *const bufferSize, const void *pushBuffer, const size_t pushSize) {
if (!buffer || !*buffer || !bufferSize || !pushBuffer || !pushSize) if (!buffer || !bufferSize || !pushBuffer || !pushSize)
return false; return false;
if (*bufferSize == (size_t)-1) if (*bufferSize == (size_t)-1)
// The buffer was marked as broken, it is missing a previous push. Abort to avoid corrupt content. // The buffer was marked as broken, it is missing a previous push. Abort to avoid corrupt content.