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,000 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88224/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_21.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_21_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,001 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_21_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88224/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_21.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_21_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_21_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,002 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_bad()
{
int data;
/* Initialize data */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_badGlobal = 1; /* true */
data = CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88225/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_bad(void)
{
int iVar1;
long lVar2;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_badGlobal = 1;
iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,003 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88225/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,004 | int CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_badSource(int data)
{
if(CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_badGlobal)
{
/* FLAW: Use a negative number */
data = -1;
}
return data;
} | ['/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88225/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_badSource |
undefined4
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_badSource(undefined4 param_1)
{
undefined4 uStack_c;
uStack_c = param_1;
if (CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_badGlobal != 0) {
uStack_c = 0xffffffff;
}
return uStack_c;
}
| ['gcc'] |
51,005 | int CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_goodG2B1Source(int data)
{
if(CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88225/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_goodG2B1Source |
undefined4
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_goodG2B1Source(undefined4 param_1)
{
undefined4 uStack_c;
if (CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_goodG2B1Global == 0) {
uStack_c = 99;
}
else {
printLine(&UNK_00401314);
uStack_c = param_1;
}
return uStack_c;
}
| ['gcc'] |
51,006 | int CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_goodG2B2Source(int data)
{
if(CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88225/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_goodG2B2Source |
undefined4
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_goodG2B2Source(undefined4 param_1)
{
undefined4 uStack_c;
uStack_c = param_1;
if (CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_22_goodG2B2Global != 0) {
uStack_c = 99;
}
return uStack_c;
}
| ['gcc'] |
51,007 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_31_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
{
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 */', '/* FLAW: Use a negative number */', '/* 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/88226/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_31.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_31_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_31_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
51,008 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_31_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88226/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_31.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_31_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_31_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,009 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_32_bad()
{
int data;
int *dataPtr1 = &data;
int *dataPtr2 = &data;
/* Initialize data */
data = -1;
{
int data = *dataPtr1;
/* FLAW: Use a negative number */
data = -1;
*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 */', '/* FLAW: Use a negative number */', '/* 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/88227/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_32.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_32_bad |
/* WARNING: Heritage AFTER dead removal. Example location: s0xffffffffffffffd4 : 0x00400c5e */
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_32_bad(void)
{
undefined4 uStack_2c;
long lStack_28;
int iStack_20;
undefined4 uStack_1c;
undefined4 *puStack_18;
undefined4 *puStack_10;
puStack_10 = &uStack_2c;
puStack_18 = &uStack_2c;
uStack_1c = 0xffffffff;
uStack_2c = 0xffffffff;
iStack_20 = -1;
lStack_28 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lStack_28,0x41,(long)(iStack_20 + -1));
*(undefined *)(lStack_28 + (long)iStack_20 + -1) = 0;
printLine(lStack_28);
func_0x00400a60(lStack_28);
return;
}
| ['gcc'] |
51,010 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_32_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88227/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_32.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_32_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_32_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,011 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_34_bad()
{
int data;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_34_unionType myUnion;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
myUnion.unionFirst = data;
{
int data = myUnion.unionSecond;
/* 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 */', '/* FLAW: Use a negative number */', '/* 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/88229/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_34.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_34_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_34_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
51,012 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_34_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88229/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_34.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_34_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_34_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,013 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88230/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,014 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41_badSink(data);
} | ['/* Initialize data */', '/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88230/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41_badSink(0xffffffff);
return;
}
| ['gcc'] |
51,015 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88230/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,016 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88230/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_41_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,017 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_42_bad()
{
int data;
/* Initialize data */
data = -1;
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 */', '/* 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/88231/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_42.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_42_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_42_bad(void)
{
int iVar1;
long lVar2;
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,018 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_42_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88231/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_42.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_42_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_42_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,019 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_45_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_45_badData = data;
badSink();
} | ['/* Initialize data */', '/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88234/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_45.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_45_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_45_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_45_badData = 0xffffffff;
badSink();
return;
}
| ['gcc'] |
51,020 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_45_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88234/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_45.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_45_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_45_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,021 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51b_badSink(data);
} | ['/* Initialize data */', '/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88235/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51b_badSink(0xffffffff);
return;
}
| ['gcc'] |
51,022 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88235/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,023 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88235/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,024 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88235/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_51b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,025 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52b_badSink(data);
} | ['/* Initialize data */', '/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88236/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52b_badSink(0xffffffff);
return;
}
| ['gcc'] |
51,026 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88236/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,027 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88236/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52b_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52c_badSink(param_1);
return;
}
| ['gcc'] |
51,028 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88236/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52b_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,029 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88236/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52c.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,030 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88236/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52c.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_52c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,031 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53b_badSink(data);
} | ['/* Initialize data */', '/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88237/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53b_badSink(0xffffffff);
return;
}
| ['gcc'] |
51,032 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88237/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,033 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88237/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53b_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c_badSink(param_1);
return;
}
| ['gcc'] |
51,034 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88237/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53b_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,035 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53d_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88237/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53d_badSink(param_1);
return;
}
| ['gcc'] |
51,036 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88237/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53c_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,037 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88237/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53d.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53d_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,038 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88237/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53d.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_53d_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,039 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54b_badSink(data);
} | ['/* Initialize data */', '/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88238/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54b_badSink(0xffffffff);
return;
}
| ['gcc'] |
51,040 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88238/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,041 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88238/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54b_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c_badSink(param_1);
return;
}
| ['gcc'] |
51,042 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88238/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54b_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,043 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88238/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d_badSink(param_1);
return;
}
| ['gcc'] |
51,044 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88238/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54c_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,045 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54e_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88238/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54e_badSink(param_1);
return;
}
| ['gcc'] |
51,046 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88238/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54d_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
51,047 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88238/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54e.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54e_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,048 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88238/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54e.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_54e_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,049 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61_bad()
{
int data;
/* Initialize data */
data = -1;
data = CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88239/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61_bad(void)
{
int iVar1;
long lVar2;
iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,050 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88239/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,051 | int CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61b_badSource(int data)
{
/* FLAW: Use a negative number */
data = -1;
return data;
} | ['/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88239/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61b_badSource |
undefined4 CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61b_badSource(void)
{
return 0xffffffff;
}
| ['gcc'] |
51,052 | int CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88239/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61b_goodG2BSource |
undefined4 CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_61b_goodG2BSource(void)
{
return 99;
}
| ['gcc'] |
51,053 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63b_badSink(&data);
} | ['/* Initialize data */', '/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88241/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63_bad(void)
{
undefined4 uStack_c;
uStack_c = 0xffffffff;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63b_badSink(&uStack_c);
return;
}
| ['gcc'] |
51,054 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88241/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,055 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88241/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,056 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88241/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_63b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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,057 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64b_badSink(&data);
} | ['/* Initialize data */', '/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88242/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64_bad(void)
{
undefined4 uStack_c;
uStack_c = 0xffffffff;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64b_badSink(&uStack_c);
return;
}
| ['gcc'] |
51,058 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88242/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,059 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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/88242/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_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'] |
51,060 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64b_goodG2BSink(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 */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88242/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_64b_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,061 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65_bad()
{
int data;
/* define a function pointer */
void (*funcPtr) (int) = CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_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/88243/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65b_badSink(0xffffffff);
return;
}
| ['gcc'] |
51,062 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88243/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,063 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65b_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/88243/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65b_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,064 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65b_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/88243/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_65b_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,065 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_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_malloc_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/88244/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_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_malloc_66b_badSink(auStack_28);
return;
}
| ['gcc'] |
51,066 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88244/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,067 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66b_badSink(int dataArray[])
{
/* copy data out of dataArray */
int data = dataArray[2];
/* 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);
}
} | ['/* copy data out of dataArray */', '/* 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/88244/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66b_badSink(long param_1)
{
int iVar1;
long lVar2;
iVar1 = *(int *)(param_1 + 8);
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,068 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66b_goodG2BSink(int dataArray[])
{
int data = dataArray[2];
/* 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/88244/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_66b_goodG2BSink(long param_1)
{
int iVar1;
long lVar2;
iVar1 = *(int *)(param_1 + 8);
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,069 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67_bad()
{
int data;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67_structType myStruct;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
myStruct.structFirst = data;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_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/88245/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67b_badSink(0xffffffff);
return;
}
| ['gcc'] |
51,070 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88245/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,071 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67b_badSink(CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67_structType myStruct)
{
int data = myStruct.structFirst;
/* 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/88245/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67b_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,072 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67b_goodG2BSink(CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67_structType myStruct)
{
int data = myStruct.structFirst;
/* 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/88245/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_67b_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,073 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_badData = data;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68b_badSink();
} | ['/* Initialize data */', '/* FLAW: Use a negative number */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88246/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_bad(void)
{
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_badData = 0xffffffff;
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68b_badSink();
return;
}
| ['gcc'] |
51,074 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88246/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68a.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,075 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68b_badSink()
{
int data = CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_badData;
/* 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/88246/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68b_badSink(void)
{
int iVar1;
long lVar2;
iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_badData;
if (CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_badData < 100) {
lVar2 = func_0x00400b00((long)
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_badData);
func_0x00400aa0(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400a60(lVar2);
}
return;
}
| ['gcc'] |
51,076 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68b_goodG2BSink()
{
int data = CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_goodG2BData;
/* 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/88246/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68b.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68b_goodG2BSink(void)
{
int iVar1;
long lVar2;
iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_goodG2BData;
if (CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_goodG2BData < 100) {
lVar2 = func_0x00400b00((long)
CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_68_goodG2BData
);
func_0x00400aa0(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400a60(lVar2);
}
return;
}
| ['gcc'] |
51,077 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_01_bad()
{
int data;
/* Initialize data */
data = -1;
/* FLAW: Use a negative number */
data = -1;
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88254/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_01.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_01_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_01_bad(void)
{
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 = -1;
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,078 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_01_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88254/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_01.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_01_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_01_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
51,079 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_02_bad()
{
int data;
/* Initialize data */
data = -1;
if(1)
{
/* FLAW: Use a negative number */
data = -1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88255/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_02.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_02_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_02_bad(void)
{
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 = -1;
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,080 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_02_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88255/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_02.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_02_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_02_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,081 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_03_bad()
{
int data;
/* Initialize data */
data = -1;
if(5==5)
{
/* FLAW: Use a negative number */
data = -1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88256/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_03.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_03_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_03_bad(void)
{
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 = -1;
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,082 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_03_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88256/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_03.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_03_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_03_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,083 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_04_bad()
{
int data;
/* Initialize data */
data = -1;
if(STATIC_CONST_TRUE)
{
/* FLAW: Use a negative number */
data = -1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88257/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_04.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_04_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_04_bad(void)
{
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 = -1;
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,084 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_04_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88257/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_04.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_04_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_04_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,085 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_05_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticTrue)
{
/* FLAW: Use a negative number */
data = -1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88258/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_05.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_05_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_05_bad(void)
{
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 = -1;
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,086 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_05_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88258/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_05.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_05_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_05_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,087 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_06_bad()
{
int data;
/* Initialize data */
data = -1;
if(STATIC_CONST_FIVE==5)
{
/* FLAW: Use a negative number */
data = -1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88259/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_06.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_06_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_06_bad(void)
{
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 = -1;
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,088 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_06_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88259/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_06.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_06_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_06_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,089 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_07_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticFive==5)
{
/* FLAW: Use a negative number */
data = -1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88260/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_07.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_07_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_07_bad(void)
{
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 = -1;
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,090 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_07_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88260/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_07.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_07_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_07_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,091 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_08_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticReturnsTrue())
{
/* FLAW: Use a negative number */
data = -1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88261/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_08.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_08_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_08_bad(void)
{
int iVar1;
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 = -1;
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
iStack_c = -1;
}
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,092 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_08_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88261/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_08.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_08_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_08_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,093 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_09_bad()
{
int data;
/* Initialize data */
data = -1;
if(GLOBAL_CONST_TRUE)
{
/* FLAW: Use a negative number */
data = -1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88262/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_09.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_09_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_09_bad(void)
{
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 = -1;
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,094 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_09_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88262/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_09.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_09_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_09_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,095 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_10_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalTrue)
{
/* FLAW: Use a negative number */
data = -1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88263/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_10.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_10_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_10_bad(void)
{
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 = -1;
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,096 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_10_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88263/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_10.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_10_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_10_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,097 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_11_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalReturnsTrue())
{
/* FLAW: Use a negative number */
data = -1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88264/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_11.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_11_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_11_bad(void)
{
int iVar1;
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 = -1;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
iStack_c = -1;
}
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
51,098 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_11_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88264/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_11.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_11_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_11_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
51,099 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_12_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalReturnsTrueOrFalse())
{
/* FLAW: Use a negative number */
data = -1;
}
else
{
/* FIX: Use a positive integer less than &InitialDataSize&*/
data = 100-1;
}
{
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 */
memcpy(dest, source, data);
dest[data] = '\0'; /* NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* FIX: Use a positive integer less than &InitialDataSize&*/', '/* 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 */', '/* NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88265/CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_12.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_12_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_memcpy_12_bad(void)
{
int iVar1;
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 = 0xffffffff;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
iStack_c = 99;
}
else {
iStack_c = -1;
}
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_0x00400ab0(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.