-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathStrings.json
More file actions
165 lines (165 loc) · 6.44 KB
/
Strings.json
File metadata and controls
165 lines (165 loc) · 6.44 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
{
"AUTOSAR": {
"A2-13-4": {
"properties": {
"allocated-target": [
"architecture",
"design",
"implementation"
],
"enforcement": "automated",
"obligation": "required"
},
"queries": [
{
"description": "The type of string literal as of C++0x was changed from 'array of char' to array of const char and therefore assignment to a non-const pointer is considered an error, which is reported as a warning by some compliers.",
"kind": "problem",
"name": "String literals shall not be assigned to non-constant pointers",
"precision": "very-high",
"severity": "warning",
"shared_implementation_short_name": "StringLiteralsAssignedToNonConstantPointersShared",
"short_name": "StringLiteralsAssignedToNonConstantPointers",
"tags": []
}
],
"title": "String literals shall not be assigned to non-constant pointers."
},
"A27-0-2": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "automated",
"obligation": "advisory"
},
"queries": [
{
"description": "The C++ string constructor will only terminate a C-Style string if the C-Style string is also null terminated.",
"kind": "problem",
"name": "A C-style string shall guarantee sufficient space for data and the null terminator",
"precision": "very-high",
"severity": "recommendation",
"shared_implementation_short_name": "BasicStringMayNotBeNullTerminated",
"short_name": "BasicStringMayNotBeNullTerminatedAutosar",
"tags": []
},
{
"description": "Certain operations may not null terminate CStyle strings which may cause unpredictable behavior.",
"kind": "problem",
"name": "A C-style string shall guarantee sufficient space for data and the null terminator",
"precision": "very-high",
"severity": "recommendation",
"shared_implementation_short_name": "OperationMayNotNullTerminateCStyleString",
"short_name": "OperationMayNotNullTerminateCStyleStringAutosar",
"tags": []
}
],
"title": "A C-style string shall guarantee sufficient space for data and the null terminator."
},
"A27-0-4": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "automated",
"obligation": "required"
},
"queries": [
{
"description": "C-style strings can be difficult to use correctly so std::string should be preferred.",
"kind": "problem",
"name": "C-style strings shall not be used",
"precision": "high",
"severity": "recommendation",
"short_name": "CStyleStringsUsed",
"tags": []
}
],
"title": "C-style strings shall not be used."
},
"M5-0-11": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "automated",
"obligation": "required"
},
"queries": [
{
"description": "The signedness of type char is implementation defined and therefore assigning non-character values to plain char types can cause undefined behavior.",
"kind": "problem",
"name": "The plain char type shall only be used for the storage and use of character values",
"precision": "very-high",
"severity": "recommendation",
"short_name": "PlainCharTypeShallOnlyBeUsedForTheStorageAndUseOfCharacterValues",
"tags": []
}
],
"title": "The plain char type shall only be used for the storage and use of character values."
},
"M5-0-12": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "automated",
"obligation": "required"
},
"queries": [
{
"description": "The signedness of the plain char type is implementation defined and thus signed char and unsigned char should only be used for numeric data and the plain char type may only be used for character data.",
"kind": "problem",
"name": "Signed char and unsigned char type shall only be used for the storage and use of numeric values",
"precision": "very-high",
"severity": "recommendation",
"short_name": "SignedCharAndUnsignedCharTypeShallOnlyBeUsedForTheStorageAndUseOfNumericValues",
"tags": []
}
],
"title": "Signed char and unsigned char type shall only be used for the storage and use of numeric values."
}
},
"CERT-C++": {
"STR50-CPP": {
"properties": {
"obligation": "rule"
},
"queries": [
{
"description": "The C++ string constructor will only terminate a C-Style string if the C-Style string is also null terminated.",
"kind": "problem",
"name": "A C-style string shall guarantee sufficient space for data and the null terminator",
"precision": "very-high",
"severity": "recommendation",
"shared_implementation_short_name": "BasicStringMayNotBeNullTerminated",
"short_name": "BasicStringMayNotBeNullTerminatedCert",
"tags": [
"external/cert/severity/high",
"external/cert/likelihood/likely",
"external/cert/remediation-cost/medium",
"external/cert/priority/p18",
"external/cert/level/l1"
]
},
{
"description": "Certain operations may not null terminate CStyle strings which may cause unpredictable behavior.",
"kind": "problem",
"name": "A C-style string shall guarantee sufficient space for data and the null terminator",
"precision": "very-high",
"severity": "recommendation",
"shared_implementation_short_name": "OperationMayNotNullTerminateCStyleString",
"short_name": "OperationMayNotNullTerminateCStyleStringCert",
"tags": [
"external/cert/severity/high",
"external/cert/likelihood/likely",
"external/cert/remediation-cost/medium",
"external/cert/priority/p18",
"external/cert/level/l1"
]
}
],
"title": "Guarantee that storage for strings has sufficient space for character data and the null terminator"
}
}
}