summaryrefslogtreecommitdiffstats
path: root/src/ragel
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-15 17:42:45 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-15 17:42:45 +0100
commitf166c85751692f0a317b0eb129e6ed0557e281a4 (patch)
tree054187baea378379da977bf551c25cb51e2251e3 /src/ragel
parent03ff229b475f33081610ebff7e2256d2cac98a9d (diff)
downloadrspamd-f166c85751692f0a317b0eb129e6ed0557e281a4.tar.gz
rspamd-f166c85751692f0a317b0eb129e6ed0557e281a4.zip
[Fix] Fix stack growing
Diffstat (limited to 'src/ragel')
-rw-r--r--src/ragel/smtp_received.rl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ragel/smtp_received.rl b/src/ragel/smtp_received.rl
index f4a0ed7ba..dd2212de3 100644
--- a/src/ragel/smtp_received.rl
+++ b/src/ragel/smtp_received.rl
@@ -51,7 +51,8 @@
prepush {
if (top >= st_storage.size) {
- st_storage.data = realloc (st_storage.data, (top + 1) * 2);
+ st_storage.size = (top + 1) * 2;
+ st_storage.data = realloc (st_storage.data, st_storage.size * sizeof (int));
g_assert (st_storage.data != NULL);
stack = st_storage.data;
}