emile - handle possible invalid compress type more gracefully

check length return is < 0 and handle that.

@fix
This commit is contained in:
Carsten Haitzler 2022-05-18 12:12:30 +01:00
parent f682178017
commit b0232b5e1d
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ emile_compress(const Eina_Binbuf *data,
Eina_Bool ok = EINA_FALSE;
length = _emile_compress_buffer_size(data, t);
if (length < 0) return NULL;
compact = malloc(length);
if (!compact)