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 |
|---|---|---|---|---|---|---|---|---|
7,000 | void CWE675_Duplicate_Operations_on_Resource__fopen_53d_goodG2BSink(FILE * data)
{
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110133/CWE675_Duplicate_Operations_on_Resource__fopen_53d.c | CWE675_Duplicate_Operations_on_Resource__fopen_53d_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_53d_goodG2BSink(undefined8 param_1)
{
func_0x00400a40(param_1);
return;
}
| ['gcc'] |
7,001 | void CWE675_Duplicate_Operations_on_Resource__fopen_53d_goodB2GSink(FILE * data)
{
/* Do nothing */
/* FIX: Don't close the file in the sink */
; /* empty statement needed for some flow variants */
} | ['/* Do nothing */', "/* FIX: Don't close the file in the sink */", '/* empty statement needed for some flow variants */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110133/CWE675_Duplicate_Operations_on_Resource__fopen_53d.c | CWE675_Duplicate_Operations_on_Resource__fopen_53d_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_53d_goodB2GSink(void)
{
return;
}
| ['gcc'] |
7,002 | void CWE675_Duplicate_Operations_on_Resource__fopen_54_bad()
{
FILE * data;
data = NULL; /* Initialize data */
data = fopen("BadSource_fopen.txt", "w+");
/* POTENTIAL FLAW: Close the file in the source */
fclose(data);
CWE675_Duplicate_Operations_on_Resource__fopen_54b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Close the file in the source */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54a.c | CWE675_Duplicate_Operations_on_Resource__fopen_54_bad |
void CWE675_Duplicate_Operations_on_Resource__fopen_54_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011f7,&UNK_004011f4);
func_0x00400a40(uVar1);
CWE675_Duplicate_Operations_on_Resource__fopen_54b_badSink(uVar1);
return;
}
| ['gcc'] |
7,003 | void CWE675_Duplicate_Operations_on_Resource__fopen_54_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54a.c | CWE675_Duplicate_Operations_on_Resource__fopen_54_good |
void CWE675_Duplicate_Operations_on_Resource__fopen_54_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
7,004 | void CWE675_Duplicate_Operations_on_Resource__fopen_54b_badSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54c_badSink(data);
} | [] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54b.c | CWE675_Duplicate_Operations_on_Resource__fopen_54b_badSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54b_badSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54c_badSink(param_1);
return;
}
| ['gcc'] |
7,005 | void CWE675_Duplicate_Operations_on_Resource__fopen_54b_goodG2BSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54b.c | CWE675_Duplicate_Operations_on_Resource__fopen_54b_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54b_goodG2BSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
7,006 | void CWE675_Duplicate_Operations_on_Resource__fopen_54b_goodB2GSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54b.c | CWE675_Duplicate_Operations_on_Resource__fopen_54b_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54b_goodB2GSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
7,007 | void CWE675_Duplicate_Operations_on_Resource__fopen_54c_badSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54d_badSink(data);
} | [] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54c.c | CWE675_Duplicate_Operations_on_Resource__fopen_54c_badSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54c_badSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54d_badSink(param_1);
return;
}
| ['gcc'] |
7,008 | void CWE675_Duplicate_Operations_on_Resource__fopen_54c_goodG2BSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54c.c | CWE675_Duplicate_Operations_on_Resource__fopen_54c_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54c_goodG2BSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
7,009 | void CWE675_Duplicate_Operations_on_Resource__fopen_54c_goodB2GSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54c.c | CWE675_Duplicate_Operations_on_Resource__fopen_54c_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54c_goodB2GSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
7,010 | void CWE675_Duplicate_Operations_on_Resource__fopen_54d_badSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54e_badSink(data);
} | [] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54d.c | CWE675_Duplicate_Operations_on_Resource__fopen_54d_badSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54d_badSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54e_badSink(param_1);
return;
}
| ['gcc'] |
7,011 | void CWE675_Duplicate_Operations_on_Resource__fopen_54d_goodG2BSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54d.c | CWE675_Duplicate_Operations_on_Resource__fopen_54d_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54d_goodG2BSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
7,012 | void CWE675_Duplicate_Operations_on_Resource__fopen_54d_goodB2GSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54e_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54d.c | CWE675_Duplicate_Operations_on_Resource__fopen_54d_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54d_goodB2GSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__fopen_54e_goodB2GSink(param_1);
return;
}
| ['gcc'] |
7,013 | void CWE675_Duplicate_Operations_on_Resource__fopen_54e_badSink(FILE * data)
{
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54e.c | CWE675_Duplicate_Operations_on_Resource__fopen_54e_badSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54e_badSink(undefined8 param_1)
{
func_0x00400a40(param_1);
return;
}
| ['gcc'] |
7,014 | void CWE675_Duplicate_Operations_on_Resource__fopen_54e_goodG2BSink(FILE * data)
{
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54e.c | CWE675_Duplicate_Operations_on_Resource__fopen_54e_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54e_goodG2BSink(undefined8 param_1)
{
func_0x00400a40(param_1);
return;
}
| ['gcc'] |
7,015 | void CWE675_Duplicate_Operations_on_Resource__fopen_54e_goodB2GSink(FILE * data)
{
/* Do nothing */
/* FIX: Don't close the file in the sink */
; /* empty statement needed for some flow variants */
} | ['/* Do nothing */', "/* FIX: Don't close the file in the sink */", '/* empty statement needed for some flow variants */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110134/CWE675_Duplicate_Operations_on_Resource__fopen_54e.c | CWE675_Duplicate_Operations_on_Resource__fopen_54e_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_54e_goodB2GSink(void)
{
return;
}
| ['gcc'] |
7,016 | void CWE675_Duplicate_Operations_on_Resource__fopen_66_bad()
{
FILE * data;
FILE * dataArray[5];
data = NULL; /* Initialize data */
data = fopen("BadSource_fopen.txt", "w+");
/* POTENTIAL FLAW: Close the file in the source */
fclose(data);
/* put data in array */
dataArray[2] = data;
CWE675_Duplicate_Operations_on_Resource__fopen_66b_badSink(dataArray);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Close the file in the source */', '/* put data in array */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110140/CWE675_Duplicate_Operations_on_Resource__fopen_66a.c | CWE675_Duplicate_Operations_on_Resource__fopen_66_bad |
void CWE675_Duplicate_Operations_on_Resource__fopen_66_bad(void)
{
undefined auStack_38 [16];
undefined8 uStack_28;
undefined8 uStack_10;
uStack_10 = 0;
uStack_10 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
func_0x00400a40(uStack_10);
uStack_28 = uStack_10;
CWE675_Duplicate_Operations_on_Resource__fopen_66b_badSink(auStack_38);
return;
}
| ['gcc'] |
7,017 | void CWE675_Duplicate_Operations_on_Resource__fopen_66_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110140/CWE675_Duplicate_Operations_on_Resource__fopen_66a.c | CWE675_Duplicate_Operations_on_Resource__fopen_66_good |
void CWE675_Duplicate_Operations_on_Resource__fopen_66_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
7,018 | void CWE675_Duplicate_Operations_on_Resource__fopen_66b_badSink(FILE * dataArray[])
{
/* copy data out of dataArray */
FILE * data = dataArray[2];
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* copy data out of dataArray */', '/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110140/CWE675_Duplicate_Operations_on_Resource__fopen_66b.c | CWE675_Duplicate_Operations_on_Resource__fopen_66b_badSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_66b_badSink(long param_1)
{
func_0x00400a40(*(undefined8 *)(param_1 + 0x10));
return;
}
| ['gcc'] |
7,019 | void CWE675_Duplicate_Operations_on_Resource__fopen_66b_goodG2BSink(FILE * dataArray[])
{
FILE * data = dataArray[2];
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110140/CWE675_Duplicate_Operations_on_Resource__fopen_66b.c | CWE675_Duplicate_Operations_on_Resource__fopen_66b_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_66b_goodG2BSink(long param_1)
{
func_0x00400a40(*(undefined8 *)(param_1 + 0x10));
return;
}
| ['gcc'] |
7,020 | void CWE675_Duplicate_Operations_on_Resource__fopen_66b_goodB2GSink(FILE * dataArray[])
{
FILE * data = dataArray[2];
/* Do nothing */
/* FIX: Don't close the file in the sink */
; /* empty statement needed for some flow variants */
} | ['/* Do nothing */', "/* FIX: Don't close the file in the sink */", '/* empty statement needed for some flow variants */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110140/CWE675_Duplicate_Operations_on_Resource__fopen_66b.c | CWE675_Duplicate_Operations_on_Resource__fopen_66b_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_66b_goodB2GSink(void)
{
return;
}
| ['gcc'] |
7,021 | void CWE675_Duplicate_Operations_on_Resource__fopen_67_bad()
{
FILE * data;
CWE675_Duplicate_Operations_on_Resource__fopen_67_structType myStruct;
data = NULL; /* Initialize data */
data = fopen("BadSource_fopen.txt", "w+");
/* POTENTIAL FLAW: Close the file in the source */
fclose(data);
myStruct.structFirst = data;
CWE675_Duplicate_Operations_on_Resource__fopen_67b_badSink(myStruct);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Close the file in the source */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110141/CWE675_Duplicate_Operations_on_Resource__fopen_67a.c | CWE675_Duplicate_Operations_on_Resource__fopen_67_bad |
void CWE675_Duplicate_Operations_on_Resource__fopen_67_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011b7,&UNK_004011b4);
func_0x00400a40(uVar1);
CWE675_Duplicate_Operations_on_Resource__fopen_67b_badSink(uVar1);
return;
}
| ['gcc'] |
7,022 | void CWE675_Duplicate_Operations_on_Resource__fopen_67_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110141/CWE675_Duplicate_Operations_on_Resource__fopen_67a.c | CWE675_Duplicate_Operations_on_Resource__fopen_67_good |
void CWE675_Duplicate_Operations_on_Resource__fopen_67_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
7,023 | void CWE675_Duplicate_Operations_on_Resource__fopen_67b_badSink(CWE675_Duplicate_Operations_on_Resource__fopen_67_structType myStruct)
{
FILE * data = myStruct.structFirst;
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110141/CWE675_Duplicate_Operations_on_Resource__fopen_67b.c | CWE675_Duplicate_Operations_on_Resource__fopen_67b_badSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_67b_badSink(undefined8 param_1)
{
func_0x00400a40(param_1);
return;
}
| ['gcc'] |
7,024 | void CWE675_Duplicate_Operations_on_Resource__fopen_67b_goodG2BSink(CWE675_Duplicate_Operations_on_Resource__fopen_67_structType myStruct)
{
FILE * data = myStruct.structFirst;
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110141/CWE675_Duplicate_Operations_on_Resource__fopen_67b.c | CWE675_Duplicate_Operations_on_Resource__fopen_67b_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_67b_goodG2BSink(undefined8 param_1)
{
func_0x00400a40(param_1);
return;
}
| ['gcc'] |
7,025 | void CWE675_Duplicate_Operations_on_Resource__fopen_67b_goodB2GSink(CWE675_Duplicate_Operations_on_Resource__fopen_67_structType myStruct)
{
FILE * data = myStruct.structFirst;
/* Do nothing */
/* FIX: Don't close the file in the sink */
; /* empty statement needed for some flow variants */
} | ['/* Do nothing */', "/* FIX: Don't close the file in the sink */", '/* empty statement needed for some flow variants */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110141/CWE675_Duplicate_Operations_on_Resource__fopen_67b.c | CWE675_Duplicate_Operations_on_Resource__fopen_67b_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__fopen_67b_goodB2GSink(void)
{
return;
}
| ['gcc'] |
7,026 | void CWE675_Duplicate_Operations_on_Resource__freopen_08_bad()
{
FILE * data;
data = NULL; /* Initialize data */
if(staticReturnsTrue())
{
data = freopen("BadSource_freopen.txt","w+",stdin);
/* POTENTIAL FLAW: Close the file in the source */
fclose(data);
}
if(staticReturnsTrue())
{
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Close the file in the source */', '/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110157/CWE675_Duplicate_Operations_on_Resource__freopen_08.c | CWE675_Duplicate_Operations_on_Resource__freopen_08_bad |
void CWE675_Duplicate_Operations_on_Resource__freopen_08_bad(void)
{
int iVar1;
undefined8 uStack_10;
uStack_10 = 0;
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
uStack_10 = func_0x00400aa0(&UNK_00401207,&UNK_00401204,stdin);
func_0x00400a80(uStack_10);
}
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
func_0x00400a80(uStack_10);
}
return;
}
| ['gcc'] |
7,027 | void CWE675_Duplicate_Operations_on_Resource__freopen_08_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110157/CWE675_Duplicate_Operations_on_Resource__freopen_08.c | CWE675_Duplicate_Operations_on_Resource__freopen_08_good |
void CWE675_Duplicate_Operations_on_Resource__freopen_08_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,028 | void CWE675_Duplicate_Operations_on_Resource__freopen_11_bad()
{
FILE * data;
data = NULL; /* Initialize data */
if(globalReturnsTrue())
{
data = freopen("BadSource_freopen.txt","w+",stdin);
/* POTENTIAL FLAW: Close the file in the source */
fclose(data);
}
if(globalReturnsTrue())
{
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Close the file in the source */', '/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110160/CWE675_Duplicate_Operations_on_Resource__freopen_11.c | CWE675_Duplicate_Operations_on_Resource__freopen_11_bad |
void CWE675_Duplicate_Operations_on_Resource__freopen_11_bad(void)
{
int iVar1;
undefined8 uStack_10;
uStack_10 = 0;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
uStack_10 = func_0x00400aa0(&UNK_004011f7,&UNK_004011f4,stdin);
func_0x00400a80(uStack_10);
}
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
func_0x00400a80(uStack_10);
}
return;
}
| ['gcc'] |
7,029 | void CWE675_Duplicate_Operations_on_Resource__freopen_11_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110160/CWE675_Duplicate_Operations_on_Resource__freopen_11.c | CWE675_Duplicate_Operations_on_Resource__freopen_11_good |
void CWE675_Duplicate_Operations_on_Resource__freopen_11_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,030 | void CWE675_Duplicate_Operations_on_Resource__freopen_12_bad()
{
FILE * data;
data = NULL; /* Initialize data */
if(globalReturnsTrueOrFalse())
{
data = freopen("BadSource_freopen.txt","w+",stdin);
/* POTENTIAL FLAW: Close the file in the source */
fclose(data);
}
else
{
/* FIX: Open, but do not close the file in the source */
data = fopen("GoodSource_fopen.txt", "w+");
}
if(globalReturnsTrueOrFalse())
{
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
}
else
{
/* Do nothing */
/* FIX: Don't close the file in the sink */
; /* empty statement needed for some flow variants */
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Close the file in the source */', '/* FIX: Open, but do not close the file in the source */', '/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */', '/* Do nothing */', "/* FIX: Don't close the file in the sink */", '/* empty statement needed for some flow variants */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110161/CWE675_Duplicate_Operations_on_Resource__freopen_12.c | CWE675_Duplicate_Operations_on_Resource__freopen_12_bad |
void CWE675_Duplicate_Operations_on_Resource__freopen_12_bad(void)
{
int iVar1;
undefined8 uStack_10;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
uStack_10 = func_0x00400b50(&UNK_0040125d,&UNK_00401244);
}
else {
uStack_10 = func_0x00400ad0(&UNK_00401247,&UNK_00401244,stdin);
func_0x00400ab0(uStack_10);
}
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 != 0) {
func_0x00400ab0(uStack_10);
}
return;
}
| ['gcc'] |
7,031 | void CWE675_Duplicate_Operations_on_Resource__freopen_12_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110161/CWE675_Duplicate_Operations_on_Resource__freopen_12.c | CWE675_Duplicate_Operations_on_Resource__freopen_12_good |
void CWE675_Duplicate_Operations_on_Resource__freopen_12_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
7,032 | void CWE675_Duplicate_Operations_on_Resource__freopen_53_bad()
{
FILE * data;
data = NULL; /* Initialize data */
data = freopen("BadSource_freopen.txt","w+",stdin);
/* POTENTIAL FLAW: Close the file in the source */
fclose(data);
CWE675_Duplicate_Operations_on_Resource__freopen_53b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Close the file in the source */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53a.c | CWE675_Duplicate_Operations_on_Resource__freopen_53_bad |
void CWE675_Duplicate_Operations_on_Resource__freopen_53_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400aa0(&UNK_00401227,&UNK_00401224,stdin);
func_0x00400a80(uVar1);
CWE675_Duplicate_Operations_on_Resource__freopen_53b_badSink(uVar1);
return;
}
| ['gcc'] |
7,033 | void CWE675_Duplicate_Operations_on_Resource__freopen_53_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53a.c | CWE675_Duplicate_Operations_on_Resource__freopen_53_good |
void CWE675_Duplicate_Operations_on_Resource__freopen_53_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
7,034 | void CWE675_Duplicate_Operations_on_Resource__freopen_53b_badSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53c_badSink(data);
} | [] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53b.c | CWE675_Duplicate_Operations_on_Resource__freopen_53b_badSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_53b_badSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53c_badSink(param_1);
return;
}
| ['gcc'] |
7,035 | void CWE675_Duplicate_Operations_on_Resource__freopen_53b_goodG2BSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53b.c | CWE675_Duplicate_Operations_on_Resource__freopen_53b_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_53b_goodG2BSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
7,036 | void CWE675_Duplicate_Operations_on_Resource__freopen_53b_goodB2GSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53b.c | CWE675_Duplicate_Operations_on_Resource__freopen_53b_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_53b_goodB2GSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
7,037 | void CWE675_Duplicate_Operations_on_Resource__freopen_53c_badSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53d_badSink(data);
} | [] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53c.c | CWE675_Duplicate_Operations_on_Resource__freopen_53c_badSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_53c_badSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53d_badSink(param_1);
return;
}
| ['gcc'] |
7,038 | void CWE675_Duplicate_Operations_on_Resource__freopen_53c_goodG2BSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53c.c | CWE675_Duplicate_Operations_on_Resource__freopen_53c_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_53c_goodG2BSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
7,039 | void CWE675_Duplicate_Operations_on_Resource__freopen_53c_goodB2GSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53c.c | CWE675_Duplicate_Operations_on_Resource__freopen_53c_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_53c_goodB2GSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_53d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
7,040 | void CWE675_Duplicate_Operations_on_Resource__freopen_53d_badSink(FILE * data)
{
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53d.c | CWE675_Duplicate_Operations_on_Resource__freopen_53d_badSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_53d_badSink(undefined8 param_1)
{
func_0x00400a80(param_1);
return;
}
| ['gcc'] |
7,041 | void CWE675_Duplicate_Operations_on_Resource__freopen_53d_goodG2BSink(FILE * data)
{
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53d.c | CWE675_Duplicate_Operations_on_Resource__freopen_53d_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_53d_goodG2BSink(undefined8 param_1)
{
func_0x00400ab0(param_1);
return;
}
| ['gcc'] |
7,042 | void CWE675_Duplicate_Operations_on_Resource__freopen_53d_goodB2GSink(FILE * data)
{
/* Do nothing */
/* FIX: Don't close the file in the sink */
; /* empty statement needed for some flow variants */
} | ['/* Do nothing */', "/* FIX: Don't close the file in the sink */", '/* empty statement needed for some flow variants */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110181/CWE675_Duplicate_Operations_on_Resource__freopen_53d.c | CWE675_Duplicate_Operations_on_Resource__freopen_53d_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_53d_goodB2GSink(void)
{
return;
}
| ['gcc'] |
7,043 | void CWE675_Duplicate_Operations_on_Resource__freopen_54_bad()
{
FILE * data;
data = NULL; /* Initialize data */
data = freopen("BadSource_freopen.txt","w+",stdin);
/* POTENTIAL FLAW: Close the file in the source */
fclose(data);
CWE675_Duplicate_Operations_on_Resource__freopen_54b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Close the file in the source */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54a.c | CWE675_Duplicate_Operations_on_Resource__freopen_54_bad |
void CWE675_Duplicate_Operations_on_Resource__freopen_54_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400aa0(&UNK_00401247,&UNK_00401244,stdin);
func_0x00400a80(uVar1);
CWE675_Duplicate_Operations_on_Resource__freopen_54b_badSink(uVar1);
return;
}
| ['gcc'] |
7,044 | void CWE675_Duplicate_Operations_on_Resource__freopen_54_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54a.c | CWE675_Duplicate_Operations_on_Resource__freopen_54_good |
void CWE675_Duplicate_Operations_on_Resource__freopen_54_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
7,045 | void CWE675_Duplicate_Operations_on_Resource__freopen_54b_badSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54c_badSink(data);
} | [] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54b.c | CWE675_Duplicate_Operations_on_Resource__freopen_54b_badSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54b_badSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54c_badSink(param_1);
return;
}
| ['gcc'] |
7,046 | void CWE675_Duplicate_Operations_on_Resource__freopen_54b_goodG2BSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54b.c | CWE675_Duplicate_Operations_on_Resource__freopen_54b_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54b_goodG2BSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
7,047 | void CWE675_Duplicate_Operations_on_Resource__freopen_54b_goodB2GSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54b.c | CWE675_Duplicate_Operations_on_Resource__freopen_54b_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54b_goodB2GSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
7,048 | void CWE675_Duplicate_Operations_on_Resource__freopen_54c_badSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54d_badSink(data);
} | [] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54c.c | CWE675_Duplicate_Operations_on_Resource__freopen_54c_badSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54c_badSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54d_badSink(param_1);
return;
}
| ['gcc'] |
7,049 | void CWE675_Duplicate_Operations_on_Resource__freopen_54c_goodG2BSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54c.c | CWE675_Duplicate_Operations_on_Resource__freopen_54c_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54c_goodG2BSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
7,050 | void CWE675_Duplicate_Operations_on_Resource__freopen_54c_goodB2GSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54c.c | CWE675_Duplicate_Operations_on_Resource__freopen_54c_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54c_goodB2GSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
7,051 | void CWE675_Duplicate_Operations_on_Resource__freopen_54d_badSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54e_badSink(data);
} | [] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54d.c | CWE675_Duplicate_Operations_on_Resource__freopen_54d_badSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54d_badSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54e_badSink(param_1);
return;
}
| ['gcc'] |
7,052 | void CWE675_Duplicate_Operations_on_Resource__freopen_54d_goodG2BSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54d.c | CWE675_Duplicate_Operations_on_Resource__freopen_54d_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54d_goodG2BSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
7,053 | void CWE675_Duplicate_Operations_on_Resource__freopen_54d_goodB2GSink(FILE * data)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54e_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54d.c | CWE675_Duplicate_Operations_on_Resource__freopen_54d_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54d_goodB2GSink(undefined8 param_1)
{
CWE675_Duplicate_Operations_on_Resource__freopen_54e_goodB2GSink(param_1);
return;
}
| ['gcc'] |
7,054 | void CWE675_Duplicate_Operations_on_Resource__freopen_54e_badSink(FILE * data)
{
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54e.c | CWE675_Duplicate_Operations_on_Resource__freopen_54e_badSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54e_badSink(undefined8 param_1)
{
func_0x00400a80(param_1);
return;
}
| ['gcc'] |
7,055 | void CWE675_Duplicate_Operations_on_Resource__freopen_54e_goodG2BSink(FILE * data)
{
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54e.c | CWE675_Duplicate_Operations_on_Resource__freopen_54e_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54e_goodG2BSink(undefined8 param_1)
{
func_0x00400ab0(param_1);
return;
}
| ['gcc'] |
7,056 | void CWE675_Duplicate_Operations_on_Resource__freopen_54e_goodB2GSink(FILE * data)
{
/* Do nothing */
/* FIX: Don't close the file in the sink */
; /* empty statement needed for some flow variants */
} | ['/* Do nothing */', "/* FIX: Don't close the file in the sink */", '/* empty statement needed for some flow variants */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110182/CWE675_Duplicate_Operations_on_Resource__freopen_54e.c | CWE675_Duplicate_Operations_on_Resource__freopen_54e_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_54e_goodB2GSink(void)
{
return;
}
| ['gcc'] |
7,057 | void CWE675_Duplicate_Operations_on_Resource__freopen_66_bad()
{
FILE * data;
FILE * dataArray[5];
data = NULL; /* Initialize data */
data = freopen("BadSource_freopen.txt","w+",stdin);
/* POTENTIAL FLAW: Close the file in the source */
fclose(data);
/* put data in array */
dataArray[2] = data;
CWE675_Duplicate_Operations_on_Resource__freopen_66b_badSink(dataArray);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Close the file in the source */', '/* put data in array */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110188/CWE675_Duplicate_Operations_on_Resource__freopen_66a.c | CWE675_Duplicate_Operations_on_Resource__freopen_66_bad |
void CWE675_Duplicate_Operations_on_Resource__freopen_66_bad(void)
{
undefined auStack_38 [16];
undefined8 uStack_28;
undefined8 uStack_10;
uStack_10 = 0;
uStack_10 = func_0x00400aa0(&UNK_00401207,&UNK_00401204,stdin);
func_0x00400a80(uStack_10);
uStack_28 = uStack_10;
CWE675_Duplicate_Operations_on_Resource__freopen_66b_badSink(auStack_38);
return;
}
| ['gcc'] |
7,058 | void CWE675_Duplicate_Operations_on_Resource__freopen_66_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110188/CWE675_Duplicate_Operations_on_Resource__freopen_66a.c | CWE675_Duplicate_Operations_on_Resource__freopen_66_good |
void CWE675_Duplicate_Operations_on_Resource__freopen_66_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
7,059 | void CWE675_Duplicate_Operations_on_Resource__freopen_66b_badSink(FILE * dataArray[])
{
/* copy data out of dataArray */
FILE * data = dataArray[2];
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* copy data out of dataArray */', '/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110188/CWE675_Duplicate_Operations_on_Resource__freopen_66b.c | CWE675_Duplicate_Operations_on_Resource__freopen_66b_badSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_66b_badSink(long param_1)
{
func_0x00400a80(*(undefined8 *)(param_1 + 0x10));
return;
}
| ['gcc'] |
7,060 | void CWE675_Duplicate_Operations_on_Resource__freopen_66b_goodG2BSink(FILE * dataArray[])
{
FILE * data = dataArray[2];
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110188/CWE675_Duplicate_Operations_on_Resource__freopen_66b.c | CWE675_Duplicate_Operations_on_Resource__freopen_66b_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_66b_goodG2BSink(long param_1)
{
func_0x00400ab0(*(undefined8 *)(param_1 + 0x10));
return;
}
| ['gcc'] |
7,061 | void CWE675_Duplicate_Operations_on_Resource__freopen_66b_goodB2GSink(FILE * dataArray[])
{
FILE * data = dataArray[2];
/* Do nothing */
/* FIX: Don't close the file in the sink */
; /* empty statement needed for some flow variants */
} | ['/* Do nothing */', "/* FIX: Don't close the file in the sink */", '/* empty statement needed for some flow variants */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110188/CWE675_Duplicate_Operations_on_Resource__freopen_66b.c | CWE675_Duplicate_Operations_on_Resource__freopen_66b_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_66b_goodB2GSink(void)
{
return;
}
| ['gcc'] |
7,062 | void CWE675_Duplicate_Operations_on_Resource__freopen_67_bad()
{
FILE * data;
CWE675_Duplicate_Operations_on_Resource__freopen_67_structType myStruct;
data = NULL; /* Initialize data */
data = freopen("BadSource_freopen.txt","w+",stdin);
/* POTENTIAL FLAW: Close the file in the source */
fclose(data);
myStruct.structFirst = data;
CWE675_Duplicate_Operations_on_Resource__freopen_67b_badSink(myStruct);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Close the file in the source */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110189/CWE675_Duplicate_Operations_on_Resource__freopen_67a.c | CWE675_Duplicate_Operations_on_Resource__freopen_67_bad |
void CWE675_Duplicate_Operations_on_Resource__freopen_67_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400aa0(&UNK_00401207,&UNK_00401204,stdin);
func_0x00400a80(uVar1);
CWE675_Duplicate_Operations_on_Resource__freopen_67b_badSink(uVar1);
return;
}
| ['gcc'] |
7,063 | void CWE675_Duplicate_Operations_on_Resource__freopen_67_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110189/CWE675_Duplicate_Operations_on_Resource__freopen_67a.c | CWE675_Duplicate_Operations_on_Resource__freopen_67_good |
void CWE675_Duplicate_Operations_on_Resource__freopen_67_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
7,064 | void CWE675_Duplicate_Operations_on_Resource__freopen_67b_badSink(CWE675_Duplicate_Operations_on_Resource__freopen_67_structType myStruct)
{
FILE * data = myStruct.structFirst;
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | ['CWE675'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110189/CWE675_Duplicate_Operations_on_Resource__freopen_67b.c | CWE675_Duplicate_Operations_on_Resource__freopen_67b_badSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_67b_badSink(undefined8 param_1)
{
func_0x00400a80(param_1);
return;
}
| ['gcc'] |
7,065 | void CWE675_Duplicate_Operations_on_Resource__freopen_67b_goodG2BSink(CWE675_Duplicate_Operations_on_Resource__freopen_67_structType myStruct)
{
FILE * data = myStruct.structFirst;
/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */
fclose(data);
} | ['/* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110189/CWE675_Duplicate_Operations_on_Resource__freopen_67b.c | CWE675_Duplicate_Operations_on_Resource__freopen_67b_goodG2BSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_67b_goodG2BSink(undefined8 param_1)
{
func_0x00400ab0(param_1);
return;
}
| ['gcc'] |
7,066 | void CWE675_Duplicate_Operations_on_Resource__freopen_67b_goodB2GSink(CWE675_Duplicate_Operations_on_Resource__freopen_67_structType myStruct)
{
FILE * data = myStruct.structFirst;
/* Do nothing */
/* FIX: Don't close the file in the sink */
; /* empty statement needed for some flow variants */
} | ['/* Do nothing */', "/* FIX: Don't close the file in the sink */", '/* empty statement needed for some flow variants */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110189/CWE675_Duplicate_Operations_on_Resource__freopen_67b.c | CWE675_Duplicate_Operations_on_Resource__freopen_67b_goodB2GSink |
void CWE675_Duplicate_Operations_on_Resource__freopen_67b_goodB2GSink(void)
{
return;
}
| ['gcc'] |
7,067 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_01_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110312/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_01.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_01_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_01_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401534);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)
) && (iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,068 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_01_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110312/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_01.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_01_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_01_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
7,069 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_02_bad()
{
int data;
/* Initialize data */
data = -1;
if(1)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110313/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_02.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_02_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_02_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401534);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)
) && (iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,070 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_02_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110313/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_02.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_02_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_02_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,071 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_03_bad()
{
int data;
/* Initialize data */
data = -1;
if(5==5)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110314/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_03.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_03_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_03_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401534);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)
) && (iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,072 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_03_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110314/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_03.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_03_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_03_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,073 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_04_bad()
{
int data;
/* Initialize data */
data = -1;
if(STATIC_CONST_TRUE)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110315/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_04.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_04_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_04_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_0040154c);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)
) && (iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,074 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_04_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110315/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_04.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_04_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_04_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,075 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_05_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticTrue)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110316/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_05.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_05_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_05_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
if (staticTrue != 0) {
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401544);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)) &&
(iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,076 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_05_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110316/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_05.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_05_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_05_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,077 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_06_bad()
{
int data;
/* Initialize data */
data = -1;
if(STATIC_CONST_FIVE==5)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110317/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_06.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_06_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_06_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401548);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)
) && (iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,078 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_06_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110317/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_06.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_06_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_06_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,079 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_07_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticFive==5)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110318/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_07.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_07_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_07_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
if (staticFive == 5) {
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401544);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)) &&
(iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,080 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_07_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110318/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_07.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_07_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_07_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,081 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_08_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticReturnsTrue())
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110319/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_08.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_08_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_08_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401554);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)) &&
(iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,082 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_08_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110319/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_08.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_08_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_08_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,083 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_09_bad()
{
int data;
/* Initialize data */
data = -1;
if(GLOBAL_CONST_TRUE)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110320/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_09.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_09_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_09_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
if (GLOBAL_CONST_TRUE != 0) {
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401544);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)) &&
(iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,084 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_09_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110320/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_09.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_09_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_09_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,085 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_10_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalTrue)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110321/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_10.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_10_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_10_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
if (globalTrue != 0) {
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401544);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)) &&
(iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,086 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_10_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110321/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_10.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_10_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_10_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,087 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_11_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalReturnsTrue())
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110322/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_11.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_11_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_11_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401544);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)) &&
(iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,088 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_11_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110322/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_11.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_11_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_11_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,089 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_12_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalReturnsTrueOrFalse())
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
else
{
/* FIX: Set data to a relatively small number greater than zero */
data = 20;
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* FIX: Set data to a relatively small number greater than zero */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110323/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_12.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_12_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_12_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
iStack_c = 0x14;
}
else {
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401554);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)) &&
(iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,090 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_12_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110323/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_12.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_12_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_12_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
7,091 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_13_bad()
{
int data;
/* Initialize data */
data = -1;
if(GLOBAL_CONST_FIVE==5)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110324/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_13.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_13_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_13_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
if (GLOBAL_CONST_FIVE == 5) {
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401544);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)) &&
(iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,092 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_13_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110324/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_13.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_13_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_13_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,093 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_14_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalFive==5)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110325/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_14.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_14_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_14_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
if (globalFive == 5) {
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401544);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)) &&
(iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,094 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_14_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110325/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_14.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_14_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_14_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,095 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_15_bad()
{
int data;
/* Initialize data */
data = -1;
switch(6)
{
case 6:
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110326/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_15.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_15_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_15_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401534);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)
) && (iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,096 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_15_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110326/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_15.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_15_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_15_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
7,097 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_16_bad()
{
int data;
/* Initialize data */
data = -1;
while(1)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
break;
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110327/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_16.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_16_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_16_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_20;
int iStack_1c;
ulong uStack_18;
int iStack_c;
iStack_c = -1;
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401534);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_20 = func_0x00400c50(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)
) && (iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400cb0(iStack_1c);
}
puStack_28 = (undefined4 *)func_0x00400d20((long)iStack_c << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) {
puStack_28[uStack_18] = 0;
}
printIntLine(*puStack_28);
func_0x00400c40(puStack_28);
return;
}
| ['gcc'] |
7,098 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_16_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110327/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_16.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_16_good |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_16_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
7,099 | void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_17_bad()
{
int i;
int data;
/* Initialize data */
data = -1;
for(i = 0; i < 1; i++)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET connectSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
{
size_t i;
int *intPointer;
/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
* so that the for loop doing the initialization causes a buffer overflow */
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
}
printIntLine(intPointer[0]);
free(intPointer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */'] | ['CWE680'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110328/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_17.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_17_bad |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_17_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
int iStack_28;
int iStack_24;
undefined4 *puStack_20;
ulong uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = -1;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
iStack_24 = 0xffffffff;
iStack_24 = func_0x00400d90(2,1,6);
if (iStack_24 != -1) {
func_0x00400ca0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cf0(&UNK_00401554);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_24,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_28 = func_0x00400c50(iStack_24,auStack_46,0xd,0), iStack_28 != -1)) &&
(iStack_28 != 0)) {
auStack_46[iStack_28] = 0;
iStack_10 = func_0x00400d50(auStack_46);
}
}
if (iStack_24 != -1) {
func_0x00400cb0(iStack_24);
}
}
puStack_20 = (undefined4 *)func_0x00400d20((long)iStack_10 << 2);
for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_10; uStack_18 = uStack_18 + 1) {
puStack_20[uStack_18] = 0;
}
printIntLine(*puStack_20);
func_0x00400c40(puStack_20);
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.