• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# libboundscheck
2
3#### 介绍
4- 遵循C11 Annex K (Bounds-checking interfaces)的标准,选取并实现了常见的内存/字符串操作类的函数,如memcpy_s、strcpy_s等函数。
5- 未来将分析C11 Annex K中的其他标准函数,如果有必要,将在该组织中实现。
6- 处理边界检查函数的版本发布、更新以及维护。
7
8#### 函数清单
9
10- memcpy_s
11- wmemcpy_s
12- memmove_s
13- wmemmove_s
14- memset_s
15- strcpy_s
16- wcscpy_s
17- strncpy_s
18- wcsncpy_s
19- strcat_s
20- wcscat_s
21- strncat_s
22- wcsncat_s
23- strtok_s
24- wcstok_s
25- sprintf_s
26- swprintf_s
27- vsprintf_s
28- vswprintf_s
29- snprintf_s
30- vsnprintf_s
31- scanf_s
32- wscanf_s
33- vscanf_s
34- vwscanf_s
35- fscanf_s
36- fwscanf_s
37- vfscanf_s
38- vfwscanf_s
39- sscanf_s
40- swscanf_s
41- vsscanf_s
42- vswscanf_s
43- gets_s
44
45#### 构建方法
46
47运行命令
48```
49make CC=gcc
50```
51生成的动态库libboundscheck.so存放在新创建的lib目录下。
52
53#### 使用方法
541. 将构建生成的动态库libboundscheck.so放到库文件目录下,例如:"/usr/local/lib/"。
55
562. 为使用libboundscheck,编译程序时需增加编译参数"-lboundscheck",例如:"gcc -g -o test test.c -lboundscheck"。