From f6b403581e1c2839a696e474c9479fe7e68e760f Mon Sep 17 00:00:00 2001 From: Mikko Ohtamaa Date: Mon, 8 Feb 2021 12:17:53 +0100 Subject: [PATCH] Small clean up on call stack section Spelling, clarified what items go to the call stack and how any attack is executed --- docs/security-considerations.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst index 849f81803..9cb1e6ea9 100644 --- a/docs/security-considerations.rst +++ b/docs/security-considerations.rst @@ -181,13 +181,14 @@ Sending and Receiving Ether contract. Again, the best practice here is to use a :ref:`"withdraw" pattern instead of a "send" pattern `. -Callstack Depth -=============== +Call stack Depth +================ External function calls can fail any time because they exceed the maximum call stack of 1024. In such situations, Solidity throws an exception. Malicious actors might be able to force the call stack to a high value -before they interact with your contract. +before they interact with your contract, by controlling the number of calls +and local function variables on the stack. Note that ``.send()`` does **not** throw an exception if the call stack is depleted but rather returns ``false`` in that case. The low-level functions