提交 2271d556 编写于 作者: W wusongqing

updated docs

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 03f6a622
......@@ -664,7 +664,7 @@ int c[][8] = {
Note:
- If the left brace is placed at the end of the line, the corresponding right brace shoud be placed into a new line.
- If the left brace is placed at the end of the line, the corresponding right brace should be placed into a new line.
- If the left brace is followed by the content, the corresponding right brace should also follow the content.
### <a name="r2-12"></a>Rule 2.12 Initialize each member in a separate line during struct and union member initialization.
......
......@@ -1736,7 +1736,7 @@ An incorrect format string may cause memory damage or abnormal program terminati
## Ensure that the format parameter is not controlled by external data when a formatted input/output function is called
**\[Description]**
When a formatted function is called, the **format** parameter provided or concatenated by external data will cause a string formatting vulnerability. Take the formatted output function of the C standard library as an example. When the **format** parameter is externally controllable, an attacker can use the %n convertor to write an integer to a specified address, use the %x or %d convertor to view the stack or register content, or use the %s convertor to cause process crashes or other issues.
When a formatted function is called, the **format** parameter provided or concatenated by external data will cause a string formatting vulnerability. Take the formatted output function of the C standard library as an example. When the **format** parameter is externally controllable, an attacker can use the %n converter to write an integer to a specified address, use the %x or %d converter to view the stack or register content, or use the %s converter to cause process crashes or other issues.
Common formatted functions are as follows:
......
......@@ -935,17 +935,6 @@ The correct method is to delete unnecessary code directly. If necessary, conside
Here, commenting out refers to the removal of code from compilation without actually deleting it. This is done by using /* */, //, #if 0, #ifdef NEVER_DEFINED, and so on.
### <a name="a4-4-1"></a>Rec 4.4.1 Delivered code cannot contain a TODO/TBD/FIXME comment.
TODO/TBD comments are used to describe required improvements and supplements.
FIXME comments are used to describe defects that need fixing.
They should have a standardized style, which facilitates text search. Example:
```cpp
// TODO(<author-name>): XX
// FIXME: XX
```
# <a name="c5"></a>5 Header Files
## <a name="c5-1"></a> Header File Responsibility
A header file is an external interface of a module or file. The design of a header file shows most of the system design.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册