X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=crypto%2Flibeddsa%2Flib%2Fburnstack.c;fp=crypto%2Flibeddsa%2Flib%2Fburnstack.c;h=acc140e21a0dbbd657a4d0a069a0580e296e1d79;hb=7bfbc0423ba40ea5156e06c8fb62bacd5ea93390;hp=0000000000000000000000000000000000000000;hpb=2ae349f5ed63b026cff763b35984dd36b330870a;p=zpackage diff --git a/crypto/libeddsa/lib/burnstack.c b/crypto/libeddsa/lib/burnstack.c new file mode 100644 index 0000000..acc140e --- /dev/null +++ b/crypto/libeddsa/lib/burnstack.c @@ -0,0 +1,21 @@ +#include + +#include "burn.h" +#include "burnstack.h" + + +#ifdef USE_STACKCLEAN + +/* + * burnstack - cleanup our stack + */ +void +burnstack(int len) +{ + uint8_t stack[1024]; + burn(stack, 1024); + if (len > 0) + burnstack(len-1024); +} + +#endif