mirror of
https://github.com/godotengine/godot.git
synced 2024-10-23 13:41:43 +00:00
add check for negative buffer_size inside start_(de)compression method.
(cherry picked from commit da886006a0
)
This commit is contained in:
parent
2042283d32
commit
c00caa766e
|
@ -76,6 +76,7 @@ Error StreamPeerGZIP::start_decompression(bool p_is_deflate, int buffer_size) {
|
|||
|
||||
Error StreamPeerGZIP::_start(bool p_compress, bool p_is_deflate, int buffer_size) {
|
||||
ERR_FAIL_COND_V(ctx != nullptr, ERR_ALREADY_IN_USE);
|
||||
ERR_FAIL_COND_V_MSG(buffer_size <= 0, ERR_INVALID_PARAMETER, "Invalid buffer size. It should be a positive integer.");
|
||||
clear();
|
||||
compressing = p_compress;
|
||||
rb.resize(nearest_shift(buffer_size - 1));
|
||||
|
|
Loading…
Reference in New Issue
Block a user