Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/libs/tomcrypt/src/misc/burn_stack.c
5971 views
1
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
2
*
3
* LibTomCrypt is a library that provides various cryptographic
4
* algorithms in a highly modular and flexible manner.
5
*
6
* The library is free for all purposes without any express
7
* guarantee it works.
8
*/
9
#include "tomcrypt.h"
10
11
/**
12
@file burn_stack.c
13
Burn stack, Tom St Denis
14
*/
15
16
/**
17
Burn some stack memory
18
@param len amount of stack to burn in bytes
19
*/
20
void burn_stack(unsigned long len)
21
{
22
unsigned char buf[32];
23
zeromem(buf, sizeof(buf));
24
if (len > (unsigned long)sizeof(buf))
25
burn_stack(len - sizeof(buf));
26
}
27
28