GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PWS_MEMNUKE (3)

NAME

pws_str_memnuke - Over-write the contents of a memory buffer with zeros

CONTENTS

Library
Synopsis
Description
Caveats
See Also

LIBRARY

-lpwstor

SYNOPSIS


.In pwstor.h void
.Fo pws_str_memnuke volatile void *b size_t sz
.Fc

DESCRIPTION

The function pws_str_memnuke will over-write sz bytes of memory from the pointer referenced by b with zeros. This is useful for clearing a memory buffer which contained, for example, a clear-text password. Calls to free do not zero the memory, so another application could conceivably allocate memory which contains sensitive data from another application. Calling pws_str_memnuke on the buffer prior to calling free on it will prevent this potentially dangerous condition.

CAVEATS

The pws_str_memnuke function cannot indicate an error, for example if it returns prematurely because a null-pointer was passed to it. It requires that b be cast (volatile) in order to prevent compilers from optimizing it out so that memory is safely wiped.

SEE ALSO

pwstor(3)
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.