|
51 | 51 | "rule_info": "DS185832.md", |
52 | 52 | "patterns": [ |
53 | 53 | { |
54 | | - "pattern": "\\bstrcpy\\s*\\(([^,]+),([^,]+)\\)", |
| 54 | + "pattern": "\\bstrcpy\\s*\\(([^,]+),([^,]+?)\\)", |
55 | 55 | "type": "regex", |
56 | 56 | "modifiers": null, |
57 | 57 | "scopes": [ |
|
66 | 66 | "name": "Change to strcpy_s (Recommended for VC++)", |
67 | 67 | "type": "regex-replace", |
68 | 68 | "pattern": { |
69 | | - "pattern": "\\bstrcpy\\s*\\(([^,]+),([^,]+)\\)", |
| 69 | + "pattern": "\\bstrcpy\\s*\\(([^,]+),([^,]+?)\\)", |
70 | 70 | "type": "regex", |
71 | 71 | "modifiers": null, |
72 | 72 | "scopes": [ |
|
80 | 80 | "name": "Change to strlcpy", |
81 | 81 | "type": "regex-replace", |
82 | 82 | "pattern": { |
83 | | - "pattern": "\\bstrcpy\\s*\\(([^,]+),([^,]+)\\)", |
| 83 | + "pattern": "\\bstrcpy\\s*\\(([^,]+),([^,]+?)\\)", |
84 | 84 | "type": "regex", |
85 | 85 | "modifiers": null, |
86 | 86 | "scopes": [ |
|
113 | 113 | "rule_info": "DS111237.md", |
114 | 114 | "patterns": [ |
115 | 115 | { |
116 | | - "pattern": "\\bstrncpy\\s*\\(([^,]+),([^,]+),([^,]+)\\)+", |
| 116 | + "pattern": "\\bstrncpy\\s*\\(([^,]+),([^,]+),([^,]+?)\\)+", |
117 | 117 | "type": "regex", |
118 | 118 | "modifiers": null, |
119 | 119 | "scopes": [ |
|
128 | 128 | "name": "Change to strcpy_s (Recommended for VC++)", |
129 | 129 | "type": "regex-replace", |
130 | 130 | "pattern": { |
131 | | - "pattern": "\\bstrncpy\\s*\\(([^,]+),([^,]+),([^,]+)\\)+", |
| 131 | + "pattern": "\\bstrncpy\\s*\\(([^,]+),([^,]+),([^,]+?)\\)+", |
132 | 132 | "type": "regex", |
133 | 133 | "modifiers": null, |
134 | 134 | "scopes": [ |
|
142 | 142 | "name": "Change to strlcpy", |
143 | 143 | "type": "regex-replace", |
144 | 144 | "pattern": { |
145 | | - "pattern": "\\bstrncpy\\s*\\(([^,]+),([^,]+),([^,]+)\\)+", |
| 145 | + "pattern": "\\bstrncpy\\s*\\(([^,]+),([^,]+),([^,]+?)\\)+", |
146 | 146 | "type": "regex", |
147 | 147 | "modifiers": null, |
148 | 148 | "scopes": [ |
|
175 | 175 | "rule_info": "DS141863.md", |
176 | 176 | "patterns": [ |
177 | 177 | { |
178 | | - "pattern": "\\bstrcat\\s*\\(([^,]+),([^,]+)\\)", |
| 178 | + "pattern": "\\bstrcat\\s*\\(([^,]+),([^,]+?)\\)", |
179 | 179 | "type": "regex", |
180 | 180 | "modifiers": null, |
181 | 181 | "scopes": [ |
|
190 | 190 | "name": "Change to strcat_s (Recommended for VC++)", |
191 | 191 | "type": "regex-replace", |
192 | 192 | "pattern": { |
193 | | - "pattern": "\\bstrcat\\s*\\(([^,]+),([^,]+)\\)", |
| 193 | + "pattern": "\\bstrcat\\s*\\(([^,]+),([^,]+?)\\)", |
194 | 194 | "type": "regex", |
195 | 195 | "modifiers": null, |
196 | 196 | "scopes": [ |
|
204 | 204 | "name": "Change to strlcat", |
205 | 205 | "type": "regex-replace", |
206 | 206 | "pattern": { |
207 | | - "pattern": "\\bstrcat\\s*\\(([^,]+),([^,]+)\\)", |
| 207 | + "pattern": "\\bstrcat\\s*\\(([^,]+),([^,]+?)\\)", |
208 | 208 | "type": "regex", |
209 | 209 | "modifiers": null, |
210 | 210 | "scopes": [ |
|
237 | 237 | "rule_info": "DS108330.md", |
238 | 238 | "patterns": [ |
239 | 239 | { |
240 | | - "pattern": "\\bstrncat\\s*\\(([^,]+),([^,]+),([^,]+)\\)+", |
| 240 | + "pattern": "\\bstrncat\\s*\\(([^,]+),([^,]+),([^,]+?)\\)+", |
241 | 241 | "type": "regex", |
242 | 242 | "modifiers": null, |
243 | 243 | "scopes": [ |
|
252 | 252 | "name": "Change to strcat_s (Recommended for VC++)", |
253 | 253 | "type": "regex-replace", |
254 | 254 | "pattern": { |
255 | | - "pattern": "\\bstrncat\\s*\\(([^,]+),([^,]+),([^,]+)\\)+", |
| 255 | + "pattern": "\\bstrncat\\s*\\(([^,]+),([^,]+),([^,]+?)\\)+", |
256 | 256 | "type": "regex", |
257 | 257 | "modifiers": null, |
258 | 258 | "scopes": [ |
|
266 | 266 | "name": "Change to strlcat", |
267 | 267 | "type": "regex-replace", |
268 | 268 | "pattern": { |
269 | | - "pattern": "\\bstrncat\\s*\\(([^,]+),([^,]+),([^,]+)\\)+", |
| 269 | + "pattern": "\\bstrncat\\s*\\(([^,]+),([^,]+),([^,]+?)\\)+", |
270 | 270 | "type": "regex", |
271 | 271 | "modifiers": null, |
272 | 272 | "scopes": [ |
|
872 | 872 | }, |
873 | 873 | { |
874 | 874 | "id": "DS113286", |
875 | | - "name": "Do not include user-input directoy in format strings", |
| 875 | + "name": "Do not include user-input directly in format strings", |
876 | 876 | "overrides": null, |
877 | 877 | "schema_version": 0, |
878 | 878 | "tags": [ |
|
0 commit comments