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 |
|---|---|---|---|---|---|---|---|---|
55,900
|
void CWE401_Memory_Leak__malloc_realloc_int_16_bad()
{
while(1)
{
{
int * data = (int *)malloc(100*sizeof(int));
/* Initialize and make use of data */
data[0] = 5;
printIntLine(data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (int *)realloc(data, (130000)*sizeof(int));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0] = 10;
printIntLine(data[0]);
free(data);
}
}
break;
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99685/CWE401_Memory_Leak__malloc_realloc_int_16.c
|
CWE401_Memory_Leak__malloc_realloc_int_16_bad
|
void CWE401_Memory_Leak__malloc_realloc_int_16_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(400);
*puVar1 = 5;
printIntLine(*puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,520000);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 10;
printIntLine(*puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,901
|
void CWE401_Memory_Leak__malloc_realloc_int_16_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99685/CWE401_Memory_Leak__malloc_realloc_int_16.c
|
CWE401_Memory_Leak__malloc_realloc_int_16_good
|
void CWE401_Memory_Leak__malloc_realloc_int_16_good(void)
{
good1();
return;
}
|
['gcc']
|
55,902
|
void CWE401_Memory_Leak__malloc_realloc_int_17_bad()
{
int j;
for(j = 0; j < 1; j++)
{
{
int * data = (int *)malloc(100*sizeof(int));
/* Initialize and make use of data */
data[0] = 5;
printIntLine(data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (int *)realloc(data, (130000)*sizeof(int));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0] = 10;
printIntLine(data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99686/CWE401_Memory_Leak__malloc_realloc_int_17.c
|
CWE401_Memory_Leak__malloc_realloc_int_17_bad
|
void CWE401_Memory_Leak__malloc_realloc_int_17_bad(void)
{
undefined4 *puVar1;
int iStack_c;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
puVar1 = (undefined4 *)func_0x00400af0(400);
*puVar1 = 5;
printIntLine(*puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,520000);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 10;
printIntLine(*puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,903
|
void CWE401_Memory_Leak__malloc_realloc_int_17_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99686/CWE401_Memory_Leak__malloc_realloc_int_17.c
|
CWE401_Memory_Leak__malloc_realloc_int_17_good
|
void CWE401_Memory_Leak__malloc_realloc_int_17_good(void)
{
good1();
return;
}
|
['gcc']
|
55,904
|
void CWE401_Memory_Leak__malloc_realloc_int_18_bad()
{
goto sink;
sink:
{
int * data = (int *)malloc(100*sizeof(int));
/* Initialize and make use of data */
data[0] = 5;
printIntLine(data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (int *)realloc(data, (130000)*sizeof(int));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0] = 10;
printIntLine(data[0]);
free(data);
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99687/CWE401_Memory_Leak__malloc_realloc_int_18.c
|
CWE401_Memory_Leak__malloc_realloc_int_18_bad
|
void CWE401_Memory_Leak__malloc_realloc_int_18_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(400);
*puVar1 = 5;
printIntLine(*puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,520000);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 10;
printIntLine(*puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,905
|
void CWE401_Memory_Leak__malloc_realloc_int_18_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99687/CWE401_Memory_Leak__malloc_realloc_int_18.c
|
CWE401_Memory_Leak__malloc_realloc_int_18_good
|
void CWE401_Memory_Leak__malloc_realloc_int_18_good(void)
{
good1();
return;
}
|
['gcc']
|
55,906
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_01_bad()
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99688/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_01.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_01_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_01_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,907
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_01_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99688/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_01.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_01_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_01_good(void)
{
good1();
return;
}
|
['gcc']
|
55,908
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_02_bad()
{
if(1)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99689/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_02.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_02_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_02_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,909
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_02_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99689/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_02.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_02_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_02_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,910
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_03_bad()
{
if(5==5)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99690/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_03.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_03_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_03_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,911
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_03_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99690/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_03.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_03_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_03_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,912
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_04_bad()
{
if(STATIC_CONST_TRUE)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99691/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_04.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_04_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_04_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,913
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_04_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99691/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_04.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_04_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_04_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,914
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_05_bad()
{
if(staticTrue)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99692/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_05.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_05_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_05_bad(void)
{
undefined4 *puVar1;
if (staticTrue != 0) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,915
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_05_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99692/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_05.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_05_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_05_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,916
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_06_bad()
{
if(STATIC_CONST_FIVE==5)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99693/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_06.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_06_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_06_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,917
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_06_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99693/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_06.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_06_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_06_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,918
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_07_bad()
{
if(staticFive==5)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99694/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_07.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_07_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_07_bad(void)
{
undefined4 *puVar1;
if (staticFive == 5) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,919
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_07_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99694/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_07.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_07_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_07_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,920
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_08_bad()
{
if(staticReturnsTrue())
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99695/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_08.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_08_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_08_bad(void)
{
int iVar1;
undefined4 *puVar2;
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
puVar2 = (undefined4 *)func_0x00400af0(800);
*puVar2 = 0;
puVar2[1] = 0;
printStructLine(puVar2);
puVar2 = (undefined4 *)func_0x00400b20(puVar2,0xfde80);
if (puVar2 != (undefined4 *)0x0) {
*puVar2 = 1;
puVar2[1] = 1;
printStructLine(puVar2);
func_0x00400a60(puVar2);
}
}
return;
}
|
['gcc']
|
55,921
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_08_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99695/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_08.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_08_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_08_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,922
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_09_bad()
{
if(GLOBAL_CONST_TRUE)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99696/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_09.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_09_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_09_bad(void)
{
undefined4 *puVar1;
if (GLOBAL_CONST_TRUE != 0) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,923
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_09_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99696/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_09.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_09_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_09_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,924
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_10_bad()
{
if(globalTrue)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99697/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_10.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_10_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_10_bad(void)
{
undefined4 *puVar1;
if (globalTrue != 0) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,925
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_10_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99697/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_10.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_10_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_10_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,926
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_11_bad()
{
if(globalReturnsTrue())
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99698/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_11.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_11_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_11_bad(void)
{
int iVar1;
undefined4 *puVar2;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
puVar2 = (undefined4 *)func_0x00400af0(800);
*puVar2 = 0;
puVar2[1] = 0;
printStructLine(puVar2);
puVar2 = (undefined4 *)func_0x00400b20(puVar2,0xfde80);
if (puVar2 != (undefined4 *)0x0) {
*puVar2 = 1;
puVar2[1] = 1;
printStructLine(puVar2);
func_0x00400a60(puVar2);
}
}
return;
}
|
['gcc']
|
55,927
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_11_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99698/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_11.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_11_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_11_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,928
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_12_bad()
{
if(globalReturnsTrueOrFalse())
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
else
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
struct _twoIntsStruct * tmpData;
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
tmpData = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
/* FIX: Ensure realloc() was successful before assigning data to the memory block
* allocated with realloc() */
if (tmpData != NULL)
{
data = tmpData;
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
}
free(data);
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */', '/* Initialize and make use of data */', '/* FIX: Ensure realloc() was successful before assigning data to the memory block\r\n * allocated with realloc() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99699/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_12.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_12_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_12_bad(void)
{
int iVar1;
undefined4 *puVar2;
undefined4 *puStack_10;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
puStack_10 = (undefined4 *)func_0x00400af0(800);
*puStack_10 = 0;
puStack_10[1] = 0;
printStructLine(puStack_10);
puVar2 = (undefined4 *)func_0x00400b20(puStack_10,0xfde80);
if (puVar2 != (undefined4 *)0x0) {
*puVar2 = 1;
puVar2[1] = 1;
printStructLine(puVar2);
puStack_10 = puVar2;
}
func_0x00400a60(puStack_10);
}
else {
puVar2 = (undefined4 *)func_0x00400af0(800);
*puVar2 = 0;
puVar2[1] = 0;
printStructLine(puVar2);
puVar2 = (undefined4 *)func_0x00400b20(puVar2,0xfde80);
if (puVar2 != (undefined4 *)0x0) {
*puVar2 = 1;
puVar2[1] = 1;
printStructLine(puVar2);
func_0x00400a60(puVar2);
}
}
return;
}
|
['gcc']
|
55,929
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_12_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99699/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_12.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_12_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_12_good(void)
{
good1();
return;
}
|
['gcc']
|
55,930
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_13_bad()
{
if(GLOBAL_CONST_FIVE==5)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99700/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_13.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_13_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_13_bad(void)
{
undefined4 *puVar1;
if (GLOBAL_CONST_FIVE == 5) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,931
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_13_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99700/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_13.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_13_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_13_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,932
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_14_bad()
{
if(globalFive==5)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99701/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_14.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_14_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_14_bad(void)
{
undefined4 *puVar1;
if (globalFive == 5) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,933
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_14_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99701/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_14.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_14_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_14_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,934
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_15_bad()
{
switch(6)
{
case 6:
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99702/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_15.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_15_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_15_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,935
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_15_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99702/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_15.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_15_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_15_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,936
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_16_bad()
{
while(1)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
break;
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99703/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_16.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_16_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_16_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,937
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_16_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99703/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_16.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_16_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_16_good(void)
{
good1();
return;
}
|
['gcc']
|
55,938
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_17_bad()
{
int j;
for(j = 0; j < 1; j++)
{
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99704/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_17.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_17_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_17_bad(void)
{
undefined4 *puVar1;
int iStack_c;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,939
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_17_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99704/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_17.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_17_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_17_good(void)
{
good1();
return;
}
|
['gcc']
|
55,940
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_18_bad()
{
goto sink;
sink:
{
struct _twoIntsStruct * data = (struct _twoIntsStruct *)malloc(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (struct _twoIntsStruct *)realloc(data, (130000)*sizeof(struct _twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine((twoIntsStruct *)&data[0]);
free(data);
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99705/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_18.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_18_bad
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_18_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,941
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_18_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99705/CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_18.c
|
CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_18_good
|
void CWE401_Memory_Leak__malloc_realloc_struct_twoIntsStruct_18_good(void)
{
good1();
return;
}
|
['gcc']
|
55,942
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_01_bad()
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99706/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_01.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_01_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_01_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,943
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_01_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99706/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_01.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_01_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_01_good(void)
{
good1();
return;
}
|
['gcc']
|
55,944
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_02_bad()
{
if(1)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99707/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_02.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_02_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_02_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,945
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_02_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99707/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_02.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_02_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_02_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,946
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_03_bad()
{
if(5==5)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99708/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_03.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_03_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_03_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,947
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_03_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99708/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_03.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_03_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_03_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,948
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_04_bad()
{
if(STATIC_CONST_TRUE)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99709/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_04.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_04_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_04_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,949
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_04_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99709/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_04.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_04_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_04_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,950
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_05_bad()
{
if(staticTrue)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99710/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_05.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_05_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_05_bad(void)
{
undefined4 *puVar1;
if (staticTrue != 0) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,951
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_05_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99710/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_05.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_05_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_05_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,952
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_06_bad()
{
if(STATIC_CONST_FIVE==5)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99711/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_06.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_06_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_06_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,953
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_06_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99711/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_06.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_06_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_06_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,954
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_07_bad()
{
if(staticFive==5)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99712/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_07.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_07_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_07_bad(void)
{
undefined4 *puVar1;
if (staticFive == 5) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,955
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_07_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99712/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_07.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_07_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_07_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,956
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_08_bad()
{
if(staticReturnsTrue())
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99713/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_08.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_08_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_08_bad(void)
{
int iVar1;
undefined4 *puVar2;
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
puVar2 = (undefined4 *)func_0x00400af0(800);
*puVar2 = 0;
puVar2[1] = 0;
printStructLine(puVar2);
puVar2 = (undefined4 *)func_0x00400b20(puVar2,0xfde80);
if (puVar2 != (undefined4 *)0x0) {
*puVar2 = 1;
puVar2[1] = 1;
printStructLine(puVar2);
func_0x00400a60(puVar2);
}
}
return;
}
|
['gcc']
|
55,957
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_08_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99713/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_08.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_08_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_08_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,958
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_09_bad()
{
if(GLOBAL_CONST_TRUE)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99714/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_09.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_09_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_09_bad(void)
{
undefined4 *puVar1;
if (GLOBAL_CONST_TRUE != 0) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,959
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_09_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99714/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_09.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_09_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_09_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,960
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_10_bad()
{
if(globalTrue)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99715/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_10.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_10_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_10_bad(void)
{
undefined4 *puVar1;
if (globalTrue != 0) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,961
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_10_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99715/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_10.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_10_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_10_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,962
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_11_bad()
{
if(globalReturnsTrue())
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99716/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_11.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_11_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_11_bad(void)
{
int iVar1;
undefined4 *puVar2;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
puVar2 = (undefined4 *)func_0x00400af0(800);
*puVar2 = 0;
puVar2[1] = 0;
printStructLine(puVar2);
puVar2 = (undefined4 *)func_0x00400b20(puVar2,0xfde80);
if (puVar2 != (undefined4 *)0x0) {
*puVar2 = 1;
puVar2[1] = 1;
printStructLine(puVar2);
func_0x00400a60(puVar2);
}
}
return;
}
|
['gcc']
|
55,963
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_11_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99716/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_11.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_11_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_11_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,964
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_12_bad()
{
if(globalReturnsTrueOrFalse())
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
else
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
twoIntsStruct * tmpData;
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
tmpData = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
/* FIX: Ensure realloc() was successful before assigning data to the memory block
* allocated with realloc() */
if (tmpData != NULL)
{
data = tmpData;
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
}
free(data);
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */', '/* Initialize and make use of data */', '/* FIX: Ensure realloc() was successful before assigning data to the memory block\r\n * allocated with realloc() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99717/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_12.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_12_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_12_bad(void)
{
int iVar1;
undefined4 *puVar2;
undefined4 *puStack_10;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
puStack_10 = (undefined4 *)func_0x00400af0(800);
*puStack_10 = 0;
puStack_10[1] = 0;
printStructLine(puStack_10);
puVar2 = (undefined4 *)func_0x00400b20(puStack_10,0xfde80);
if (puVar2 != (undefined4 *)0x0) {
*puVar2 = 1;
puVar2[1] = 1;
printStructLine(puVar2);
puStack_10 = puVar2;
}
func_0x00400a60(puStack_10);
}
else {
puVar2 = (undefined4 *)func_0x00400af0(800);
*puVar2 = 0;
puVar2[1] = 0;
printStructLine(puVar2);
puVar2 = (undefined4 *)func_0x00400b20(puVar2,0xfde80);
if (puVar2 != (undefined4 *)0x0) {
*puVar2 = 1;
puVar2[1] = 1;
printStructLine(puVar2);
func_0x00400a60(puVar2);
}
}
return;
}
|
['gcc']
|
55,965
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_12_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99717/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_12.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_12_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_12_good(void)
{
good1();
return;
}
|
['gcc']
|
55,966
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_13_bad()
{
if(GLOBAL_CONST_FIVE==5)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99718/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_13.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_13_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_13_bad(void)
{
undefined4 *puVar1;
if (GLOBAL_CONST_FIVE == 5) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,967
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_13_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99718/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_13.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_13_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_13_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,968
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_14_bad()
{
if(globalFive==5)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99719/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_14.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_14_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_14_bad(void)
{
undefined4 *puVar1;
if (globalFive == 5) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,969
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_14_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99719/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_14.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_14_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_14_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,970
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_15_bad()
{
switch(6)
{
case 6:
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99720/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_15.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_15_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_15_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,971
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_15_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99720/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_15.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_15_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_15_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,972
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_16_bad()
{
while(1)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
break;
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99721/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_16.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_16_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_16_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,973
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_16_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99721/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_16.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_16_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_16_good(void)
{
good1();
return;
}
|
['gcc']
|
55,974
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_17_bad()
{
int j;
for(j = 0; j < 1; j++)
{
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99722/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_17.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_17_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_17_bad(void)
{
undefined4 *puVar1;
int iStack_c;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
}
return;
}
|
['gcc']
|
55,975
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_17_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99722/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_17.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_17_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_17_good(void)
{
good1();
return;
}
|
['gcc']
|
55,976
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_18_bad()
{
goto sink;
sink:
{
twoIntsStruct * data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (twoIntsStruct *)realloc(data, (130000)*sizeof(twoIntsStruct));
if (data != NULL)
{
/* Reinitialize and make use of data */
data[0].intOne = 1;
data[0].intTwo = 1;
printStructLine(&data[0]);
free(data);
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99723/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_18.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_18_bad
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_18_bad(void)
{
undefined4 *puVar1;
puVar1 = (undefined4 *)func_0x00400af0(800);
*puVar1 = 0;
puVar1[1] = 0;
printStructLine(puVar1);
puVar1 = (undefined4 *)func_0x00400b20(puVar1,0xfde80);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = 1;
puVar1[1] = 1;
printStructLine(puVar1);
func_0x00400a60(puVar1);
}
return;
}
|
['gcc']
|
55,977
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_18_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99723/CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_18.c
|
CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_18_good
|
void CWE401_Memory_Leak__malloc_realloc_twoIntsStruct_18_good(void)
{
good1();
return;
}
|
['gcc']
|
55,978
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_01_bad()
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99724/CWE401_Memory_Leak__malloc_realloc_wchar_t_01.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_01_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_01_bad(void)
{
undefined8 uVar1;
long lVar2;
uVar1 = func_0x00400b30(400);
func_0x00400b00(uVar1,&UNK_00401258);
printWLine(uVar1);
lVar2 = func_0x00400b60(uVar1,520000);
if (lVar2 != 0) {
func_0x00400b00(lVar2,&UNK_00401280);
printWLine(lVar2);
func_0x00400a90(lVar2);
}
return;
}
|
['gcc']
|
55,979
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_01_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99724/CWE401_Memory_Leak__malloc_realloc_wchar_t_01.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_01_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_01_good(void)
{
good1();
return;
}
|
['gcc']
|
55,980
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_02_bad()
{
if(1)
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99725/CWE401_Memory_Leak__malloc_realloc_wchar_t_02.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_02_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_02_bad(void)
{
undefined8 uVar1;
long lVar2;
uVar1 = func_0x00400b30(400);
func_0x00400b00(uVar1,&UNK_00401258);
printWLine(uVar1);
lVar2 = func_0x00400b60(uVar1,520000);
if (lVar2 != 0) {
func_0x00400b00(lVar2,&UNK_00401280);
printWLine(lVar2);
func_0x00400a90(lVar2);
}
return;
}
|
['gcc']
|
55,981
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_02_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99725/CWE401_Memory_Leak__malloc_realloc_wchar_t_02.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_02_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_02_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,982
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_03_bad()
{
if(5==5)
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99726/CWE401_Memory_Leak__malloc_realloc_wchar_t_03.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_03_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_03_bad(void)
{
undefined8 uVar1;
long lVar2;
uVar1 = func_0x00400b30(400);
func_0x00400b00(uVar1,&UNK_00401258);
printWLine(uVar1);
lVar2 = func_0x00400b60(uVar1,520000);
if (lVar2 != 0) {
func_0x00400b00(lVar2,&UNK_00401280);
printWLine(lVar2);
func_0x00400a90(lVar2);
}
return;
}
|
['gcc']
|
55,983
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_03_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99726/CWE401_Memory_Leak__malloc_realloc_wchar_t_03.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_03_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_03_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,984
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_04_bad()
{
if(STATIC_CONST_TRUE)
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99727/CWE401_Memory_Leak__malloc_realloc_wchar_t_04.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_04_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_04_bad(void)
{
undefined8 uVar1;
long lVar2;
uVar1 = func_0x00400b30(400);
func_0x00400b00(uVar1,&UNK_00401270);
printWLine(uVar1);
lVar2 = func_0x00400b60(uVar1,520000);
if (lVar2 != 0) {
func_0x00400b00(lVar2,&UNK_00401298);
printWLine(lVar2);
func_0x00400a90(lVar2);
}
return;
}
|
['gcc']
|
55,985
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_04_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99727/CWE401_Memory_Leak__malloc_realloc_wchar_t_04.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_04_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_04_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,986
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_05_bad()
{
if(staticTrue)
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99728/CWE401_Memory_Leak__malloc_realloc_wchar_t_05.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_05_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_05_bad(void)
{
undefined8 uVar1;
long lVar2;
if (staticTrue != 0) {
uVar1 = func_0x00400b30(400);
func_0x00400b00(uVar1,&UNK_00401268);
printWLine(uVar1);
lVar2 = func_0x00400b60(uVar1,520000);
if (lVar2 != 0) {
func_0x00400b00(lVar2,&UNK_00401290);
printWLine(lVar2);
func_0x00400a90(lVar2);
}
}
return;
}
|
['gcc']
|
55,987
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_05_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99728/CWE401_Memory_Leak__malloc_realloc_wchar_t_05.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_05_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_05_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,988
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_06_bad()
{
if(STATIC_CONST_FIVE==5)
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99729/CWE401_Memory_Leak__malloc_realloc_wchar_t_06.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_06_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_06_bad(void)
{
undefined8 uVar1;
long lVar2;
uVar1 = func_0x00400b30(400);
func_0x00400b00(uVar1,&UNK_00401270);
printWLine(uVar1);
lVar2 = func_0x00400b60(uVar1,520000);
if (lVar2 != 0) {
func_0x00400b00(lVar2,&UNK_00401298);
printWLine(lVar2);
func_0x00400a90(lVar2);
}
return;
}
|
['gcc']
|
55,989
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_06_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99729/CWE401_Memory_Leak__malloc_realloc_wchar_t_06.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_06_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_06_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,990
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_07_bad()
{
if(staticFive==5)
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99730/CWE401_Memory_Leak__malloc_realloc_wchar_t_07.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_07_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_07_bad(void)
{
undefined8 uVar1;
long lVar2;
if (staticFive == 5) {
uVar1 = func_0x00400b30(400);
func_0x00400b00(uVar1,&UNK_00401268);
printWLine(uVar1);
lVar2 = func_0x00400b60(uVar1,520000);
if (lVar2 != 0) {
func_0x00400b00(lVar2,&UNK_00401290);
printWLine(lVar2);
func_0x00400a90(lVar2);
}
}
return;
}
|
['gcc']
|
55,991
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_07_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99730/CWE401_Memory_Leak__malloc_realloc_wchar_t_07.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_07_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_07_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,992
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_11_bad()
{
if(globalReturnsTrue())
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99734/CWE401_Memory_Leak__malloc_realloc_wchar_t_11.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_11_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_11_bad(void)
{
int iVar1;
undefined8 uVar2;
long lVar3;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
uVar2 = func_0x00400b30(400);
func_0x00400b00(uVar2,&UNK_00401268);
printWLine(uVar2);
lVar3 = func_0x00400b60(uVar2,520000);
if (lVar3 != 0) {
func_0x00400b00(lVar3,&UNK_00401290);
printWLine(lVar3);
func_0x00400a90(lVar3);
}
}
return;
}
|
['gcc']
|
55,993
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_11_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99734/CWE401_Memory_Leak__malloc_realloc_wchar_t_11.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_11_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_11_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,994
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_12_bad()
{
if(globalReturnsTrueOrFalse())
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
}
else
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
wchar_t * tmpData;
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
tmpData = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
/* FIX: Ensure realloc() was successful before assigning data to the memory block
* allocated with realloc() */
if (tmpData != NULL)
{
data = tmpData;
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
}
free(data);
}
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */', '/* Initialize and make use of data */', '/* FIX: Ensure realloc() was successful before assigning data to the memory block\r\n * allocated with realloc() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99735/CWE401_Memory_Leak__malloc_realloc_wchar_t_12.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_12_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_12_bad(void)
{
int iVar1;
undefined8 uVar2;
long lVar3;
long lStack_10;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
lStack_10 = func_0x00400b30(400);
func_0x00400b00(lStack_10,&UNK_004012e8);
printWLine(lStack_10);
lVar3 = func_0x00400b60(lStack_10,520000);
if (lVar3 != 0) {
func_0x00400b00(lVar3,&UNK_00401310);
printWLine(lVar3);
lStack_10 = lVar3;
}
func_0x00400a90(lStack_10);
}
else {
uVar2 = func_0x00400b30(400);
func_0x00400b00(uVar2,&UNK_004012e8);
printWLine(uVar2);
lVar3 = func_0x00400b60(uVar2,520000);
if (lVar3 != 0) {
func_0x00400b00(lVar3,&UNK_00401310);
printWLine(lVar3);
func_0x00400a90(lVar3);
}
}
return;
}
|
['gcc']
|
55,995
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_12_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99735/CWE401_Memory_Leak__malloc_realloc_wchar_t_12.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_12_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_12_good(void)
{
good1();
return;
}
|
['gcc']
|
55,996
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_15_bad()
{
switch(6)
{
case 6:
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99738/CWE401_Memory_Leak__malloc_realloc_wchar_t_15.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_15_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_15_bad(void)
{
undefined8 uVar1;
long lVar2;
uVar1 = func_0x00400b30(400);
func_0x00400b00(uVar1,&UNK_00401268);
printWLine(uVar1);
lVar2 = func_0x00400b60(uVar1,520000);
if (lVar2 != 0) {
func_0x00400b00(lVar2,&UNK_00401290);
printWLine(lVar2);
func_0x00400a90(lVar2);
}
return;
}
|
['gcc']
|
55,997
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_15_good()
{
good1();
good2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99738/CWE401_Memory_Leak__malloc_realloc_wchar_t_15.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_15_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_15_good(void)
{
good1();
good2();
return;
}
|
['gcc']
|
55,998
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_16_bad()
{
while(1)
{
{
wchar_t * data = (wchar_t *)malloc(100*sizeof(wchar_t));
/* Initialize and make use of data */
wcscpy(data, L"A String");
printWLine(data);
/* FLAW: If realloc() fails, the initial memory block will not be freed() */
data = (wchar_t *)realloc(data, (130000)*sizeof(wchar_t));
if (data != NULL)
{
/* Reinitialize and make use of data */
wcscpy(data, L"New String");
printWLine(data);
free(data);
}
}
break;
}
}
|
['/* Initialize and make use of data */', '/* FLAW: If realloc() fails, the initial memory block will not be freed() */', '/* Reinitialize and make use of data */']
|
['CWE401']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99739/CWE401_Memory_Leak__malloc_realloc_wchar_t_16.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_16_bad
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_16_bad(void)
{
undefined8 uVar1;
long lVar2;
uVar1 = func_0x00400b30(400);
func_0x00400b00(uVar1,&UNK_00401268);
printWLine(uVar1);
lVar2 = func_0x00400b60(uVar1,520000);
if (lVar2 != 0) {
func_0x00400b00(lVar2,&UNK_00401290);
printWLine(lVar2);
func_0x00400a90(lVar2);
}
return;
}
|
['gcc']
|
55,999
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_16_good()
{
good1();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/99739/CWE401_Memory_Leak__malloc_realloc_wchar_t_16.c
|
CWE401_Memory_Leak__malloc_realloc_wchar_t_16_good
|
void CWE401_Memory_Leak__malloc_realloc_wchar_t_16_good(void)
{
good1();
return;
}
|
['gcc']
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.