Skip to content

Commit fdb4a2a

Browse files
committed
C++: Clean up header comments.
1 parent 75d367a commit fdb4a2a

File tree

12 files changed

+11
-57
lines changed

12 files changed

+11
-57
lines changed

cpp/ql/test/query-tests/Security/CWE/CWE-022/SAMATE/CWE23_Relative_Path_Traversal__char_console_fopen_11.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* This test case is closely based on CWE23_Relative_Path_Traversal__char_console_fopen_11.cpp
3-
* from the SAMATE test suite.
3+
* from the SAMATE Juliet test suite.
44
*/
55

66
#define NULL (0)

cpp/ql/test/query-tests/Security/CWE/CWE-078/SAMATE/tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//semmle-extractor-options: --edg --target --edg win64
22

3-
// A selection of tests from the samate framework for rule CWE-78.
3+
// A selection of tests from the SAMATE Juliet framework for rule CWE-78.
44

55
// library types, functions etc
66
#define NULL (0)

cpp/ql/test/query-tests/Security/CWE/CWE-114/SAMATE/UncontrolledProcessOperation/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Samate test cases for CWE-114
1+
// Some SAMATE Juliet test cases for CWE-114.
22

33
typedef unsigned long size_t;
44
typedef unsigned int BOOL;

cpp/ql/test/query-tests/Security/CWE/CWE-119/SAMATE/tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//semmle-extractor-options: --edg --target --edg win64
22

3-
// A sample of tests from the samate framework for rule CWE-119.
3+
// A sample of tests from the SAMATE Juliet framework for rule CWE-119.
44

55
// library types, functions etc
66
typedef unsigned long size_t;

cpp/ql/test/query-tests/Security/CWE/CWE-129/SAMATE/ImproperArrayIndexValidation/CWE122_Heap_Based_Buffer_Overflow__c_CWE129_fgets_01.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Snippet from an external (samate) test case for rule CWE-122 / CWE-129
1+
// Snippet from a SAMATE Juliet test case for rule CWE-122 / CWE-129
22
// CWE122_Heap_Based_Buffer_Overflow__c_CWE129_fgets_01.c
33

44
typedef unsigned long size_t;

cpp/ql/test/query-tests/Security/CWE/CWE-134/SAMATE/console_fprintf_01/test.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,6 @@
33
// Associated with CWE-134: Uncontrolled format string. http://cwe.mitre.org/data/definitions/134.html
44
// Examples amended to have all function declarations inlined.
55

6-
/* TEMPLATE GENERATED TESTCASE FILE
7-
Filename: CWE134_Uncontrolled_Format_String__char_console_fprintf_01.c
8-
Label Definition File: CWE134_Uncontrolled_Format_String.label.xml
9-
Template File: sources-sinks-01.tmpl.c
10-
*/
11-
/*
12-
* @description
13-
* CWE: 134 Uncontrolled Format String
14-
* BadSource: console Read input from the console
15-
* GoodSource: Copy a fixed string into data
16-
* Sinks: fprintf
17-
* GoodSink: fprintf with "%s" as the second argument and data as the third
18-
* BadSink : fprintf with data as the second argument
19-
* Flow Variant: 01 Baseline
20-
*
21-
* */
22-
23-
// Replaced with inlined functions
24-
//#include "std_testcase.h"
25-
//
26-
//#ifndef _WIN32
27-
//# include <wchar.h>
28-
//#endif
296
#define NULL 0
307
typedef unsigned long size_t;
318
typedef struct {} FILE;

cpp/ql/test/query-tests/Security/CWE/CWE-134/SAMATE/environment_fprintf_01/test.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,6 @@
33
// Associated with CWE-134: Uncontrolled format string. http://cwe.mitre.org/data/definitions/134.html
44
// Examples amended to have all function declarations inlined.
55

6-
/* TEMPLATE GENERATED TESTCASE FILE
7-
Filename: CWE134_Uncontrolled_Format_String__char_environment_fprintf_01.c
8-
Label Definition File: CWE134_Uncontrolled_Format_String.label.xml
9-
Template File: sources-sinks-01.tmpl.c
10-
*/
11-
/*
12-
* @description
13-
* CWE: 134 Uncontrolled Format String
14-
* BadSource: environment Read input from an environment variable
15-
* GoodSource: Copy a fixed string into data
16-
* Sinks: fprintf
17-
* GoodSink: fprintf with "%s" as the second argument and data as the third
18-
* BadSink : fprintf with data as the second argument
19-
* Flow Variant: 01 Baseline
20-
*
21-
* */
22-
23-
// Replaced with inlined functions
24-
//#include "std_testcase.h"
25-
//
26-
//#ifndef _WIN32
27-
//# include <wchar.h>
28-
//#endif
296
#define NULL 0
307
typedef struct {} FILE;
318
typedef unsigned long size_t;

cpp/ql/test/query-tests/Security/CWE/CWE-190/SAMATE/examples.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// External test cases for rule CWE-190.
1+
// Some SAMATE Juliet test cases for rule CWE-190.
22

33
///// Library functions //////
44

cpp/ql/test/query-tests/Security/CWE/CWE-197/SAMATE/tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//semmle-extractor-options: --edg --target --edg win64
22

3-
// A selection of tests from the samate framework for rule CWE-197.
3+
// A selection of tests from the SAMATE Juliet framework for rule CWE-197.
44

55
// library types, functions etc
66
typedef struct {} FILE;

cpp/ql/test/query-tests/Security/CWE/CWE-497/SAMATE/tests.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Semmle test cases for rule CWE-497
1+
// SAMATE Juliet test cases for rule CWE-497.
22

33
// library functions etc
44
typedef struct {} FILE;
@@ -69,4 +69,4 @@ void CWE535_Info_Exposure_Shell_Error__w32_char_01_bad()
6969
/* FLAW: Write sensitive data to stderr */
7070
fprintf(stderr, "User attempted access with password: %s\n", password);
7171
}
72-
}
72+
}

0 commit comments

Comments
 (0)