Unnamed: 0 int64 0 56k | source_code stringlengths 55 5.98k | comments stringlengths 2 1.76k | label stringclasses 68 values | dataset_name stringclasses 1 value | file_name stringlengths 208 265 | function stringlengths 27 87 | decompiled_code stringlengths 68 3.97k | compiler_options stringclasses 1 value |
|---|---|---|---|---|---|---|---|---|
11,600 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_14_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117284/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_14.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_14_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_14_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,601 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_15_bad()
{
size_t data;
/* Initialize data */
data = 0;
switch(6)
{
case 6:
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
switch(7)
{
case 7:
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough\r\n * for the wcscpy() function to not cause a buffer overflow */', '/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */', '/* Copy a small string into myString */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117285/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_15.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_15_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_15_bad(void)
{
long lVar1;
ulong uVar2;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_18;
ulong uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013c8);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
uVar2 = func_0x00400bc0(&UNK_004013d8);
if (uVar2 < uStack_10) {
uStack_18 = func_0x00400c40(uStack_10 << 2);
func_0x00400c10(uStack_18,&UNK_004013d8);
printWLine(uStack_18);
func_0x00400b80(uStack_18);
}
else {
printLine(&UNK_004013f0);
}
return;
}
| ['gcc'] |
11,602 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_15_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117285/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_15.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_15_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_15_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
11,603 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_16_bad()
{
size_t data;
/* Initialize data */
data = 0;
while(1)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
break;
}
while(1)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
break;
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* 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/117286/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_16.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_16_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_16_bad(void)
{
long lVar1;
ulong uVar2;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_18;
ulong uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013c8);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
uVar2 = func_0x00400bc0(&UNK_004013d8);
if (uVar2 < uStack_10) {
uStack_18 = func_0x00400c40(uStack_10 << 2);
func_0x00400c10(uStack_18,&UNK_004013d8);
printWLine(uStack_18);
func_0x00400b80(uStack_18);
}
else {
printLine(&UNK_004013f0);
}
return;
}
| ['gcc'] |
11,604 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_16_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117286/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_16.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_16_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_16_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,605 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_17_bad()
{
int i,j;
size_t data;
/* Initialize data */
data = 0;
for(i = 0; i < 1; i++)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
}
for(j = 0; j < 1; j++)
{
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* 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/117287/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_17.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_17_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_17_bad(void)
{
long lVar1;
ulong uVar2;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined2 uStack_30;
undefined8 uStack_20;
ulong uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = 0;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
lVar1 = func_0x00400bf0(&uStack_48,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e8);
}
else {
uStack_18 = func_0x00400c70(&uStack_48,0,0);
}
}
for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) {
uVar2 = func_0x00400bc0(&UNK_004013f8);
if (uVar2 < uStack_18) {
uStack_20 = func_0x00400c40(uStack_18 << 2);
func_0x00400c10(uStack_20,&UNK_004013f8);
printWLine(uStack_20);
func_0x00400b80(uStack_20);
}
else {
printLine(&UNK_00401410);
}
}
return;
}
| ['gcc'] |
11,606 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_17_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117287/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_17.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_17_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_17_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,607 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_18_bad()
{
size_t data;
/* Initialize data */
data = 0;
goto source;
source:
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
goto sink;
sink:
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* 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/117288/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_18.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_18_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_18_bad(void)
{
long lVar1;
ulong uVar2;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_18;
ulong uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013c8);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
uVar2 = func_0x00400bc0(&UNK_004013d8);
if (uVar2 < uStack_10) {
uStack_18 = func_0x00400c40(uStack_10 << 2);
func_0x00400c10(uStack_18,&UNK_004013d8);
printWLine(uStack_18);
func_0x00400b80(uStack_18);
}
else {
printLine(&UNK_004013f0);
}
return;
}
| ['gcc'] |
11,608 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_18_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117288/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_18.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_18_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_18_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,609 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_21_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
badStatic = 1; /* true */
badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* true */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117289/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_21.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_21_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_21_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401443);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
badStatic = 1;
badSink(uStack_10);
return;
}
| ['gcc'] |
11,610 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_21_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117289/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_21.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_21_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_21_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
11,611 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_badGlobal = 1; /* true */
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* true */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117290/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013f4);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_badGlobal = 1;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_badSink(uStack_10);
return;
}
| ['gcc'] |
11,612 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117290/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
11,613 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_badSink(size_t data)
{
if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117290/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_badGlobal != 0) {
uVar1 = func_0x00400bc0(&UNK_004013f8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004013f8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401410);
}
}
return;
}
| ['gcc'] |
11,614 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodB2G1Sink(size_t data)
{
if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117290/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodB2G1Sink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodB2G1Sink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodB2G1Global == 0) {
uVar1 = func_0x00400bc0(&UNK_004015e0);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004015e0);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_004015f8);
}
}
else {
printLine(&UNK_004015c8);
}
return;
}
| ['gcc'] |
11,615 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodB2G2Sink(size_t data)
{
if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117290/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodB2G2Sink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodB2G2Sink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodB2G2Global != 0) {
uVar1 = func_0x00400bc0(&UNK_004015e0);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004015e0);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_004015f8);
}
}
return;
}
| ['gcc'] |
11,616 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodG2BSink(size_t data)
{
if(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117290/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
if (CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_22_goodG2BGlobal != 0) {
uVar1 = func_0x00400bc0(&UNK_004015e0);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004015e0);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401638);
}
}
return;
}
| ['gcc'] |
11,617 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_31_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
{
size_t dataCopy = data;
size_t data = dataCopy;
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* 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/117291/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_31.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_31_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_31_bad(void)
{
long lVar1;
ulong uVar2;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined2 uStack_30;
undefined8 uStack_28;
ulong uStack_20;
ulong uStack_18;
ulong uStack_10;
uStack_10 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
lVar1 = func_0x00400bf0(&uStack_48,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013d8);
}
else {
uStack_10 = func_0x00400c70(&uStack_48,0,0);
}
uStack_18 = uStack_10;
uStack_20 = uStack_10;
uVar2 = func_0x00400bc0(&UNK_004013e8);
if (uVar2 < uStack_20) {
uStack_28 = func_0x00400c40(uStack_20 << 2);
func_0x00400c10(uStack_28,&UNK_004013e8);
printWLine(uStack_28);
func_0x00400b80(uStack_28);
}
else {
printLine(&UNK_00401400);
}
return;
}
| ['gcc'] |
11,618 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_31_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117291/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_31.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_31_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_31_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,619 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_32_bad()
{
size_t data;
size_t *dataPtr1 = &data;
size_t *dataPtr2 = &data;
/* Initialize data */
data = 0;
{
size_t data = *dataPtr1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
*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: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* 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/117292/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_32.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_32_bad |
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_32_bad(void)
{
long lVar1;
ulong uVar2;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined2 uStack_40;
ulong uStack_38;
undefined8 uStack_30;
ulong uStack_28;
ulong *puStack_20;
ulong *puStack_18;
ulong uStack_10;
puStack_18 = &uStack_38;
puStack_20 = &uStack_38;
uStack_38 = 0;
uStack_10 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
lVar1 = func_0x00400bf0(&uStack_58,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013f8);
}
else {
uStack_10 = func_0x00400c70(&uStack_58,0,0);
}
*puStack_18 = uStack_10;
uStack_28 = *puStack_20;
uVar2 = func_0x00400bc0(&UNK_00401408);
if (uVar2 < uStack_28) {
uStack_30 = func_0x00400c40(uStack_28 << 2);
func_0x00400c10(uStack_30,&UNK_00401408);
printWLine(uStack_30);
func_0x00400b80(uStack_30);
}
else {
printLine(&UNK_00401420);
}
return;
}
| ['gcc'] |
11,620 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_32_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117292/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_32.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_32_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_32_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,621 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_34_bad()
{
size_t data;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_34_unionType myUnion;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
myUnion.unionFirst = data;
{
size_t data = myUnion.unionSecond;
{
wchar_t * myString;
/* POTENTIAL FLAW: No MAXIMUM limitation for memory allocation, but ensure data is large enough
* for the wcscpy() function to not cause a buffer overflow */
/* INCIDENTAL FLAW: The source could cause a type overrun in data or in the memory allocation */
if (data > wcslen(HELLO_STRING))
{
myString = (wchar_t *)malloc(data*sizeof(wchar_t));
/* Copy a small string into myString */
wcscpy(myString, HELLO_STRING);
printWLine(myString);
free(myString);
}
else
{
printLine("Input is less than the length of the source string");
}
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* 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/117294/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_34.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_34_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_34_bad(void)
{
long lVar1;
ulong uVar2;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined2 uStack_30;
ulong uStack_28;
undefined8 uStack_20;
ulong uStack_18;
ulong uStack_10;
uStack_10 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
lVar1 = func_0x00400bf0(&uStack_48,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013d8);
}
else {
uStack_10 = func_0x00400c70(&uStack_48,0,0);
}
uStack_28 = uStack_10;
uStack_18 = uStack_10;
uVar2 = func_0x00400bc0(&UNK_004013e8);
if (uVar2 < uStack_18) {
uStack_20 = func_0x00400c40(uStack_18 << 2);
func_0x00400c10(uStack_20,&UNK_004013e8);
printWLine(uStack_20);
func_0x00400b80(uStack_20);
}
else {
printLine(&UNK_00401400);
}
return;
}
| ['gcc'] |
11,622 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_34_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117294/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_34.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_34_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_34_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,623 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_41_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117295/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_41.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_41_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_41_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401423);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
badSink(uStack_10);
return;
}
| ['gcc'] |
11,624 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_41_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117295/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_41.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_41_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_41_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,625 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117296/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_42.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_42_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_42_bad(void)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = badSource(0);
uVar2 = func_0x00400bc0(&UNK_004013f8);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004013f8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_00401410);
}
return;
}
| ['gcc'] |
11,626 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_42_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117296/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_42.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_42_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_42_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
11,627 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_44_bad()
{
size_t data;
/* define a function pointer */
void (*funcPtr) (size_t) = badSink;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* use the function pointer */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117298/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_44.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_44_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_44_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
code *pcStack_18;
undefined8 uStack_10;
pcStack_18 = badSink;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401433);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
(*pcStack_18)(uStack_10);
return;
}
| ['gcc'] |
11,628 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_44_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117298/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_44.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_44_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_44_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,629 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_45_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_45_badData = data;
badSink();
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117299/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_45.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_45_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_45_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401433);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_45_badData = uStack_10;
badSink();
return;
}
| ['gcc'] |
11,630 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_45_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117299/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_45.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_45_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_45_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,631 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117300/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013d4);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b_badSink(uStack_10);
return;
}
| ['gcc'] |
11,632 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117300/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,633 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117300/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004013d8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004013d8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_004013f0);
}
return;
}
| ['gcc'] |
11,634 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117300/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_00401488);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_00401488);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_004014a0);
}
return;
}
| ['gcc'] |
11,635 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117300/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_51b_goodB2GSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_00401488);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_00401488);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_004014d8);
}
return;
}
| ['gcc'] |
11,636 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117301/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013f4);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_badSink(uStack_10);
return;
}
| ['gcc'] |
11,637 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117301/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,638 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117301/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_badSink(param_1);
return;
}
| ['gcc'] |
11,639 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117301/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,640 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117301/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52b_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,641 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117301/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004013f8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004013f8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401410);
}
return;
}
| ['gcc'] |
11,642 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117301/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004014c8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004014c8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_004014e0);
}
return;
}
| ['gcc'] |
11,643 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117301/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_52c_goodB2GSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004014c8);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004014c8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401518);
}
return;
}
| ['gcc'] |
11,644 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401414);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_badSink(uStack_10);
return;
}
| ['gcc'] |
11,645 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,646 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_badSink(param_1);
return;
}
| ['gcc'] |
11,647 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,648 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53b_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,649 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_badSink(param_1);
return;
}
| ['gcc'] |
11,650 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,651 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53c_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,652 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_00401418);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_00401418);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401430);
}
return;
}
| ['gcc'] |
11,653 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004014f8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004014f8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401510);
}
return;
}
| ['gcc'] |
11,654 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117302/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_53d_goodB2GSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004014f8);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004014f8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401548);
}
return;
}
| ['gcc'] |
11,655 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401424);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_badSink(uStack_10);
return;
}
| ['gcc'] |
11,656 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,657 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_badSink(param_1);
return;
}
| ['gcc'] |
11,658 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,659 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,660 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_badSink(param_1);
return;
}
| ['gcc'] |
11,661 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,662 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54c_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,663 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_badSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_badSink(data);
} | [] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_badSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_badSink(param_1);
return;
}
| ['gcc'] |
11,664 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_goodG2BSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_goodG2BSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
11,665 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_goodB2GSink(size_t data)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54d_goodB2GSink(undefined8 param_1)
{
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_goodB2GSink(param_1);
return;
}
| ['gcc'] |
11,666 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_00401428);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_00401428);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401440);
}
return;
}
| ['gcc'] |
11,667 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_00401538);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_00401538);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401550);
}
return;
}
| ['gcc'] |
11,668 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117303/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54e_goodB2GSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_00401538);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_00401538);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401588);
}
return;
}
| ['gcc'] |
11,669 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61_bad()
{
size_t data;
/* Initialize data */
data = 0;
data = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117304/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61_bad(void)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b_badSource(0);
uVar2 = func_0x00400bc0(&UNK_004013e8);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004013e8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_00401400);
}
return;
}
| ['gcc'] |
11,670 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117304/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,671 | size_t CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b_badSource(size_t data)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
return data;
} | ['/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117304/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b_badSource |
undefined8 CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b_badSource(undefined8 param_1)
{
long lVar1;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined2 uStack_10;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
uStack_10 = 0;
lVar1 = func_0x00400bf0(&uStack_28,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
uStack_30 = param_1;
}
else {
uStack_30 = func_0x00400c70(&uStack_28,0,0);
}
return uStack_30;
}
| ['gcc'] |
11,672 | size_t CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117304/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b_goodG2BSource |
undefined8 CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b_goodG2BSource(void)
{
return 0x14;
}
| ['gcc'] |
11,673 | size_t CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b_goodB2GSource(size_t data)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
return data;
} | ['/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117304/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b_goodB2GSource |
undefined8 CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_61b_goodB2GSource(undefined8 param_1)
{
long lVar1;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined2 uStack_10;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
uStack_10 = 0;
lVar1 = func_0x00400bf0(&uStack_28,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401494);
uStack_30 = param_1;
}
else {
uStack_30 = func_0x00400c70(&uStack_28,0,0);
}
return uStack_30;
}
| ['gcc'] |
11,674 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117306/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b_badSink(&uStack_10);
return;
}
| ['gcc'] |
11,675 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117306/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,676 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117306/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b_badSink(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = *param_1;
uVar2 = func_0x00400bc0(&UNK_004013e8);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004013e8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_00401400);
}
return;
}
| ['gcc'] |
11,677 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117306/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b_goodG2BSink(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = *param_1;
uVar2 = func_0x00400bc0(&UNK_004014a8);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004014a8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_004014c0);
}
return;
}
| ['gcc'] |
11,678 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117306/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_63b_goodB2GSink(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = *param_1;
uVar2 = func_0x00400bc0(&UNK_004014a8);
if ((uVar2 < uVar1) && (uVar1 < 100)) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004014a8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_004014f8);
}
return;
}
| ['gcc'] |
11,679 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117307/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b_badSink(&uStack_10);
return;
}
| ['gcc'] |
11,680 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117307/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,681 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117307/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b_badSink(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = *param_1;
uVar2 = func_0x00400bc0(&UNK_004013e8);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004013e8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_00401400);
}
return;
}
| ['gcc'] |
11,682 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117307/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b_goodG2BSink(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = *param_1;
uVar2 = func_0x00400bc0(&UNK_004014b8);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004014b8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_004014d0);
}
return;
}
| ['gcc'] |
11,683 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117307/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_64b_goodB2GSink(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = *param_1;
uVar2 = func_0x00400bc0(&UNK_004014b8);
if ((uVar2 < uVar1) && (uVar1 < 100)) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004014b8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_00401508);
}
return;
}
| ['gcc'] |
11,684 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65_bad()
{
size_t data;
/* define a function pointer */
void (*funcPtr) (size_t) = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b_badSink;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* use the function pointer */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117308/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
code *pcStack_18;
undefined8 uStack_10;
pcStack_18 = CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b_badSink;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
(*pcStack_18)(uStack_10);
return;
}
| ['gcc'] |
11,685 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117308/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,686 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117308/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004013e8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004013e8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401400);
}
return;
}
| ['gcc'] |
11,687 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117308/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004014a8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004014a8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_004014c0);
}
return;
}
| ['gcc'] |
11,688 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117308/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_65b_goodB2GSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004014a8);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004014a8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_004014f8);
}
return;
}
| ['gcc'] |
11,689 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66_bad()
{
size_t data;
size_t dataArray[5];
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
/* put data in array */
dataArray[2] = data;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b_badSink(dataArray);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */', '/* put data in array */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117309/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66_bad(void)
{
long lVar1;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined2 uStack_40;
undefined auStack_38 [16];
undefined8 uStack_28;
undefined8 uStack_10;
uStack_10 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
lVar1 = func_0x00400bf0(&uStack_58,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013f4);
}
else {
uStack_10 = func_0x00400c70(&uStack_58,0,0);
}
uStack_28 = uStack_10;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b_badSink(auStack_38);
return;
}
| ['gcc'] |
11,690 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117309/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,691 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117309/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b_badSink(long param_1)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = *(ulong *)(param_1 + 0x10);
uVar2 = func_0x00400bc0(&UNK_004013f8);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004013f8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_00401410);
}
return;
}
| ['gcc'] |
11,692 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117309/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b_goodG2BSink(long param_1)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = *(ulong *)(param_1 + 0x10);
uVar2 = func_0x00400bc0(&UNK_004014b8);
if (uVar2 < uVar1) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004014b8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_004014d0);
}
return;
}
| ['gcc'] |
11,693 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117309/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_66b_goodB2GSink(long param_1)
{
ulong uVar1;
ulong uVar2;
undefined8 uVar3;
uVar1 = *(ulong *)(param_1 + 0x10);
uVar2 = func_0x00400bc0(&UNK_004014b8);
if ((uVar2 < uVar1) && (uVar1 < 100)) {
uVar3 = func_0x00400c40(uVar1 << 2);
func_0x00400c10(uVar3,&UNK_004014b8);
printWLine(uVar3);
func_0x00400b80(uVar3);
}
else {
printLine(&UNK_00401508);
}
return;
}
| ['gcc'] |
11,694 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67_bad()
{
size_t data;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67_structType myStruct;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
myStruct.structFirst = data;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_badSink(myStruct);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117310/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_18;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
uStack_18 = uStack_10;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_badSink(uStack_10);
return;
}
| ['gcc'] |
11,695 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117310/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67_good |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
11,696 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_badSink(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117310/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_badSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_badSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004013e8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004013e8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_00401400);
}
return;
}
| ['gcc'] |
11,697 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_goodG2BSink(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117310/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_goodG2BSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_goodG2BSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004014a8);
if (uVar1 < param_1) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004014a8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_004014c0);
}
return;
}
| ['gcc'] |
11,698 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_goodB2GSink(CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_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/117310/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_goodB2GSink |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_67b_goodB2GSink(ulong param_1)
{
ulong uVar1;
undefined8 uVar2;
uVar1 = func_0x00400bc0(&UNK_004014a8);
if ((uVar1 < param_1) && (param_1 < 100)) {
uVar2 = func_0x00400c40(param_1 << 2);
func_0x00400c10(uVar2,&UNK_004014a8);
printWLine(uVar2);
func_0x00400b80(uVar2);
}
else {
printLine(&UNK_004014f8);
}
return;
}
| ['gcc'] |
11,699 | void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_bad()
{
size_t data;
/* Initialize data */
data = 0;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to unsigned int */
data = strtoul(inputBuffer, NULL, 0);
}
else
{
printLine("fgets() failed.");
}
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_badData = data;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_badSink();
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to unsigned int */'] | ['CWE789'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/117311/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68a.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_bad |
void CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_bad(void)
{
long lVar1;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined2 uStack_20;
undefined8 uStack_10;
uStack_10 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
lVar1 = func_0x00400bf0(&uStack_38,0x1a,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
}
else {
uStack_10 = func_0x00400c70(&uStack_38,0,0);
}
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68_badData = uStack_10;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_68b_badSink();
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.