diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-15 17:42:45 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-15 17:42:45 +0100 |
commit | f166c85751692f0a317b0eb129e6ed0557e281a4 (patch) | |
tree | 054187baea378379da977bf551c25cb51e2251e3 /src/ragel | |
parent | 03ff229b475f33081610ebff7e2256d2cac98a9d (diff) | |
download | rspamd-f166c85751692f0a317b0eb129e6ed0557e281a4.tar.gz rspamd-f166c85751692f0a317b0eb129e6ed0557e281a4.zip |
[Fix] Fix stack growing
Diffstat (limited to 'src/ragel')
-rw-r--r-- | src/ragel/smtp_received.rl | 3 |
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; } |