File: secbuf.h

package info (click to toggle)
vsftpd 3.0.3-12
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,548 kB
  • sloc: ansic: 16,632; sh: 267; makefile: 51; python: 18
file content (27 lines) | stat: -rw-r--r-- 865 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef VSF_SECBUF_H
#define VSF_SECBUF_H

/* vsf_secbuf_alloc()
 * PURPOSE
 * Allocate a "secure buffer". A secure buffer is one which will attempt to
 * catch out of bounds accesses by crashing the program (rather than
 * corrupting memory). It works by using UNIX memory protection. It isn't
 * foolproof.
 * PARAMETERS
 * p_ptr        - pointer to a pointer which is to contain the secure buffer.
 *                Any previous buffer pointed to is freed.
 * size         - size in bytes required for the secure buffer.
 */
void vsf_secbuf_alloc(char** p_ptr, unsigned int size);

/* vsf_secbuf_free()
 * PURPOSE
 * Frees a "secure buffer".
 * PARAMETERS
 * p_ptr        - pointer to a pointer containing the buffer to be freed. The
 *                buffer pointer is nullified by this call.
 */
void vsf_secbuf_free(char** p_ptr);

#endif /* VSF_SECBUF_H */