C++: Clean up header comments.

This commit is contained in:
Geoffrey White
2021-09-01 15:39:19 +01:00
parent 75d367a6c5
commit fdb4a2acdb
12 changed files with 11 additions and 57 deletions

View File

@@ -1,6 +1,6 @@
/**
* This test case is closely based on CWE23_Relative_Path_Traversal__char_console_fopen_11.cpp
* from the SAMATE test suite.
* from the SAMATE Juliet test suite.
*/
#define NULL (0)

View File

@@ -1,6 +1,6 @@
//semmle-extractor-options: --edg --target --edg win64
// A selection of tests from the samate framework for rule CWE-78.
// A selection of tests from the SAMATE Juliet framework for rule CWE-78.
// library types, functions etc
#define NULL (0)

View File

@@ -1,4 +1,4 @@
// Samate test cases for CWE-114
// Some SAMATE Juliet test cases for CWE-114.
typedef unsigned long size_t;
typedef unsigned int BOOL;

View File

@@ -1,6 +1,6 @@
//semmle-extractor-options: --edg --target --edg win64
// A sample of tests from the samate framework for rule CWE-119.
// A sample of tests from the SAMATE Juliet framework for rule CWE-119.
// library types, functions etc
typedef unsigned long size_t;

View File

@@ -1,4 +1,4 @@
// Snippet from an external (samate) test case for rule CWE-122 / CWE-129
// Snippet from a SAMATE Juliet test case for rule CWE-122 / CWE-129
// CWE122_Heap_Based_Buffer_Overflow__c_CWE129_fgets_01.c
typedef unsigned long size_t;

View File

@@ -3,29 +3,6 @@
// Associated with CWE-134: Uncontrolled format string. http://cwe.mitre.org/data/definitions/134.html
// Examples amended to have all function declarations inlined.
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE134_Uncontrolled_Format_String__char_console_fprintf_01.c
Label Definition File: CWE134_Uncontrolled_Format_String.label.xml
Template File: sources-sinks-01.tmpl.c
*/
/*
* @description
* CWE: 134 Uncontrolled Format String
* BadSource: console Read input from the console
* GoodSource: Copy a fixed string into data
* Sinks: fprintf
* GoodSink: fprintf with "%s" as the second argument and data as the third
* BadSink : fprintf with data as the second argument
* Flow Variant: 01 Baseline
*
* */
// Replaced with inlined functions
//#include "std_testcase.h"
//
//#ifndef _WIN32
//# include <wchar.h>
//#endif
#define NULL 0
typedef unsigned long size_t;
typedef struct {} FILE;

View File

@@ -3,29 +3,6 @@
// Associated with CWE-134: Uncontrolled format string. http://cwe.mitre.org/data/definitions/134.html
// Examples amended to have all function declarations inlined.
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE134_Uncontrolled_Format_String__char_environment_fprintf_01.c
Label Definition File: CWE134_Uncontrolled_Format_String.label.xml
Template File: sources-sinks-01.tmpl.c
*/
/*
* @description
* CWE: 134 Uncontrolled Format String
* BadSource: environment Read input from an environment variable
* GoodSource: Copy a fixed string into data
* Sinks: fprintf
* GoodSink: fprintf with "%s" as the second argument and data as the third
* BadSink : fprintf with data as the second argument
* Flow Variant: 01 Baseline
*
* */
// Replaced with inlined functions
//#include "std_testcase.h"
//
//#ifndef _WIN32
//# include <wchar.h>
//#endif
#define NULL 0
typedef struct {} FILE;
typedef unsigned long size_t;

View File

@@ -1,4 +1,4 @@
// External test cases for rule CWE-190.
// Some SAMATE Juliet test cases for rule CWE-190.
///// Library functions //////

View File

@@ -1,6 +1,6 @@
//semmle-extractor-options: --edg --target --edg win64
// A selection of tests from the samate framework for rule CWE-197.
// A selection of tests from the SAMATE Juliet framework for rule CWE-197.
// library types, functions etc
typedef struct {} FILE;

View File

@@ -1,4 +1,4 @@
// Semmle test cases for rule CWE-497
// SAMATE Juliet test cases for rule CWE-497.
// library functions etc
typedef struct {} FILE;
@@ -69,4 +69,4 @@ void CWE535_Info_Exposure_Shell_Error__w32_char_01_bad()
/* FLAW: Write sensitive data to stderr */
fprintf(stderr, "User attempted access with password: %s\n", password);
}
}
}

View File

@@ -1,4 +1,4 @@
// Samate test case for rule DangerousUseOfCin.ql / CWE-676
// SAMATE Juliet test case for rule DangerousUseOfCin.ql / CWE-676.
// --- library types, functions etc ---

View File

@@ -1,4 +1,4 @@
// Sample of samate tests for CWE-772.
// Sample of SAMATE Juliet tests for CWE-772.
// --- library types, functions etc ---