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
12,000
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_21_good() { goodB2G1(); goodB2G2(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117433/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_21.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_21_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_21_good(void) { goodB2G1(); goodB2G2(); goodG2B(); return; }
['gcc']
12,001
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_badGlobal = 1; /* true */ CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* true */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117434/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_bad(void) { int iVar1; iVar1 = func_0x00400b70(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_badGlobal = 1; CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_badSink((long)iVar1); return; }
['gcc']
12,002
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_good() { goodB2G1(); goodB2G2(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117434/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_good(void) { goodB2G1(); goodB2G2(); goodG2B(); return; }
['gcc']
12,003
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_badSink(size_t data) { if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117434/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_badSink(ulong param_1) { ulong uVar1; undefined8 uVar2; if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_badGlobal != 0) { uVar1 = func_0x00400ad0(&UNK_00401288); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401288); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_004012a0); } } return; }
['gcc']
12,004
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodB2G1Sink(size_t data) { if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117434/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodB2G1Sink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodB2G1Sink(ulong param_1) { ulong uVar1; undefined8 uVar2; if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodB2G1Global == 0) { uVar1 = func_0x00400ad0(&UNK_00401430); if ((uVar1 < param_1) && (param_1 < 100)) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401430); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401448); } } else { printLine(&UNK_00401418); } return; }
['gcc']
12,005
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodB2G2Sink(size_t data) { if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117434/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodB2G2Sink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodB2G2Sink(ulong param_1) { ulong uVar1; undefined8 uVar2; if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodB2G2Global != 0) { uVar1 = func_0x00400ad0(&UNK_00401430); if ((uVar1 < param_1) && (param_1 < 100)) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401430); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401448); } } return; }
['gcc']
12,006
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodG2BSink(size_t data) { if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117434/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodG2BSink(ulong param_1) { ulong uVar1; undefined8 uVar2; if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_22_goodG2BGlobal != 0) { uVar1 = func_0x00400ad0(&UNK_00401430); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401430); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401488); } } return; }
['gcc']
12,007
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_31_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); { 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: Set data to a random value */', '/* 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/117435/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_31.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_31_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_31_bad(void) { int iVar1; ulong uVar2; undefined8 uVar3; iVar1 = func_0x00400b70(); uVar2 = func_0x00400ad0(&UNK_00401268); if (uVar2 < (ulong)(long)iVar1) { uVar3 = func_0x00400b40((long)iVar1 << 2); func_0x00400b10(uVar3,&UNK_00401268); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_00401280); } return; }
['gcc']
12,008
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_31_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117435/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_31.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_31_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_31_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,009
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_32_bad() { size_t data; size_t *dataPtr1 = &data; size_t *dataPtr2 = &data; /* Initialize data */ data = 0; { size_t data = *dataPtr1; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); *dataPtr1 = data; } { size_t data = *dataPtr2; { 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: Set data to a random value */', '/* 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/117436/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_32.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_32_bad
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_32_bad(void) { int iVar1; ulong uVar2; ulong uStack_38; undefined8 uStack_30; ulong uStack_28; ulong uStack_20; ulong *puStack_18; ulong *puStack_10; puStack_10 = &uStack_38; puStack_18 = &uStack_38; uStack_38 = 0; uStack_20 = 0; iVar1 = func_0x00400b70(); uStack_20 = (ulong)iVar1; *puStack_10 = uStack_20; uStack_28 = *puStack_18; uVar2 = func_0x00400ad0(&UNK_00401288); if (uVar2 < uStack_28) { uStack_30 = func_0x00400b40(uStack_28 << 2); func_0x00400b10(uStack_30,&UNK_00401288); printWLine(uStack_30); func_0x00400a90(uStack_30); } else { printLine(&UNK_004012a0); } return; }
['gcc']
12,010
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_32_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117436/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_32.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_32_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_32_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,011
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_41_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117439/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_41.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_41_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_41_bad(void) { int iVar1; iVar1 = func_0x00400b70(); badSink((long)iVar1); return; }
['gcc']
12,012
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_41_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117439/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_41.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_41_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_41_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
12,013
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117440/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_42.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_42_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_42_bad(void) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = badSource(0); uVar2 = func_0x00400ad0(&UNK_00401278); if (uVar2 < uVar1) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401278); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_00401290); } return; }
['gcc']
12,014
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_42_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117440/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_42.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_42_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_42_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
12,015
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_44_bad() { size_t data; /* define a function pointer */ void (*funcPtr) (size_t) = badSink; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* use the function pointer */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117442/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_44.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_44_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_44_bad(void) { int iVar1; iVar1 = func_0x00400b70(); badSink((long)iVar1); return; }
['gcc']
12,016
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_44_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117442/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_44.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_44_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_44_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,017
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_45_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_45_badData = data; badSink(); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117443/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_45.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_45_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_45_bad(void) { int iVar1; iVar1 = func_0x00400b70(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_45_badData = (long)iVar1; badSink(); return; }
['gcc']
12,018
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_45_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117443/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_45.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_45_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_45_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,019
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117444/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51_bad(void) { int iVar1; iVar1 = func_0x00400b70(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b_badSink((long)iVar1); return; }
['gcc']
12,020
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117444/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,021
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117444/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b_badSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401278); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401278); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401290); } return; }
['gcc']
12,022
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117444/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b_goodG2BSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401328); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401328); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401340); } return; }
['gcc']
12,023
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117444/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_51b_goodB2GSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401328); if ((uVar1 < param_1) && (param_1 < 100)) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401328); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401378); } return; }
['gcc']
12,024
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117445/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52_bad(void) { int iVar1; iVar1 = func_0x00400b70(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_badSink((long)iVar1); return; }
['gcc']
12,025
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117445/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,026
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_badSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_badSink(data); }
[]
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117445/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_badSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_badSink(param_1); return; }
['gcc']
12,027
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_goodG2BSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117445/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_goodG2BSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_goodG2BSink(param_1); return; }
['gcc']
12,028
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_goodB2GSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117445/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52b_goodB2GSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_goodB2GSink(param_1); return; }
['gcc']
12,029
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117445/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_badSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401298); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401298); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_004012b0); } return; }
['gcc']
12,030
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117445/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_goodG2BSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401358); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401358); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401370); } return; }
['gcc']
12,031
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117445/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_52c_goodB2GSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401358); if ((uVar1 < param_1) && (param_1 < 100)) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401358); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_004013a8); } return; }
['gcc']
12,032
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53_bad(void) { int iVar1; iVar1 = func_0x00400b70(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_badSink((long)iVar1); return; }
['gcc']
12,033
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,034
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_badSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_badSink(data); }
[]
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_badSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_badSink(param_1); return; }
['gcc']
12,035
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_goodG2BSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_goodG2BSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_goodG2BSink(param_1); return; }
['gcc']
12,036
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_goodB2GSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53b_goodB2GSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_goodB2GSink(param_1); return; }
['gcc']
12,037
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_badSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_badSink(data); }
[]
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_badSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_badSink(param_1); return; }
['gcc']
12,038
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_goodG2BSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_goodG2BSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_goodG2BSink(param_1); return; }
['gcc']
12,039
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_goodB2GSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53c_goodB2GSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_goodB2GSink(param_1); return; }
['gcc']
12,040
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_badSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_004012a8); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_004012a8); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_004012c0); } return; }
['gcc']
12,041
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_goodG2BSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401398); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401398); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_004013b0); } return; }
['gcc']
12,042
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117446/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_53d_goodB2GSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401398); if ((uVar1 < param_1) && (param_1 < 100)) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401398); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_004013e8); } return; }
['gcc']
12,043
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54_bad(void) { int iVar1; iVar1 = func_0x00400b70(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_badSink((long)iVar1); return; }
['gcc']
12,044
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,045
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_badSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_badSink(data); }
[]
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_badSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_badSink(param_1); return; }
['gcc']
12,046
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_goodG2BSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_goodG2BSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_goodG2BSink(param_1); return; }
['gcc']
12,047
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_goodB2GSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54b_goodB2GSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_goodB2GSink(param_1); return; }
['gcc']
12,048
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_badSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_badSink(data); }
[]
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_badSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_badSink(param_1); return; }
['gcc']
12,049
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_goodG2BSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_goodG2BSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_goodG2BSink(param_1); return; }
['gcc']
12,050
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_goodB2GSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54c_goodB2GSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_goodB2GSink(param_1); return; }
['gcc']
12,051
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_badSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_badSink(data); }
[]
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_badSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_badSink(param_1); return; }
['gcc']
12,052
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_goodG2BSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_goodG2BSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_goodG2BSink(param_1); return; }
['gcc']
12,053
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_goodB2GSink(size_t data) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54d_goodB2GSink(undefined8 param_1) { CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_goodB2GSink(param_1); return; }
['gcc']
12,054
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_badSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_004012c8); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_004012c8); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_004012e0); } return; }
['gcc']
12,055
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_goodG2BSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_004013c8); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_004013c8); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_004013e0); } return; }
['gcc']
12,056
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117447/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_54e_goodB2GSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_004013c8); if ((uVar1 < param_1) && (param_1 < 100)) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_004013c8); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401418); } return; }
['gcc']
12,057
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61_bad() { size_t data; /* Initialize data */ data = 0; data = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117448/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61_bad(void) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b_badSource(0); uVar2 = func_0x00400ad0(&UNK_00401278); if (uVar2 < uVar1) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401278); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_00401290); } return; }
['gcc']
12,058
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117448/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,059
size_t CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b_badSource(size_t data) { /* POTENTIAL FLAW: Set data to a random value */ data = rand(); return data; }
['/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117448/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b_badSource
long CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b_badSource(void) { int iVar1; iVar1 = func_0x00400b70(); return (long)iVar1; }
['gcc']
12,060
size_t CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b_goodG2BSource(size_t data) { /* FIX: Use a relatively small number for memory allocation */ data = 20; return data; }
['/* FIX: Use a relatively small number for memory allocation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117448/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b_goodG2BSource
undefined8 CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b_goodG2BSource(void) { return 0x14; }
['gcc']
12,061
size_t CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b_goodB2GSource(size_t data) { /* POTENTIAL FLAW: Set data to a random value */ data = rand(); return data; }
['/* POTENTIAL FLAW: Set data to a random value */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117448/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b_goodB2GSource
long CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_61b_goodB2GSource(void) { int iVar1; iVar1 = func_0x00400b70(); return (long)iVar1; }
['gcc']
12,062
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_badSink(&data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117450/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63_bad(void) { int iVar1; long lStack_10; lStack_10 = 0; iVar1 = func_0x00400b70(); lStack_10 = (long)iVar1; CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_badSink(&lStack_10); return; }
['gcc']
12,063
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117450/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,064
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_badSink(size_t * dataPtr) { size_t data = *dataPtr; { 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/117450/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_badSink(ulong *param_1) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = *param_1; uVar2 = func_0x00400ad0(&UNK_00401288); if (uVar2 < uVar1) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401288); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_004012a0); } return; }
['gcc']
12,065
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_goodG2BSink(size_t * dataPtr) { size_t data = *dataPtr; { 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/117450/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_goodG2BSink(ulong *param_1) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = *param_1; uVar2 = func_0x00400ad0(&UNK_00401338); if (uVar2 < uVar1) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401338); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_00401350); } return; }
['gcc']
12,066
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_goodB2GSink(size_t * dataPtr) { size_t data = *dataPtr; { 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/117450/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_63b_goodB2GSink(ulong *param_1) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = *param_1; uVar2 = func_0x00400ad0(&UNK_00401338); if ((uVar2 < uVar1) && (uVar1 < 100)) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401338); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_00401388); } return; }
['gcc']
12,067
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_badSink(&data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117451/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64_bad(void) { int iVar1; long lStack_10; lStack_10 = 0; iVar1 = func_0x00400b70(); lStack_10 = (long)iVar1; CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_badSink(&lStack_10); return; }
['gcc']
12,068
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117451/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,069
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_badSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ size_t * dataPtr = (size_t *)dataVoidPtr; /* dereference dataPtr into data */ size_t data = (*dataPtr); { 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"); } } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into 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/117451/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_badSink(ulong *param_1) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = *param_1; uVar2 = func_0x00400ad0(&UNK_00401288); if (uVar2 < uVar1) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401288); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_004012a0); } return; }
['gcc']
12,070
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_goodG2BSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ size_t * dataPtr = (size_t *)dataVoidPtr; /* dereference dataPtr into data */ size_t data = (*dataPtr); { 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"); } } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117451/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_goodG2BSink(ulong *param_1) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = *param_1; uVar2 = func_0x00400ad0(&UNK_00401348); if (uVar2 < uVar1) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401348); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_00401360); } return; }
['gcc']
12,071
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_goodB2GSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ size_t * dataPtr = (size_t *)dataVoidPtr; /* dereference dataPtr into data */ size_t data = (*dataPtr); { 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"); } } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* 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/117451/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_64b_goodB2GSink(ulong *param_1) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = *param_1; uVar2 = func_0x00400ad0(&UNK_00401348); if ((uVar2 < uVar1) && (uVar1 < 100)) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401348); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_00401398); } return; }
['gcc']
12,072
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65_bad() { size_t data; /* define a function pointer */ void (*funcPtr) (size_t) = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_badSink; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* use the function pointer */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117452/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65_bad(void) { int iVar1; iVar1 = func_0x00400b70(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_badSink((long)iVar1); return; }
['gcc']
12,073
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117452/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,074
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_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/117452/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_badSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401278); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401278); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401290); } return; }
['gcc']
12,075
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_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/117452/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_goodG2BSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401338); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401338); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401350); } return; }
['gcc']
12,076
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_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/117452/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_65b_goodB2GSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401338); if ((uVar1 < param_1) && (param_1 < 100)) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401338); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401388); } return; }
['gcc']
12,077
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66_bad() { size_t data; size_t dataArray[5]; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); /* put data in array */ dataArray[2] = data; CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_badSink(dataArray); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* put data in array */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117453/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66_bad(void) { int iVar1; undefined auStack_38 [16]; long lStack_28; long lStack_10; lStack_10 = 0; iVar1 = func_0x00400b70(); lStack_28 = (long)iVar1; lStack_10 = lStack_28; CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_badSink(auStack_38); return; }
['gcc']
12,078
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117453/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,079
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_badSink(size_t dataArray[]) { /* copy data out of dataArray */ size_t data = dataArray[2]; { 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"); } } }
['/* copy data out of dataArray */', '/* 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/117453/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_badSink(long param_1) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = *(ulong *)(param_1 + 0x10); uVar2 = func_0x00400ad0(&UNK_00401288); if (uVar2 < uVar1) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401288); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_004012a0); } return; }
['gcc']
12,080
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_goodG2BSink(size_t dataArray[]) { size_t data = dataArray[2]; { 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/117453/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_goodG2BSink(long param_1) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = *(ulong *)(param_1 + 0x10); uVar2 = func_0x00400ad0(&UNK_00401358); if (uVar2 < uVar1) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401358); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_00401370); } return; }
['gcc']
12,081
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_goodB2GSink(size_t dataArray[]) { size_t data = dataArray[2]; { 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/117453/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_66b_goodB2GSink(long param_1) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = *(ulong *)(param_1 + 0x10); uVar2 = func_0x00400ad0(&UNK_00401358); if ((uVar2 < uVar1) && (uVar1 < 100)) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401358); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_004013a8); } return; }
['gcc']
12,082
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67_bad() { size_t data; CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67_structType myStruct; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); myStruct.structFirst = data; CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_badSink(myStruct); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117454/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67_bad(void) { int iVar1; iVar1 = func_0x00400b70(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_badSink((long)iVar1); return; }
['gcc']
12,083
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117454/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,084
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_badSink(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67_structType myStruct) { size_t data = myStruct.structFirst; { 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/117454/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_badSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401288); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401288); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_004012a0); } return; }
['gcc']
12,085
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_goodG2BSink(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67_structType myStruct) { size_t data = myStruct.structFirst; { 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/117454/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_goodG2BSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401348); if (uVar1 < param_1) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401348); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401360); } return; }
['gcc']
12,086
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_goodB2GSink(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67_structType myStruct) { size_t data = myStruct.structFirst; { 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/117454/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_67b_goodB2GSink(ulong param_1) { ulong uVar1; undefined8 uVar2; uVar1 = func_0x00400ad0(&UNK_00401348); if ((uVar1 < param_1) && (param_1 < 100)) { uVar2 = func_0x00400b40(param_1 << 2); func_0x00400b10(uVar2,&UNK_00401348); printWLine(uVar2); func_0x00400a90(uVar2); } else { printLine(&UNK_00401398); } return; }
['gcc']
12,087
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_bad() { size_t data; /* Initialize data */ data = 0; /* POTENTIAL FLAW: Set data to a random value */ data = rand(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_badData = data; CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_badSink(); }
['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */']
['CWE789']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117455/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_bad
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_bad(void) { int iVar1; iVar1 = func_0x00400b70(); CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_badData = (long)iVar1; CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_badSink(); return; }
['gcc']
12,088
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117455/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68a.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_good
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
12,089
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_badSink() { size_t data = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117455/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_badSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_badSink(void) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_badData; uVar2 = func_0x00400ad0(&UNK_00401288); if (uVar2 < uVar1) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401288); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_004012a0); } return; }
['gcc']
12,090
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_goodG2BSink() { size_t data = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117455/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_goodG2BSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_goodG2BSink(void) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_goodG2BData; uVar2 = func_0x00400ad0(&UNK_00401348); if (uVar2 < uVar1) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401348); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_00401360); } return; }
['gcc']
12,091
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_goodB2GSink() { size_t data = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_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/117455/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b.c
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_goodB2GSink
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68b_goodB2GSink(void) { ulong uVar1; ulong uVar2; undefined8 uVar3; uVar1 = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_68_goodB2GData; uVar2 = func_0x00400ad0(&UNK_00401348); if ((uVar2 < uVar1) && (uVar1 < 100)) { uVar3 = func_0x00400b40(uVar1 << 2); func_0x00400b10(uVar3,&UNK_00401348); printWLine(uVar3); func_0x00400a90(uVar3); } else { printLine(&UNK_00401398); } return; }
['gcc']
12,092
void CWE78_OS_Command_Injection__char_connect_socket_execl_01_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; char *replace; SOCKET connectSocket = INVALID_SOCKET; size_t dataLen = strlen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ /* Abort on error or the connection was closed */ recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(char)] = '\0'; /* Eliminate CRLF */ replace = strchr(data, '\r'); if (replace) { *replace = '\0'; } replace = strchr(data, '\n'); if (replace) { *replace = '\0'; } } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117943/CWE78_OS_Command_Injection__char_connect_socket_execl_01.c
CWE78_OS_Command_Injection__char_connect_socket_execl_01_bad
void CWE78_OS_Command_Injection__char_connect_socket_execl_01_bad(void) { int iVar1; undefined2 uStack_a8; undefined2 uStack_a6; undefined4 uStack_a4; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; undefined *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_10 = &uStack_98; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c70(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400cb0(&uStack_a8,0,0x10); uStack_a8 = 2; uStack_a4 = func_0x00400d00(&UNK_004015e4); uStack_a6 = func_0x00400c80(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_a8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0), iStack_24 != -1)) && (iStack_24 != 0)) { *(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0; puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd); if (puStack_30 != (undefined *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined *)func_0x00400c90(puStack_10,10); if (puStack_30 != (undefined *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cc0(iStack_14); } func_0x00400d60(&UNK_004015f5,&UNK_004015f5,&UNK_004015f2,&UNK_004015ee,puStack_10,0); return; }
['gcc']
12,093
void CWE78_OS_Command_Injection__char_connect_socket_execl_01_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117943/CWE78_OS_Command_Injection__char_connect_socket_execl_01.c
CWE78_OS_Command_Injection__char_connect_socket_execl_01_good
void CWE78_OS_Command_Injection__char_connect_socket_execl_01_good(void) { goodG2B(); return; }
['gcc']
12,094
void CWE78_OS_Command_Injection__char_connect_socket_execl_02_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(1) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; char *replace; SOCKET connectSocket = INVALID_SOCKET; size_t dataLen = strlen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ /* Abort on error or the connection was closed */ recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(char)] = '\0'; /* Eliminate CRLF */ replace = strchr(data, '\r'); if (replace) { *replace = '\0'; } replace = strchr(data, '\n'); if (replace) { *replace = '\0'; } } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117944/CWE78_OS_Command_Injection__char_connect_socket_execl_02.c
CWE78_OS_Command_Injection__char_connect_socket_execl_02_bad
void CWE78_OS_Command_Injection__char_connect_socket_execl_02_bad(void) { int iVar1; undefined2 uStack_a8; undefined2 uStack_a6; undefined4 uStack_a4; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; undefined *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_10 = &uStack_98; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c70(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400cb0(&uStack_a8,0,0x10); uStack_a8 = 2; uStack_a4 = func_0x00400d00(&UNK_004015e4); uStack_a6 = func_0x00400c80(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_a8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0), iStack_24 != -1)) && (iStack_24 != 0)) { *(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0; puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd); if (puStack_30 != (undefined *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined *)func_0x00400c90(puStack_10,10); if (puStack_30 != (undefined *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cc0(iStack_14); } func_0x00400d60(&UNK_004015f5,&UNK_004015f5,&UNK_004015f2,&UNK_004015ee,puStack_10,0); return; }
['gcc']
12,095
void CWE78_OS_Command_Injection__char_connect_socket_execl_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117944/CWE78_OS_Command_Injection__char_connect_socket_execl_02.c
CWE78_OS_Command_Injection__char_connect_socket_execl_02_good
void CWE78_OS_Command_Injection__char_connect_socket_execl_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,096
void CWE78_OS_Command_Injection__char_connect_socket_execl_03_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(5==5) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; char *replace; SOCKET connectSocket = INVALID_SOCKET; size_t dataLen = strlen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ /* Abort on error or the connection was closed */ recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(char)] = '\0'; /* Eliminate CRLF */ replace = strchr(data, '\r'); if (replace) { *replace = '\0'; } replace = strchr(data, '\n'); if (replace) { *replace = '\0'; } } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117945/CWE78_OS_Command_Injection__char_connect_socket_execl_03.c
CWE78_OS_Command_Injection__char_connect_socket_execl_03_bad
void CWE78_OS_Command_Injection__char_connect_socket_execl_03_bad(void) { int iVar1; undefined2 uStack_a8; undefined2 uStack_a6; undefined4 uStack_a4; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; undefined *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_10 = &uStack_98; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c70(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400cb0(&uStack_a8,0,0x10); uStack_a8 = 2; uStack_a4 = func_0x00400d00(&UNK_004015e4); uStack_a6 = func_0x00400c80(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_a8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0), iStack_24 != -1)) && (iStack_24 != 0)) { *(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0; puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd); if (puStack_30 != (undefined *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined *)func_0x00400c90(puStack_10,10); if (puStack_30 != (undefined *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cc0(iStack_14); } func_0x00400d60(&UNK_004015f5,&UNK_004015f5,&UNK_004015f2,&UNK_004015ee,puStack_10,0); return; }
['gcc']
12,097
void CWE78_OS_Command_Injection__char_connect_socket_execl_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117945/CWE78_OS_Command_Injection__char_connect_socket_execl_03.c
CWE78_OS_Command_Injection__char_connect_socket_execl_03_good
void CWE78_OS_Command_Injection__char_connect_socket_execl_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,098
void CWE78_OS_Command_Injection__char_connect_socket_execl_04_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(STATIC_CONST_TRUE) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; char *replace; SOCKET connectSocket = INVALID_SOCKET; size_t dataLen = strlen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ /* Abort on error or the connection was closed */ recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(char)] = '\0'; /* Eliminate CRLF */ replace = strchr(data, '\r'); if (replace) { *replace = '\0'; } replace = strchr(data, '\n'); if (replace) { *replace = '\0'; } } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117946/CWE78_OS_Command_Injection__char_connect_socket_execl_04.c
CWE78_OS_Command_Injection__char_connect_socket_execl_04_bad
void CWE78_OS_Command_Injection__char_connect_socket_execl_04_bad(void) { int iVar1; undefined2 uStack_a8; undefined2 uStack_a6; undefined4 uStack_a4; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; undefined *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_10 = &uStack_98; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c70(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400cb0(&uStack_a8,0,0x10); uStack_a8 = 2; uStack_a4 = func_0x00400d00(&UNK_004015fc); uStack_a6 = func_0x00400c80(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_a8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0), iStack_24 != -1)) && (iStack_24 != 0)) { *(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0; puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd); if (puStack_30 != (undefined *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined *)func_0x00400c90(puStack_10,10); if (puStack_30 != (undefined *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cc0(iStack_14); } func_0x00400d60(&UNK_0040160d,&UNK_0040160d,&UNK_0040160a,&UNK_00401606,puStack_10,0); return; }
['gcc']
12,099
void CWE78_OS_Command_Injection__char_connect_socket_execl_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117946/CWE78_OS_Command_Injection__char_connect_socket_execl_04.c
CWE78_OS_Command_Injection__char_connect_socket_execl_04_good
void CWE78_OS_Command_Injection__char_connect_socket_execl_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']