1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
3 #include "tomcrypt_private.h"
4 
5 /**
6    @file burn_stack.c
7    Burn stack, Tom St Denis
8 */
9 
10 /**
11    Burn some stack memory
12    @param len amount of stack to burn in bytes
13 */
burn_stack(unsigned long len)14 void burn_stack(unsigned long len)
15 {
16    unsigned char buf[32];
17    zeromem(buf, sizeof(buf));
18    if (len > (unsigned long)sizeof(buf)) {
19       burn_stack(len - sizeof(buf));
20    }
21 }
22 
23 
24