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 |
|---|---|---|---|---|---|---|---|---|
51,400 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65_bad()
{
int data;
/* define a function pointer */
void (*funcPtr) (int) = CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65b_badSink;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Initialize data */', '/* FLAW: Use a negative number */', '/* use the function pointer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88387/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65b_badSink(0xffffffff);
return;
}
| ['gcc'] |
51,401 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88387/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,402 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65b_badSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88387/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65b_badSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,403 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65b_goodG2BSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88387/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_65b_goodG2BSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,404 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66_bad()
{
int data;
int dataArray[5];
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
/* put data in array */
dataArray[2] = data;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66b_badSink(dataArray);
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* put data in array */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88388/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66_bad(void)
{
undefined auStack_28 [8];
undefined4 uStack_20;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_20 = 0xffffffff;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66b_badSink(auStack_28);
return;
}
| ['gcc'] |
51,405 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88388/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,406 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66b_badSink(int dataArray[])
{
/* copy data out of dataArray */
int data = dataArray[2];
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* copy data out of dataArray */', '/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88388/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66b_badSink(long param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
iStack_c = *(int *)(param_1 + 8);
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,407 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66b_goodG2BSink(int dataArray[])
{
int data = dataArray[2];
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88388/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_66b_goodG2BSink(long param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
iStack_c = *(int *)(param_1 + 8);
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,408 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67_bad()
{
int data;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67_structType myStruct;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
myStruct.structFirst = data;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67b_badSink(myStruct);
} | ['/* Initialize data */', '/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88389/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67b_badSink(0xffffffff);
return;
}
| ['gcc'] |
51,409 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88389/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,410 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67b_badSink(CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67_structType myStruct)
{
int data = myStruct.structFirst;
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88389/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67b_badSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
iStack_c = param_1;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,411 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67b_goodG2BSink(CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67_structType myStruct)
{
int data = myStruct.structFirst;
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88389/CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_strncpy_67b_goodG2BSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
iStack_c = param_1;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,412 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_03_bad()
{
int data;
/* Initialize data */
data = -1;
if(5==5)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88400/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_03.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_03_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_03_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
long lVar4;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
uVar3 = uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf;
if ((int)uVar3 < 100) {
lVar4 = func_0x00400b00((long)(int)uVar3);
func_0x00400aa0(lVar4,0x41,(long)(int)(uVar3 - 1));
*(undefined *)(lVar4 + (long)(int)uVar3 + -1) = 0;
printLine(lVar4);
func_0x00400a60(lVar4);
}
return;
}
| ['gcc'] |
51,413 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_03_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88400/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_03.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_03_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_03_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,414 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_04_bad()
{
int data;
/* Initialize data */
data = -1;
if(STATIC_CONST_TRUE)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88401/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_04.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_04_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_04_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
long lVar4;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
uVar3 = uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf;
if ((int)uVar3 < 100) {
lVar4 = func_0x00400b00((long)(int)uVar3);
func_0x00400aa0(lVar4,0x41,(long)(int)(uVar3 - 1));
*(undefined *)(lVar4 + (long)(int)uVar3 + -1) = 0;
printLine(lVar4);
func_0x00400a60(lVar4);
}
return;
}
| ['gcc'] |
51,415 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_04_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88401/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_04.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_04_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_04_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,416 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_05_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticTrue)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88402/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_05.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_05_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_05_bad(void)
{
int iVar1;
int iVar2;
long lVar3;
uint uStack_1c;
uStack_1c = 0xffffffff;
if (staticTrue != 0) {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_1c = func_0x00400b30();
uStack_1c = uStack_1c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
if ((int)uStack_1c < 100) {
lVar3 = func_0x00400b00((long)(int)uStack_1c);
func_0x00400aa0(lVar3,0x41,(long)(int)(uStack_1c - 1));
*(undefined *)(lVar3 + (long)(int)uStack_1c + -1) = 0;
printLine(lVar3);
func_0x00400a60(lVar3);
}
return;
}
| ['gcc'] |
51,417 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_05_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88402/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_05.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_05_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_05_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,418 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_06_bad()
{
int data;
/* Initialize data */
data = -1;
if(STATIC_CONST_FIVE==5)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88403/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_06.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_06_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_06_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
long lVar4;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
uVar3 = uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf;
if ((int)uVar3 < 100) {
lVar4 = func_0x00400b00((long)(int)uVar3);
func_0x00400aa0(lVar4,0x41,(long)(int)(uVar3 - 1));
*(undefined *)(lVar4 + (long)(int)uVar3 + -1) = 0;
printLine(lVar4);
func_0x00400a60(lVar4);
}
return;
}
| ['gcc'] |
51,419 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_06_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88403/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_06.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_06_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_06_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,420 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_07_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticFive==5)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88404/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_07.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_07_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_07_bad(void)
{
int iVar1;
int iVar2;
long lVar3;
uint uStack_1c;
uStack_1c = 0xffffffff;
if (staticFive == 5) {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_1c = func_0x00400b30();
uStack_1c = uStack_1c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
if ((int)uStack_1c < 100) {
lVar3 = func_0x00400b00((long)(int)uStack_1c);
func_0x00400aa0(lVar3,0x41,(long)(int)(uStack_1c - 1));
*(undefined *)(lVar3 + (long)(int)uStack_1c + -1) = 0;
printLine(lVar3);
func_0x00400a60(lVar3);
}
return;
}
| ['gcc'] |
51,421 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_07_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88404/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_07.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_07_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_07_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,422 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_08_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticReturnsTrue())
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88405/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_08.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_08_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_08_bad(void)
{
int iVar1;
int iVar2;
long lVar3;
uint uStack_1c;
uStack_1c = 0xffffffff;
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_1c = func_0x00400b30();
uStack_1c = uStack_1c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
if ((int)uStack_1c < 100) {
lVar3 = func_0x00400b00((long)(int)uStack_1c);
func_0x00400aa0(lVar3,0x41,(long)(int)(uStack_1c - 1));
*(undefined *)(lVar3 + (long)(int)uStack_1c + -1) = 0;
printLine(lVar3);
func_0x00400a60(lVar3);
}
return;
}
| ['gcc'] |
51,423 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_08_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88405/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_08.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_08_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_08_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,424 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_09_bad()
{
int data;
/* Initialize data */
data = -1;
if(GLOBAL_CONST_TRUE)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88406/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_09.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_09_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_09_bad(void)
{
int iVar1;
int iVar2;
long lVar3;
uint uStack_1c;
uStack_1c = 0xffffffff;
if (GLOBAL_CONST_TRUE != 0) {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_1c = func_0x00400b30();
uStack_1c = uStack_1c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
if ((int)uStack_1c < 100) {
lVar3 = func_0x00400b00((long)(int)uStack_1c);
func_0x00400aa0(lVar3,0x41,(long)(int)(uStack_1c - 1));
*(undefined *)(lVar3 + (long)(int)uStack_1c + -1) = 0;
printLine(lVar3);
func_0x00400a60(lVar3);
}
return;
}
| ['gcc'] |
51,425 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_09_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88406/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_09.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_09_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_09_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,426 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_10_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalTrue)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88407/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_10.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_10_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_10_bad(void)
{
int iVar1;
int iVar2;
long lVar3;
uint uStack_1c;
uStack_1c = 0xffffffff;
if (globalTrue != 0) {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_1c = func_0x00400b30();
uStack_1c = uStack_1c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
if ((int)uStack_1c < 100) {
lVar3 = func_0x00400b00((long)(int)uStack_1c);
func_0x00400aa0(lVar3,0x41,(long)(int)(uStack_1c - 1));
*(undefined *)(lVar3 + (long)(int)uStack_1c + -1) = 0;
printLine(lVar3);
func_0x00400a60(lVar3);
}
return;
}
| ['gcc'] |
51,427 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_10_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88407/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_10.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_10_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_10_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,428 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_11_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalReturnsTrue())
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88408/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_11.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_11_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_11_bad(void)
{
int iVar1;
int iVar2;
long lVar3;
uint uStack_1c;
uStack_1c = 0xffffffff;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_1c = func_0x00400b30();
uStack_1c = uStack_1c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
if ((int)uStack_1c < 100) {
lVar3 = func_0x00400b00((long)(int)uStack_1c);
func_0x00400aa0(lVar3,0x41,(long)(int)(uStack_1c - 1));
*(undefined *)(lVar3 + (long)(int)uStack_1c + -1) = 0;
printLine(lVar3);
func_0x00400a60(lVar3);
}
return;
}
| ['gcc'] |
51,429 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_11_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88408/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_11.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_11_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_11_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,430 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_12_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalReturnsTrueOrFalse())
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
else
{
/* FIX: Use a positive integer less than &InitialDataSize&*/
data = 100-1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* FIX: Use a positive integer less than &InitialDataSize&*/', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88409/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_12.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_12_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_12_bad(void)
{
int iVar1;
int iVar2;
long lVar3;
uint uStack_1c;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
uStack_1c = 99;
}
else {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_1c = func_0x00400b30();
uStack_1c = uStack_1c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
if ((int)uStack_1c < 100) {
lVar3 = func_0x00400b00((long)(int)uStack_1c);
func_0x00400aa0(lVar3,0x41,(long)(int)(uStack_1c - 1));
*(undefined *)(lVar3 + (long)(int)uStack_1c + -1) = 0;
printLine(lVar3);
func_0x00400a60(lVar3);
}
return;
}
| ['gcc'] |
51,431 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_12_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88409/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_12.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_12_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_12_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,432 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_13_bad()
{
int data;
/* Initialize data */
data = -1;
if(GLOBAL_CONST_FIVE==5)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88410/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_13.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_13_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_13_bad(void)
{
int iVar1;
int iVar2;
long lVar3;
uint uStack_1c;
uStack_1c = 0xffffffff;
if (GLOBAL_CONST_FIVE == 5) {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_1c = func_0x00400b30();
uStack_1c = uStack_1c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
if ((int)uStack_1c < 100) {
lVar3 = func_0x00400b00((long)(int)uStack_1c);
func_0x00400aa0(lVar3,0x41,(long)(int)(uStack_1c - 1));
*(undefined *)(lVar3 + (long)(int)uStack_1c + -1) = 0;
printLine(lVar3);
func_0x00400a60(lVar3);
}
return;
}
| ['gcc'] |
51,433 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_13_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88410/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_13.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_13_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_13_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,434 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_14_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalFive==5)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88411/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_14.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_14_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_14_bad(void)
{
int iVar1;
int iVar2;
long lVar3;
uint uStack_1c;
uStack_1c = 0xffffffff;
if (globalFive == 5) {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_1c = func_0x00400b30();
uStack_1c = uStack_1c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
if ((int)uStack_1c < 100) {
lVar3 = func_0x00400b00((long)(int)uStack_1c);
func_0x00400aa0(lVar3,0x41,(long)(int)(uStack_1c - 1));
*(undefined *)(lVar3 + (long)(int)uStack_1c + -1) = 0;
printLine(lVar3);
func_0x00400a60(lVar3);
}
return;
}
| ['gcc'] |
51,435 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_14_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88411/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_14.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_14_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_14_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,436 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_15_bad()
{
int data;
/* Initialize data */
data = -1;
switch(6)
{
case 6:
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88412/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_15.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_15_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_15_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
long lVar4;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
uVar3 = uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf;
if ((int)uVar3 < 100) {
lVar4 = func_0x00400b00((long)(int)uVar3);
func_0x00400aa0(lVar4,0x41,(long)(int)(uVar3 - 1));
*(undefined *)(lVar4 + (long)(int)uVar3 + -1) = 0;
printLine(lVar4);
func_0x00400a60(lVar4);
}
return;
}
| ['gcc'] |
51,437 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_15_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88412/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_15.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_15_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_15_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,438 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_16_bad()
{
int data;
/* Initialize data */
data = -1;
while(1)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
break;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88413/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_16.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_16_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_16_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
long lVar4;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
uVar3 = uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf;
if ((int)uVar3 < 100) {
lVar4 = func_0x00400b00((long)(int)uVar3);
func_0x00400aa0(lVar4,0x41,(long)(int)(uVar3 - 1));
*(undefined *)(lVar4 + (long)(int)uVar3 + -1) = 0;
printLine(lVar4);
func_0x00400a60(lVar4);
}
return;
}
| ['gcc'] |
51,439 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_16_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88413/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_16.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_16_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_16_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,440 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_17_bad()
{
int i;
int data;
/* Initialize data */
data = -1;
for(i = 0; i < 1; i++)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88414/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_17.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_17_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_17_bad(void)
{
int iVar1;
int iVar2;
long lVar3;
uint uStack_20;
int iStack_1c;
uStack_20 = 0xffffffff;
for (iStack_1c = 0; iStack_1c < 1; iStack_1c = iStack_1c + 1) {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_20 = func_0x00400b30();
uStack_20 = uStack_20 ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
if ((int)uStack_20 < 100) {
lVar3 = func_0x00400b00((long)(int)uStack_20);
func_0x00400aa0(lVar3,0x41,(long)(int)(uStack_20 - 1));
*(undefined *)(lVar3 + (long)(int)uStack_20 + -1) = 0;
printLine(lVar3);
func_0x00400a60(lVar3);
}
return;
}
| ['gcc'] |
51,441 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_17_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88414/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_17.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_17_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_17_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,442 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_18_bad()
{
int data;
/* Initialize data */
data = -1;
goto source;
source:
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88415/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_18.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_18_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_18_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
long lVar4;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
uVar3 = uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf;
if ((int)uVar3 < 100) {
lVar4 = func_0x00400b00((long)(int)uVar3);
func_0x00400aa0(lVar4,0x41,(long)(int)(uVar3 - 1));
*(undefined *)(lVar4 + (long)(int)uVar3 + -1) = 0;
printLine(lVar4);
func_0x00400a60(lVar4);
}
return;
}
| ['gcc'] |
51,443 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_18_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88415/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_18.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_18_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_18_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,444 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_21_bad()
{
int data;
/* Initialize data */
data = -1;
badStatic = 1; /* true */
data = badSource(data);
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* true */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88416/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_21.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_21_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_21_bad(void)
{
int iVar1;
long lVar2;
badStatic = 1;
iVar1 = badSource(0xffffffff);
if (iVar1 < 100) {
lVar2 = func_0x00400b00((long)iVar1);
func_0x00400aa0(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400a60(lVar2);
}
return;
}
| ['gcc'] |
51,445 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_21_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88416/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_21.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_21_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_21_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,446 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_bad()
{
int data;
/* Initialize data */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_badGlobal = 1; /* true */
data = CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_badSource(data);
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* true */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88417/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_bad(void)
{
int iVar1;
long lVar2;
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_badGlobal = 1;
iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_badSource(0xffffffff);
if (iVar1 < 100) {
lVar2 = func_0x00400b00((long)iVar1);
func_0x00400aa0(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400a60(lVar2);
}
return;
}
| ['gcc'] |
51,447 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88417/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,448 | int CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_badSource(int data)
{
if(CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_badGlobal)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
}
return data;
} | ['/* POTENTIAL FLAW: Set data to a random value */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88417/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_badSource |
uint CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_badSource(uint param_1)
{
int iVar1;
int iVar2;
uint uStack_1c;
uStack_1c = param_1;
if (CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_badGlobal != 0) {
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_1c = func_0x00400b30();
uStack_1c = uStack_1c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
return uStack_1c;
}
| ['gcc'] |
51,449 | int CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_goodG2B1Source(int data)
{
if(CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_goodG2B1Global)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
/* FIX: Use a positive integer less than &InitialDataSize&*/
data = 100-1;
}
return data;
} | ['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Use a positive integer less than &InitialDataSize&*/'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88417/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_goodG2B1Source |
undefined4
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_goodG2B1Source(undefined4 param_1)
{
undefined4 uStack_c;
if (CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_goodG2B1Global == 0) {
uStack_c = 99;
}
else {
printLine(&UNK_00401314);
uStack_c = param_1;
}
return uStack_c;
}
| ['gcc'] |
51,450 | int CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_goodG2B2Source(int data)
{
if(CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_goodG2B2Global)
{
/* FIX: Use a positive integer less than &InitialDataSize&*/
data = 100-1;
}
return data;
} | ['/* FIX: Use a positive integer less than &InitialDataSize&*/'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88417/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_goodG2B2Source |
undefined4
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_goodG2B2Source(undefined4 param_1)
{
undefined4 uStack_c;
uStack_c = param_1;
if (CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_22_goodG2B2Global != 0) {
uStack_c = 99;
}
return uStack_c;
}
| ['gcc'] |
51,451 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_31_bad()
{
int data;
/* Initialize data */
data = -1;
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
{
int dataCopy = data;
int data = dataCopy;
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88418/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_31.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_31_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_31_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
long lVar4;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
uVar3 = uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf;
if ((int)uVar3 < 100) {
lVar4 = func_0x00400b00((long)(int)uVar3);
func_0x00400aa0(lVar4,0x41,(long)(int)(uVar3 - 1));
*(undefined *)(lVar4 + (long)(int)uVar3 + -1) = 0;
printLine(lVar4);
func_0x00400a60(lVar4);
}
return;
}
| ['gcc'] |
51,452 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_31_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88418/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_31.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_31_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_31_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,453 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_32_bad()
{
int data;
int *dataPtr1 = &data;
int *dataPtr2 = &data;
/* Initialize data */
data = -1;
{
int data = *dataPtr1;
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
*dataPtr1 = data;
}
{
int data = *dataPtr2;
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88419/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_32.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_32_bad |
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_32_bad(void)
{
int iVar1;
int iVar2;
uint uStack_3c;
long lStack_38;
uint uStack_30;
uint uStack_2c;
uint *puStack_28;
uint *puStack_20;
puStack_20 = &uStack_3c;
puStack_28 = &uStack_3c;
uStack_3c = 0xffffffff;
uStack_2c = 0xffffffff;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uStack_2c = func_0x00400b30();
uStack_2c = uStack_2c ^ iVar1 << 0x1e ^ iVar2 << 0xf;
*puStack_20 = uStack_2c;
uStack_30 = *puStack_28;
if ((int)uStack_30 < 100) {
lStack_38 = func_0x00400b00((long)(int)uStack_30);
func_0x00400aa0(lStack_38,0x41,(long)(int)(uStack_30 - 1));
*(undefined *)(lStack_38 + (long)(int)uStack_30 + -1) = 0;
printLine(lStack_38);
func_0x00400a60(lStack_38);
}
return;
}
| ['gcc'] |
51,454 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_32_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88419/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_32.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_32_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_32_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,455 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_badSink(int data)
{
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88422/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400b00((long)param_1);
func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
}
return;
}
| ['gcc'] |
51,456 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_bad()
{
int data;
/* Initialize data */
data = -1;
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88422/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_badSink
(uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf);
return;
}
| ['gcc'] |
51,457 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_goodG2BSink(int data)
{
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88422/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_goodG2BSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400b00((long)param_1);
func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
}
return;
}
| ['gcc'] |
51,458 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88422/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_41_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,459 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_45_bad()
{
int data;
/* Initialize data */
data = -1;
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_45_badData = data;
badSink();
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88426/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_45.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_45_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_45_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_45_badData =
uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf;
badSink();
return;
}
| ['gcc'] |
51,460 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_45_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88426/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_45.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_45_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_45_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,461 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51_bad()
{
int data;
/* Initialize data */
data = -1;
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88427/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51b_badSink
(uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf);
return;
}
| ['gcc'] |
51,462 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88427/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,463 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51b_badSink(int data)
{
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88427/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51b_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400b00((long)param_1);
func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
}
return;
}
| ['gcc'] |
51,464 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51b_goodG2BSink(int data)
{
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88427/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_51b_goodG2BSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400b00((long)param_1);
func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
}
return;
}
| ['gcc'] |
51,465 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52_bad()
{
int data;
/* Initialize data */
data = -1;
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88428/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52b_badSink
(uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf);
return;
}
| ['gcc'] |
51,466 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88428/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,467 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88428/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52b_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c_badSink(param_1);
return;
}
| ['gcc'] |
51,468 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88428/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52b_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,469 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c_badSink(int data)
{
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88428/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400b00((long)param_1);
func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
}
return;
}
| ['gcc'] |
51,470 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c_goodG2BSink(int data)
{
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88428/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_52c_goodG2BSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400b00((long)param_1);
func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
}
return;
}
| ['gcc'] |
51,471 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53_bad()
{
int data;
/* Initialize data */
data = -1;
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88429/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53b_badSink
(uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf);
return;
}
| ['gcc'] |
51,472 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88429/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,473 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88429/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53b_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c_badSink(param_1);
return;
}
| ['gcc'] |
51,474 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88429/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53b_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,475 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88429/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d_badSink(param_1);
return;
}
| ['gcc'] |
51,476 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88429/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53c_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,477 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d_badSink(int data)
{
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88429/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400b00((long)param_1);
func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
}
return;
}
| ['gcc'] |
51,478 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d_goodG2BSink(int data)
{
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88429/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_53d_goodG2BSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400b00((long)param_1);
func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
}
return;
}
| ['gcc'] |
51,479 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54_bad()
{
int data;
/* Initialize data */
data = -1;
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88430/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54_bad(void)
{
int iVar1;
int iVar2;
uint uVar3;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54b_badSink
(uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf);
return;
}
| ['gcc'] |
51,480 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88430/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,481 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88430/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54b_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c_badSink(param_1);
return;
}
| ['gcc'] |
51,482 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88430/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54b_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,483 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88430/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d_badSink(param_1);
return;
}
| ['gcc'] |
51,484 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88430/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54c_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,485 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88430/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e_badSink(param_1);
return;
}
| ['gcc'] |
51,486 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88430/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54d_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,487 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e_badSink(int data)
{
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88430/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400b00((long)param_1);
func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
}
return;
}
| ['gcc'] |
51,488 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e_goodG2BSink(int data)
{
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88430/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_54e_goodG2BSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400b00((long)param_1);
func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
}
return;
}
| ['gcc'] |
51,489 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61_bad()
{
int data;
/* Initialize data */
data = -1;
data = CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61b_badSource(data);
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88431/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61_bad(void)
{
int iVar1;
long lVar2;
iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61b_badSource(0xffffffff);
if (iVar1 < 100) {
lVar2 = func_0x00400b00((long)iVar1);
func_0x00400aa0(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400a60(lVar2);
}
return;
}
| ['gcc'] |
51,490 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88431/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,491 | int CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61b_badSource(int data)
{
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
return data;
} | ['/* POTENTIAL FLAW: Set data to a random value */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88431/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61b_badSource |
uint CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61b_badSource(void)
{
int iVar1;
int iVar2;
uint uVar3;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
uVar3 = func_0x00400b30();
return uVar3 ^ iVar1 << 0x1e ^ iVar2 << 0xf;
}
| ['gcc'] |
51,492 | int CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61b_goodG2BSource(int data)
{
/* FIX: Use a positive integer less than &InitialDataSize&*/
data = 100-1;
return data;
} | ['/* FIX: Use a positive integer less than &InitialDataSize&*/'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88431/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61b_goodG2BSource |
undefined4 CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_61b_goodG2BSource(void)
{
return 99;
}
| ['gcc'] |
51,493 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63_bad()
{
int data;
/* Initialize data */
data = -1;
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88433/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63_bad(void)
{
int iVar1;
int iVar2;
uint auStack_1c [3];
auStack_1c[0] = 0xffffffff;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
auStack_1c[0] = func_0x00400b30();
auStack_1c[0] = auStack_1c[0] ^ iVar1 << 0x1e ^ iVar2 << 0xf;
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63b_badSink(auStack_1c);
return;
}
| ['gcc'] |
51,494 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88433/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,495 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63b_badSink(int * dataPtr)
{
int data = *dataPtr;
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88433/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63b_badSink(int *param_1)
{
int iVar1;
long lVar2;
iVar1 = *param_1;
if (iVar1 < 100) {
lVar2 = func_0x00400b00((long)iVar1);
func_0x00400aa0(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400a60(lVar2);
}
return;
}
| ['gcc'] |
51,496 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63b_goodG2BSink(int * dataPtr)
{
int data = *dataPtr;
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88433/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_63b_goodG2BSink(int *param_1)
{
int iVar1;
long lVar2;
iVar1 = *param_1;
if (iVar1 < 100) {
lVar2 = func_0x00400b00((long)iVar1);
func_0x00400aa0(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400a60(lVar2);
}
return;
}
| ['gcc'] |
51,497 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64_bad()
{
int data;
/* Initialize data */
data = -1;
/* POTENTIAL FLAW: Set data to a random value */
data = RAND32();
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Set data to a random value */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88434/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64_bad(void)
{
int iVar1;
int iVar2;
uint auStack_1c [3];
auStack_1c[0] = 0xffffffff;
iVar1 = func_0x00400b30();
iVar2 = func_0x00400b30();
auStack_1c[0] = func_0x00400b30();
auStack_1c[0] = auStack_1c[0] ^ iVar1 << 0x1e ^ iVar2 << 0xf;
CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64b_badSink(auStack_1c);
return;
}
| ['gcc'] |
51,498 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88434/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64a.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,499 | void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64b_badSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
int * dataPtr = (int *)dataVoidPtr;
/* dereference dataPtr into data */
int data = (*dataPtr);
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88434/CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64b.c | CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__rand_malloc_64b_badSink(int *param_1)
{
int iVar1;
long lVar2;
iVar1 = *param_1;
if (iVar1 < 100) {
lVar2 = func_0x00400b00((long)iVar1);
func_0x00400aa0(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400a60(lVar2);
}
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.