-
Notifications
You must be signed in to change notification settings - Fork 1
/
string_safe.h
52 lines (40 loc) · 991 Bytes
/
string_safe.h
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
IIS LDAP Authentication Module
Copyright 2006 Inflection Technology, LLC
For more information, visit http://www.inflectiontech.com.
Released under LGPL terms.
Some portions Copyright Salvador Salanova Fortmann.
Some portions Copyright Microsoft Corporation.
File Name: string_safe.h
Abstract:
Visual Studio 2003 (or earlier) does not include new string
manipulation functions with maximum buffer sizes. This is
essential to avoiding buffer overflow issues.
VS 2005 includes strlcpy() and strlcat(). The function
strlreplace() is not included. To build with VS 2005,
simply uncomment the #define VS2005 in ldapauth.h.
--*/
#ifndef _STRL_FUNCTIONS_
#define _STRL_FUNCTIONS_
#ifndef VS2005
size_t
strlcpy(
char *dst,
const char *src,
size_t size
);
size_t
strlcat(
char *dst,
const char *src,
size_t size
);
#endif /* VS2005 */
size_t
strlreplace(
char *dst,
char *search,
char *replace,
size_t size
);
#endif /* _STRL_FUNCTIONS_ */