From 5b5237c23ffda1415f239407eeed3983a8e0adbe Mon Sep 17 00:00:00 2001 From: Moritz Schulte Date: Sat, 1 Mar 2003 23:22:12 +0000 Subject: 2003-02-28 Moritz Schulte * secmem.c (DEFAULT_PAGESIZE): New symbol. (init_pool): Use DEFAULT_PAGESIZE. 2003-02-23 Moritz Schulte * secmem.h: Fix typo in declaration of _gcry_secmem_term. * sexp.c: Move macro definitions of `digitp', `octdigit', `alphap' and `hexdigit' ... * g10lib.h: ... here. * misc.c (_gcry_burn_stack): New function (former name: burn_stack). * g10lib.h (burn_stack): Declare _gcry_burn_stack(). --- src/misc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/misc.c') diff --git a/src/misc.c b/src/misc.c index 178eab5d..5e43302c 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1,5 +1,5 @@ /* misc.c - * Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * @@ -229,3 +229,14 @@ _gcry_log_printf (const char *fmt, ...) va_end(arg_ptr); } } + +void +_gcry_burn_stack (int bytes) +{ + char buf[64]; + + memset (buf, 0, sizeof buf); + bytes -= sizeof buf; + if (bytes > 0) + _gcry_burn_stack (bytes); +} -- cgit v1.2.1