Merge pull request #32717 from qarmin/decompress_crash

Fix decompress PoolByteArray crash
This commit is contained in:
Rémi Verschelde 2019-10-11 08:22:00 +02:00 committed by GitHub
commit 22d100ad3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -591,9 +591,9 @@ struct _VariantCall {
int buffer_size = (int)(*p_args[0]);
if (buffer_size < 0) {
if (buffer_size <= 0) {
r_ret = decompressed;
ERR_FAIL_MSG("Decompression buffer size is less than zero.");
ERR_FAIL_MSG("Decompression buffer size must be greater than zero.");
}
decompressed.resize(buffer_size);