aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/archives.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-17 18:19:18 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-17 18:19:18 +0100
commit3351b30b969716f83d9166025c6d940e7eedde5f (patch)
treecd8f11524a1c0609002e70a45a4c736e68676827 /src/libmime/archives.c
parentc0d2f5b0c3da61cbb03de38bc59b6c5279366428 (diff)
downloadrspamd-3351b30b969716f83d9166025c6d940e7eedde5f.tar.gz
rspamd-3351b30b969716f83d9166025c6d940e7eedde5f.zip
[Minor] Do not use floating point when extending buffers
Diffstat (limited to 'src/libmime/archives.c')
-rw-r--r--src/libmime/archives.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/archives.c b/src/libmime/archives.c
index f3ad60067..d938dbcf3 100644
--- a/src/libmime/archives.c
+++ b/src/libmime/archives.c
@@ -1439,7 +1439,7 @@ rspamd_7zip_ucs2_to_utf8 (struct rspamd_task *task, const guchar *p,
UChar32 wc;
UBool is_error = 0;
- res = g_string_sized_new ((end - p) * 1.5 + sizeof (wc) + 1);
+ res = g_string_sized_new ((end - p) * 3 / 2 + sizeof (wc) + 1);
up = (guint16 *)p;
while (src_pos < len) {