Unnamed: 0 int64 0 56k | source_code stringlengths 55 5.98k | comments stringlengths 2 1.76k | label stringclasses 68 values | dataset_name stringclasses 1 value | file_name stringlengths 208 265 | function stringlengths 27 87 | decompiled_code stringlengths 68 3.97k | compiler_options stringclasses 1 value |
|---|---|---|---|---|---|---|---|---|
11,700 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117311/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,701 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_badSink()
{
size_t data = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_badData;
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117311/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_badSink(void)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_badData;
uVar2 = func_0x00400bc0(&UNK_004013e8);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004013e8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_00401400);
}
return;
}
| ['gcc'] |
11,702 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_goodG2BSink()
{
size_t data = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_goodG2BData;
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117311/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_goodG2BSink(void)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_goodG2BData;
uVar2 = func_0x00400bc0(&UNK_004014a8);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004014a8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_004014c0);
}
return;
}
| ['gcc'] |
11,703 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_goodB2GSink()
{
size_t data = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_goodB2GData;
{
wchar_t * myString;
/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING) && data < 100)
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string or too large");
}
}
} | ['/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117311/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_goodB2GSink(void)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_goodB2GData;
uVar2 = func_0x00400bc0(&UNK_004014a8);
if ((uVar2 < uVar1) && (uVar1 < 100)) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004014a8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_004014f8);
}
return;
}
| ['gcc'] |
11,704 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_01_bad()
{
size_t data;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117319/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_01.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_01_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_01_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
func_0x00400b60(stdin,&UNK_00401348,&uStack_18);
uVar1 = func_0x00400ba0(&UNK_0040134c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040134c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401368);
}
return;
}
| ['gcc'] |
11,705 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_01_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117319/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_01.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_01_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_01_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,706 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_02_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(1)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(1)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117320/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_02.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_02_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_02_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
func_0x00400b60(stdin,&UNK_00401348,&uStack_18);
uVar1 = func_0x00400ba0(&UNK_0040134c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040134c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401368);
}
return;
}
| ['gcc'] |
11,707 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_02_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117320/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_02.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_02_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_02_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,708 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_03_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(5==5)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(5==5)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117321/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_03.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_03_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_03_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
func_0x00400b60(stdin,&UNK_00401348,&uStack_18);
uVar1 = func_0x00400ba0(&UNK_0040134c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040134c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401368);
}
return;
}
| ['gcc'] |
11,709 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_03_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117321/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_03.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_03_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_03_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,710 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_04_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(STATIC_CONST_TRUE)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(STATIC_CONST_TRUE)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117322/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_04.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_04_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_04_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
func_0x00400b60(stdin,&UNK_00401360,&uStack_18);
uVar1 = func_0x00400ba0(&UNK_00401364);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_00401364);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401380);
}
return;
}
| ['gcc'] |
11,711 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_04_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117322/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_04.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_04_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_04_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,712 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_05_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(staticTrue)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(staticTrue)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117323/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_05.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_05_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_05_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
if (staticTrue != 0) {
func_0x00400b60(stdin,&UNK_00401358,&uStack_18);
}
if (staticTrue != 0) {
uVar1 = func_0x00400ba0(&UNK_0040135c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040135c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401378);
}
}
return;
}
| ['gcc'] |
11,713 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_05_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117323/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_05.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_05_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_05_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,714 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_06_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(STATIC_CONST_FIVE==5)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(STATIC_CONST_FIVE==5)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117324/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_06.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_06_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_06_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
func_0x00400b60(stdin,&UNK_0040135c,&uStack_18);
uVar1 = func_0x00400ba0(&UNK_00401360);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_00401360);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401378);
}
return;
}
| ['gcc'] |
11,715 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_06_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117324/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_06.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_06_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_06_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,716 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_07_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(staticFive==5)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(staticFive==5)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117325/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_07.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_07_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_07_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
if (staticFive == 5) {
func_0x00400b60(stdin,&UNK_00401358,&uStack_18);
}
if (staticFive == 5) {
uVar1 = func_0x00400ba0(&UNK_0040135c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040135c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401378);
}
}
return;
}
| ['gcc'] |
11,717 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_07_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117325/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_07.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_07_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_07_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,718 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_08_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(staticReturnsTrue())
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(staticReturnsTrue())
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117326/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_08.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_08_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_08_bad(void)
{
int iVar1;
ulong uVar2;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
func_0x00400b60(stdin,&UNK_00401378,&uStack_18);
}
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
uVar2 = func_0x00400ba0(&UNK_0040137c);
if (uVar2 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040137c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401398);
}
}
return;
}
| ['gcc'] |
11,719 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_08_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117326/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_08.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_08_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_08_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,720 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_09_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(GLOBAL_CONST_TRUE)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(GLOBAL_CONST_TRUE)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117327/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_09.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_09_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_09_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
if (GLOBAL_CONST_TRUE != 0) {
func_0x00400b60(stdin,&UNK_00401358,&uStack_18);
}
if (GLOBAL_CONST_TRUE != 0) {
uVar1 = func_0x00400ba0(&UNK_0040135c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040135c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401378);
}
}
return;
}
| ['gcc'] |
11,721 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_09_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117327/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_09.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_09_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_09_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,722 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_10_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(globalTrue)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(globalTrue)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117328/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_10.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_10_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_10_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
if (globalTrue != 0) {
func_0x00400b60(stdin,&UNK_00401358,&uStack_18);
}
if (globalTrue != 0) {
uVar1 = func_0x00400ba0(&UNK_0040135c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040135c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401378);
}
}
return;
}
| ['gcc'] |
11,723 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_10_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117328/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_10.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_10_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_10_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,724 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_11_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(globalReturnsTrue())
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(globalReturnsTrue())
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117329/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_11.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_11_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_11_bad(void)
{
int iVar1;
ulong uVar2;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
func_0x00400b60(stdin,&UNK_00401358,&uStack_18);
}
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
uVar2 = func_0x00400ba0(&UNK_0040135c);
if (uVar2 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040135c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401378);
}
}
return;
}
| ['gcc'] |
11,725 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_11_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117329/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_11.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_11_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_11_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,726 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_12_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(globalReturnsTrueOrFalse())
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
else
{
/* FIX: Use a relatively small number for memory allocation */
data = 20;
}
if(globalReturnsTrueOrFalse())
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
else
{
{
wchar_t * myString;
/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING) && data < 100)
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string or too large");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* FIX: Use a relatively small number for memory allocation */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */', '/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117330/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_12.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_12_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_12_bad(void)
{
int iVar1;
ulong uVar2;
ulong uStack_20;
undefined8 uStack_18;
undefined8 uStack_10;
uStack_20 = 0;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
uStack_20 = 0x14;
}
else {
func_0x00400b60(stdin,&UNK_004013c8,&uStack_20);
}
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
uVar2 = func_0x00400ba0(&UNK_004013cc);
if ((uVar2 < uStack_20) && (uStack_20 < 100)) {
uStack_10 = func_0x00400c10(uStack_20 << 2);
func_0x00400be0(uStack_10,&UNK_004013cc);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401420);
}
}
else {
uVar2 = func_0x00400ba0(&UNK_004013cc);
if (uVar2 < uStack_20) {
uStack_18 = func_0x00400c10(uStack_20 << 2);
func_0x00400be0(uStack_18,&UNK_004013cc);
printWLine(uStack_18);
func_0x00400b50(uStack_18);
}
else {
printLine(&UNK_004013e8);
}
}
return;
}
| ['gcc'] |
11,727 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_12_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117330/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_12.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_12_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_12_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,728 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_13_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(GLOBAL_CONST_FIVE==5)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(GLOBAL_CONST_FIVE==5)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117331/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_13.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_13_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_13_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
if (GLOBAL_CONST_FIVE == 5) {
func_0x00400b60(stdin,&UNK_00401358,&uStack_18);
}
if (GLOBAL_CONST_FIVE == 5) {
uVar1 = func_0x00400ba0(&UNK_0040135c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040135c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401378);
}
}
return;
}
| ['gcc'] |
11,729 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_13_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117331/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_13.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_13_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_13_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,730 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_14_bad()
{
size_t data;
/* Initialize data */
data = 0;
if(globalFive==5)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
if(globalFive==5)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117332/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_14.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_14_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_14_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
if (globalFive == 5) {
func_0x00400b60(stdin,&UNK_00401358,&uStack_18);
}
if (globalFive == 5) {
uVar1 = func_0x00400ba0(&UNK_0040135c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040135c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401378);
}
}
return;
}
| ['gcc'] |
11,731 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_14_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117332/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_14.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_14_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_14_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,732 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_15_bad()
{
size_t data;
/* Initialize data */
data = 0;
switch(6)
{
case 6:
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
switch(7)
{
case 7:
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117333/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_15.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_15_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_15_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
func_0x00400b60(stdin,&UNK_00401348,&uStack_18);
uVar1 = func_0x00400ba0(&UNK_0040134c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040134c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401368);
}
return;
}
| ['gcc'] |
11,733 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_15_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117333/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_15.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_15_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_15_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,734 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_16_bad()
{
size_t data;
/* Initialize data */
data = 0;
while(1)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
break;
}
while(1)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
break;
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117334/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_16.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_16_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_16_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
func_0x00400b60(stdin,&UNK_00401348,&uStack_18);
uVar1 = func_0x00400ba0(&UNK_0040134c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040134c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401368);
}
return;
}
| ['gcc'] |
11,735 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_16_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117334/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_16.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_16_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_16_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,736 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_17_bad()
{
int i,j;
size_t data;
/* Initialize data */
data = 0;
for(i = 0; i < 1; i++)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
}
for(j = 0; j < 1; j++)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117335/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_17.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_17_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_17_bad(void)
{
ulong uVar1;
ulong uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_20 = 0;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
func_0x00400b60(stdin,&UNK_00401368,&uStack_20);
}
for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) {
uVar1 = func_0x00400ba0(&UNK_0040136c);
if (uVar1 < uStack_20) {
uStack_18 = func_0x00400c10(uStack_20 << 2);
func_0x00400be0(uStack_18,&UNK_0040136c);
printWLine(uStack_18);
func_0x00400b50(uStack_18);
}
else {
printLine(&UNK_00401388);
}
}
return;
}
| ['gcc'] |
11,737 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_17_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117335/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_17.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_17_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_17_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,738 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_18_bad()
{
size_t data;
/* Initialize data */
data = 0;
goto source;
source:
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
goto sink;
sink:
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117336/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_18.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_18_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_18_bad(void)
{
ulong uVar1;
ulong uStack_18;
undefined8 uStack_10;
uStack_18 = 0;
func_0x00400b60(stdin,&UNK_00401348,&uStack_18);
uVar1 = func_0x00400ba0(&UNK_0040134c);
if (uVar1 < uStack_18) {
uStack_10 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_10,&UNK_0040134c);
printWLine(uStack_10);
func_0x00400b50(uStack_10);
}
else {
printLine(&UNK_00401368);
}
return;
}
| ['gcc'] |
11,739 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_18_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117336/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_18.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_18_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_18_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,740 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_21_bad()
{
size_t data;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
badStatic = 1; /* true */
badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* true */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117337/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_21.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_21_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_21_bad(void)
{
undefined8 uStack_10;
uStack_10 = 0;
func_0x00400b60(stdin,&UNK_004013b3,&uStack_10);
badStatic = 1;
badSink(uStack_10);
return;
}
| ['gcc'] |
11,741 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_21_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117337/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_21.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_21_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_21_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
11,742 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_bad()
{
size_t data;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_badGlobal = 1; /* true */
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* true */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117338/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_bad(void)
{
undefined8 uStack_10;
uStack_10 = 0;
func_0x00400b60(stdin,&UNK_00401364,&uStack_10);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_badGlobal = 1;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_badSink(uStack_10);
return;
}
| ['gcc'] |
11,743 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117338/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
11,744 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_badSink(size_t data)
{
if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_badGlobal)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117338/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_badGlobal != 0) {
uVar1 = func_0x00400ba0(&UNK_00401368);
if (uVar1 < param_1) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401368);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401380);
}
}
return;
}
| ['gcc'] |
11,745 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodB2G1Sink(size_t data)
{
if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodB2G1Global)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
{
wchar_t * myString;
/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING) && data < 100)
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string or too large");
}
}
}
} | ['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117338/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodB2G1Sink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodB2G1Sink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodB2G1Global == 0) {
uVar1 = func_0x00400ba0(&UNK_00401520);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401520);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401538);
}
}
else {
printLine(&UNK_00401508);
}
return;
}
| ['gcc'] |
11,746 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodB2G2Sink(size_t data)
{
if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodB2G2Global)
{
{
wchar_t * myString;
/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING) && data < 100)
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string or too large");
}
}
}
} | ['/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117338/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodB2G2Sink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodB2G2Sink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodB2G2Global != 0) {
uVar1 = func_0x00400ba0(&UNK_00401520);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401520);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401538);
}
}
return;
}
| ['gcc'] |
11,747 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodG2BSink(size_t data)
{
if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodG2BGlobal)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117338/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_22_goodG2BGlobal != 0) {
uVar1 = func_0x00400ba0(&UNK_00401520);
if (uVar1 < param_1) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401520);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401578);
}
}
return;
}
| ['gcc'] |
11,748 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_31_bad()
{
size_t data;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
{
size_t dataCopy = data;
size_t data = dataCopy;
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117339/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_31.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_31_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_31_bad(void)
{
ulong uVar1;
ulong uStack_28;
undefined8 uStack_20;
ulong uStack_18;
ulong uStack_10;
uStack_28 = 0;
func_0x00400b60(stdin,&UNK_00401348,&uStack_28);
uStack_10 = uStack_28;
uStack_18 = uStack_28;
uVar1 = func_0x00400ba0(&UNK_0040134c);
if (uVar1 < uStack_18) {
uStack_20 = func_0x00400c10(uStack_18 << 2);
func_0x00400be0(uStack_20,&UNK_0040134c);
printWLine(uStack_20);
func_0x00400b50(uStack_20);
}
else {
printLine(&UNK_00401368);
}
return;
}
| ['gcc'] |
11,749 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_31_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117339/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_31.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_31_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_31_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,750 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_32_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117340/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_32.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_32_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_32_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,751 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_34_bad()
{
size_t data;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_34_unionType myUnion;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
myUnion.unionFirst = data;
{
size_t data = myUnion.unionSecond;
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117342/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_34.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_34_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_34_bad(void)
{
ulong uVar1;
ulong uStack_20;
undefined8 uStack_18;
ulong uStack_10;
uStack_20 = 0;
func_0x00400b60(stdin,&UNK_00401348,&uStack_20);
uStack_10 = uStack_20;
uVar1 = func_0x00400ba0(&UNK_0040134c);
if (uVar1 < uStack_10) {
uStack_18 = func_0x00400c10(uStack_10 << 2);
func_0x00400be0(uStack_18,&UNK_0040134c);
printWLine(uStack_18);
func_0x00400b50(uStack_18);
}
else {
printLine(&UNK_00401368);
}
return;
}
| ['gcc'] |
11,752 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_34_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117342/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_34.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_34_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_34_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,753 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_41_bad()
{
size_t data;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117343/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_41.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_41_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_41_bad(void)
{
undefined8 uStack_10;
uStack_10 = 0;
func_0x00400b60(stdin,&UNK_004013a3,&uStack_10);
badSink(uStack_10);
return;
}
| ['gcc'] |
11,754 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_41_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117343/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_41.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_41_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_41_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,755 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_42_bad()
{
size_t data;
/* Initialize data */
data = 0;
data = badSource(data);
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117344/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_42.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_42_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_42_bad(void)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = badSource(0);
uVar2 = func_0x00400ba0(&UNK_0040135c);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c10(uVar1 << 2);
func_0x00400be0(uVar3,&UNK_0040135c);
printWLine(uVar3);
func_0x00400b50(uVar3);
}
else {
printLine(&UNK_00401378);
}
return;
}
| ['gcc'] |
11,756 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_42_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117344/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_42.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_42_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_42_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,757 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45_bad()
{
size_t data;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45_badData = data;
badSink();
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117347/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45_bad(void)
{
undefined8 uStack_10;
uStack_10 = 0;
func_0x00400b60(stdin,&UNK_004013b3,&uStack_10);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45_badData = uStack_10;
badSink();
return;
}
| ['gcc'] |
11,758 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117347/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,759 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51_bad()
{
size_t data;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117348/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51_bad(void)
{
undefined8 uStack_10;
uStack_10 = 0;
func_0x00400b60(stdin,&UNK_00401354,&uStack_10);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_badSink(uStack_10);
return;
}
| ['gcc'] |
11,760 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117348/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,761 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_badSink(size_t data)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117348/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_00401358);
if (uVar1 < param_1) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401358);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401370);
}
return;
}
| ['gcc'] |
11,762 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_goodG2BSink(size_t data)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117348/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_00401408);
if (uVar1 < param_1) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401408);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401420);
}
return;
}
| ['gcc'] |
11,763 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_goodB2GSink(size_t data)
{
{
wchar_t * myString;
/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING) && data < 100)
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string or too large");
}
}
} | ['/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117348/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_51b_goodB2GSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_00401408);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401408);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401458);
}
return;
}
| ['gcc'] |
11,764 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52_bad()
{
size_t data;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117349/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52_bad(void)
{
undefined8 uStack_10;
uStack_10 = 0;
func_0x00400b60(stdin,&UNK_00401374,&uStack_10);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_badSink(uStack_10);
return;
}
| ['gcc'] |
11,765 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117349/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,766 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117349/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_badSink(param_1);
return;
}
| ['gcc'] |
11,767 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117349/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,768 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117349/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52b_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,769 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_badSink(size_t data)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117349/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_00401378);
if (uVar1 < param_1) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401378);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401390);
}
return;
}
| ['gcc'] |
11,770 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_goodG2BSink(size_t data)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117349/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_00401448);
if (uVar1 < param_1) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401448);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401460);
}
return;
}
| ['gcc'] |
11,771 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_goodB2GSink(size_t data)
{
{
wchar_t * myString;
/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING) && data < 100)
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string or too large");
}
}
} | ['/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117349/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_52c_goodB2GSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_00401448);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401448);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401498);
}
return;
}
| ['gcc'] |
11,772 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53_bad()
{
size_t data;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53_bad(void)
{
undefined8 uStack_10;
uStack_10 = 0;
func_0x00400b60(stdin,&UNK_00401384,&uStack_10);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_badSink(uStack_10);
return;
}
| ['gcc'] |
11,773 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,774 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_badSink(param_1);
return;
}
| ['gcc'] |
11,775 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,776 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53b_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,777 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_badSink(param_1);
return;
}
| ['gcc'] |
11,778 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,779 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53c_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,780 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_badSink(size_t data)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_00401388);
if (uVar1 < param_1) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401388);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_004013a0);
}
return;
}
| ['gcc'] |
11,781 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_goodG2BSink(size_t data)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_00401478);
if (uVar1 < param_1) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401478);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_00401490);
}
return;
}
| ['gcc'] |
11,782 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_goodB2GSink(size_t data)
{
{
wchar_t * myString;
/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING) && data < 100)
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string or too large");
}
}
} | ['/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117350/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_53d_goodB2GSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_00401478);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_00401478);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_004014c8);
}
return;
}
| ['gcc'] |
11,783 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54_bad()
{
size_t data;
/* Initialize data */
data = 0;
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54_bad(void)
{
undefined8 uStack_10;
uStack_10 = 0;
func_0x00400b60(stdin,&UNK_004013a4,&uStack_10);
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_badSink(uStack_10);
return;
}
| ['gcc'] |
11,784 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,785 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_badSink(param_1);
return;
}
| ['gcc'] |
11,786 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,787 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54b_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,788 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_badSink(param_1);
return;
}
| ['gcc'] |
11,789 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,790 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54c_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,791 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_badSink(param_1);
return;
}
| ['gcc'] |
11,792 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,793 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54d_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,794 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_badSink(size_t data)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_004013a8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_004013a8);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_004013c0);
}
return;
}
| ['gcc'] |
11,795 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_goodG2BSink(size_t data)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_004014a8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_004014a8);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_004014c0);
}
return;
}
| ['gcc'] |
11,796 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_goodB2GSink(size_t data)
{
{
wchar_t * myString;
/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING) && data < 100)
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string or too large");
}
}
} | ['/* FIX: Include a MAXIMUM limitation for memory allocation and a check to ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117351/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_54e_goodB2GSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400ba0(&UNK_004014a8);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c10(param_1 << 2);
func_0x00400be0(uVar2,&UNK_004014a8);
printWLine(uVar2);
func_0x00400b50(uVar2);
}
else {
printLine(&UNK_004014f8);
}
return;
}
| ['gcc'] |
11,797 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61_bad()
{
size_t data;
/* Initialize data */
data = 0;
data = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61b_badSource(data);
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117352/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61_bad(void)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61b_badSource(0);
uVar2 = func_0x00400ba0(&UNK_00401358);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c10(uVar1 << 2);
func_0x00400be0(uVar3,&UNK_00401358);
printWLine(uVar3);
func_0x00400b50(uVar3);
}
else {
printLine(&UNK_00401370);
}
return;
}
| ['gcc'] |
11,798 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117352/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,799 | size_t CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61b_badSource(size_t data)
{
/* POTENTIAL FLAW: Read data from the console using fscanf() */
fscanf(stdin, "%ud", &data);
return data;
} | ['/* POTENTIAL FLAW: Read data from the console using fscanf() */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117352/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61b_badSource |
undefined8 CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_61b_badSource(undefined8 param_1)
{
undefined8 uStack_10;
uStack_10 = param_1;
func_0x00400b60(stdin,&UNK_00401354,&uStack_10);
return uStack_10;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.