diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-14 14:23:48 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-14 14:39:50 +0000 |
commit | 43763bea31d65241263b23ff6fda3fc47f51bd6e (patch) | |
tree | 51571098f75f6c737a9445affa083f994c3c03a7 /src | |
parent | e8fb8243b906eb7e2b1f307933c09f8fdde3e330 (diff) | |
download | rspamd-43763bea31d65241263b23ff6fda3fc47f51bd6e.tar.gz rspamd-43763bea31d65241263b23ff6fda3fc47f51bd6e.zip |
[Fix] Do not reallocate completed zstd buffer
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/lua_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c index 064aa53f8..3ca34b4cc 100644 --- a/src/lua/lua_util.c +++ b/src/lua/lua_util.c @@ -1790,7 +1790,7 @@ lua_util_zstd_decompress (lua_State *L) return 2; } - if (zout.pos == zout.size) { + if (zin.pos < zin.size && zout.pos == zout.size) { /* We need to extend output buffer */ zout.size = zout.size * 1.5 + 1.0; out = g_realloc (zout.dst, zout.size); |