mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Another utility function, to free a string containing sensitive data.
[originally from svn r9319]
This commit is contained in:
parent
535d77abf0
commit
ff5a9c77fd
8
misc.c
8
misc.c
@ -200,6 +200,14 @@ char *dupcat(const char *s1, ...)
|
||||
return p;
|
||||
}
|
||||
|
||||
void burnstr(char *string) /* sfree(str), only clear it first */
|
||||
{
|
||||
if (string) {
|
||||
memset(string, 0, strlen(string));
|
||||
sfree(string);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Do an sprintf(), but into a custom-allocated buffer.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user