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 |
|---|---|---|---|---|---|---|---|---|
49,700 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_13_bad()
{
int data;
/* Initialize data */
data = -1;
if(GLOBAL_CONST_FIVE==5)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87642/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_13.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_13_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_13_bad(void)
{
long lVar1;
undefined8 uStack_26;
undefined4 uStack_1e;
undefined2 uStack_1a;
long lStack_18;
int iStack_c;
iStack_c = -1;
if (GLOBAL_CONST_FIVE == 5) {
uStack_26 = 0;
uStack_1e = 0;
uStack_1a = 0;
lVar1 = func_0x00400bb0(&uStack_26,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401364);
}
else {
iStack_c = func_0x00400c20(&uStack_26);
}
}
if (iStack_c < 100) {
lStack_18 = func_0x00400bf0((long)iStack_c);
func_0x00400b80(lStack_18,0x41,(long)(iStack_c + -1));
*(undefined *)(lStack_18 + (long)iStack_c + -1) = 0;
printLine(lStack_18);
func_0x00400b40(lStack_18);
}
return;
}
| ['gcc'] |
49,701 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_13_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87642/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_13.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_13_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_13_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
49,702 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_14_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalFive==5)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87643/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_14.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_14_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_14_bad(void)
{
long lVar1;
undefined8 uStack_26;
undefined4 uStack_1e;
undefined2 uStack_1a;
long lStack_18;
int iStack_c;
iStack_c = -1;
if (globalFive == 5) {
uStack_26 = 0;
uStack_1e = 0;
uStack_1a = 0;
lVar1 = func_0x00400bb0(&uStack_26,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401364);
}
else {
iStack_c = func_0x00400c20(&uStack_26);
}
}
if (iStack_c < 100) {
lStack_18 = func_0x00400bf0((long)iStack_c);
func_0x00400b80(lStack_18,0x41,(long)(iStack_c + -1));
*(undefined *)(lStack_18 + (long)iStack_c + -1) = 0;
printLine(lStack_18);
func_0x00400b40(lStack_18);
}
return;
}
| ['gcc'] |
49,703 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_14_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87643/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_14.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_14_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_14_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
49,704 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_15_bad()
{
int data;
/* Initialize data */
data = -1;
switch(6)
{
case 6:
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87644/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_15.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_15_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_15_bad(void)
{
long lVar1;
undefined8 uStack_26;
undefined4 uStack_1e;
undefined2 uStack_1a;
long lStack_18;
int iStack_c;
iStack_c = -1;
uStack_26 = 0;
uStack_1e = 0;
uStack_1a = 0;
lVar1 = func_0x00400bb0(&uStack_26,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401364);
}
else {
iStack_c = func_0x00400c20(&uStack_26);
}
if (iStack_c < 100) {
lStack_18 = func_0x00400bf0((long)iStack_c);
func_0x00400b80(lStack_18,0x41,(long)(iStack_c + -1));
*(undefined *)(lStack_18 + (long)iStack_c + -1) = 0;
printLine(lStack_18);
func_0x00400b40(lStack_18);
}
return;
}
| ['gcc'] |
49,705 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_15_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87644/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_15.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_15_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_15_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
49,706 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_16_bad()
{
int data;
/* Initialize data */
data = -1;
while(1)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
break;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87645/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_16.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_16_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_16_bad(void)
{
long lVar1;
undefined8 uStack_26;
undefined4 uStack_1e;
undefined2 uStack_1a;
long lStack_18;
int iStack_c;
iStack_c = -1;
uStack_26 = 0;
uStack_1e = 0;
uStack_1a = 0;
lVar1 = func_0x00400bb0(&uStack_26,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401364);
}
else {
iStack_c = func_0x00400c20(&uStack_26);
}
if (iStack_c < 100) {
lStack_18 = func_0x00400bf0((long)iStack_c);
func_0x00400b80(lStack_18,0x41,(long)(iStack_c + -1));
*(undefined *)(lStack_18 + (long)iStack_c + -1) = 0;
printLine(lStack_18);
func_0x00400b40(lStack_18);
}
return;
}
| ['gcc'] |
49,707 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_16_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87645/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_16.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_16_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_16_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,708 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_17_bad()
{
int i;
int data;
/* Initialize data */
data = -1;
for(i = 0; i < 1; i++)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87646/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_17.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_17_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_17_bad(void)
{
long lVar1;
undefined8 uStack_26;
undefined4 uStack_1e;
undefined2 uStack_1a;
long lStack_18;
int iStack_10;
int iStack_c;
iStack_10 = -1;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
uStack_26 = 0;
uStack_1e = 0;
uStack_1a = 0;
lVar1 = func_0x00400bb0(&uStack_26,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401374);
}
else {
iStack_10 = func_0x00400c20(&uStack_26);
}
}
if (iStack_10 < 100) {
lStack_18 = func_0x00400bf0((long)iStack_10);
func_0x00400b80(lStack_18,0x41,(long)(iStack_10 + -1));
*(undefined *)(lStack_18 + (long)iStack_10 + -1) = 0;
printLine(lStack_18);
func_0x00400b40(lStack_18);
}
return;
}
| ['gcc'] |
49,709 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_17_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87646/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_17.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_17_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_17_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,710 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_18_bad()
{
int data;
/* Initialize data */
data = -1;
goto source;
source:
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87647/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_18.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_18_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_18_bad(void)
{
long lVar1;
undefined8 uStack_26;
undefined4 uStack_1e;
undefined2 uStack_1a;
long lStack_18;
int iStack_c;
iStack_c = -1;
uStack_26 = 0;
uStack_1e = 0;
uStack_1a = 0;
lVar1 = func_0x00400bb0(&uStack_26,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401364);
}
else {
iStack_c = func_0x00400c20(&uStack_26);
}
if (iStack_c < 100) {
lStack_18 = func_0x00400bf0((long)iStack_c);
func_0x00400b80(lStack_18,0x41,(long)(iStack_c + -1));
*(undefined *)(lStack_18 + (long)iStack_c + -1) = 0;
printLine(lStack_18);
func_0x00400b40(lStack_18);
}
return;
}
| ['gcc'] |
49,711 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_18_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87647/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_18.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_18_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_18_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,712 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87648/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_21.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_21_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_21_bad(void)
{
int iVar1;
long lVar2;
badStatic = 1;
iVar1 = badSource(0xffffffff);
if (iVar1 < 100) {
lVar2 = func_0x00400bf0((long)iVar1);
func_0x00400b80(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400b40(lVar2);
}
return;
}
| ['gcc'] |
49,713 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_21_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87648/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_21.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_21_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_21_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
49,714 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_bad()
{
int data;
/* Initialize data */
data = -1;
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_badGlobal = 1; /* true */
data = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87649/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_bad(void)
{
int iVar1;
long lVar2;
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_badGlobal = 1;
iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_badSource(0xffffffff);
if (iVar1 < 100) {
lVar2 = func_0x00400bf0((long)iVar1);
func_0x00400b80(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400b40(lVar2);
}
return;
}
| ['gcc'] |
49,715 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87649/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
49,716 | int CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_badSource(int data)
{
if(CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_badGlobal)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
}
return data;
} | ['/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87649/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_badSource |
undefined4 CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_badSource(undefined4 param_1)
{
long lVar1;
undefined4 uStack_1c;
undefined8 uStack_16;
undefined4 uStack_e;
undefined2 uStack_a;
uStack_1c = param_1;
if (CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_badGlobal != 0) {
uStack_16 = 0;
uStack_e = 0;
uStack_a = 0;
lVar1 = func_0x00400bb0(&uStack_16,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401394);
}
else {
uStack_1c = func_0x00400c20(&uStack_16);
}
}
return uStack_1c;
}
| ['gcc'] |
49,717 | int CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_goodG2B1Source(int data)
{
if(CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87649/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_goodG2B1Source |
undefined4
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_goodG2B1Source(undefined4 param_1)
{
undefined4 uStack_c;
if (CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_goodG2B1Global == 0) {
uStack_c = 99;
}
else {
printLine(&UNK_00401314);
uStack_c = param_1;
}
return uStack_c;
}
| ['gcc'] |
49,718 | int CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_goodG2B2Source(int data)
{
if(CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87649/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_goodG2B2Source |
undefined4
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_goodG2B2Source(undefined4 param_1)
{
undefined4 uStack_c;
uStack_c = param_1;
if (CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_22_goodG2B2Global != 0) {
uStack_c = 99;
}
return uStack_c;
}
| ['gcc'] |
49,719 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_31_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
{
int dataCopy = data;
int data = dataCopy;
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87650/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_31.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_31_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_31_bad(void)
{
long lVar1;
undefined8 uStack_2e;
undefined4 uStack_26;
undefined2 uStack_22;
long lStack_20;
int iStack_14;
int iStack_10;
int iStack_c;
iStack_c = -1;
uStack_2e = 0;
uStack_26 = 0;
uStack_22 = 0;
lVar1 = func_0x00400bb0(&uStack_2e,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401364);
}
else {
iStack_c = func_0x00400c20(&uStack_2e);
}
iStack_10 = iStack_c;
iStack_14 = iStack_c;
if (iStack_c < 100) {
lStack_20 = func_0x00400bf0((long)iStack_c);
func_0x00400b80(lStack_20,0x41,(long)(iStack_14 + -1));
*(undefined *)(lStack_20 + (long)iStack_14 + -1) = 0;
printLine(lStack_20);
func_0x00400b40(lStack_20);
}
return;
}
| ['gcc'] |
49,720 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_31_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87650/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_31.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_31_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_31_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,721 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_32_bad()
{
int data;
int *dataPtr1 = &data;
int *dataPtr2 = &data;
/* Initialize data */
data = -1;
{
int data = *dataPtr1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
*dataPtr1 = data;
}
{
int data = *dataPtr2;
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87651/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_32.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_32_bad |
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_32_bad(void)
{
long lVar1;
undefined8 uStack_42;
undefined4 uStack_3a;
undefined2 uStack_36;
int iStack_34;
long lStack_30;
int iStack_24;
int *piStack_20;
int *piStack_18;
int iStack_c;
piStack_18 = &iStack_34;
piStack_20 = &iStack_34;
iStack_34 = -1;
iStack_c = -1;
uStack_42 = 0;
uStack_3a = 0;
uStack_36 = 0;
lVar1 = func_0x00400bb0(&uStack_42,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401384);
}
else {
iStack_c = func_0x00400c20(&uStack_42);
}
*piStack_18 = iStack_c;
iStack_24 = *piStack_20;
if (iStack_24 < 100) {
lStack_30 = func_0x00400bf0((long)iStack_24);
func_0x00400b80(lStack_30,0x41,(long)(iStack_24 + -1));
*(undefined *)(lStack_30 + (long)iStack_24 + -1) = 0;
printLine(lStack_30);
func_0x00400b40(lStack_30);
}
return;
}
| ['gcc'] |
49,722 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_32_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87651/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_32.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_32_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_32_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,723 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_34_bad()
{
int data;
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_34_unionType myUnion;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
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 */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87653/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_34.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_34_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_34_bad(void)
{
long lVar1;
undefined8 uStack_2a;
undefined4 uStack_22;
undefined2 uStack_1e;
int iStack_1c;
long lStack_18;
int iStack_10;
int iStack_c;
iStack_c = -1;
uStack_2a = 0;
uStack_22 = 0;
uStack_1e = 0;
lVar1 = func_0x00400bb0(&uStack_2a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401364);
}
else {
iStack_c = func_0x00400c20(&uStack_2a);
}
iStack_1c = iStack_c;
iStack_10 = iStack_c;
if (iStack_c < 100) {
lStack_18 = func_0x00400bf0((long)iStack_c);
func_0x00400b80(lStack_18,0x41,(long)(iStack_10 + -1));
*(undefined *)(lStack_18 + (long)iStack_10 + -1) = 0;
printLine(lStack_18);
func_0x00400b40(lStack_18);
}
return;
}
| ['gcc'] |
49,724 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_34_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87653/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_34.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_34_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_34_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,725 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87654/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400bf0((long)param_1);
func_0x00400b80(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400b40(lVar1);
}
return;
}
| ['gcc'] |
49,726 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87654/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_bad(void)
{
long lVar1;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400bb0(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401374);
}
else {
uStack_c = func_0x00400c20(&uStack_1a);
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_badSink(uStack_c);
return;
}
| ['gcc'] |
49,727 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87654/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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'] |
49,728 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87654/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_41_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,729 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87655/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_42.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_42_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_42_bad(void)
{
int iVar1;
long lVar2;
iVar1 = badSource(0xffffffff);
if (iVar1 < 100) {
lVar2 = func_0x00400bf0((long)iVar1);
func_0x00400b80(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400b40(lVar2);
}
return;
}
| ['gcc'] |
49,730 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_42_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87655/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_42.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_42_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_42_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,731 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_44_bad()
{
int data;
/* define a function pointer */
void (*funcPtr) (int) = badSink;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* use the function pointer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87657/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_44.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_44_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_44_bad(void)
{
long lVar1;
undefined8 uStack_26;
undefined4 uStack_1e;
undefined2 uStack_1a;
code *pcStack_18;
undefined4 uStack_c;
pcStack_18 = badSink;
uStack_c = 0xffffffff;
uStack_26 = 0;
uStack_1e = 0;
uStack_1a = 0;
lVar1 = func_0x00400bb0(&uStack_26,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401384);
}
else {
uStack_c = func_0x00400c20(&uStack_26);
}
(*pcStack_18)(uStack_c);
return;
}
| ['gcc'] |
49,732 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_44_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87657/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_44.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_44_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_44_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,733 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_45_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_45_badData = data;
badSink();
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87658/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_45.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_45_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_45_bad(void)
{
long lVar1;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400bb0(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401384);
}
else {
uStack_c = func_0x00400c20(&uStack_1a);
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_45_badData = uStack_c;
badSink();
return;
}
| ['gcc'] |
49,734 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87659/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51_bad(void)
{
long lVar1;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400bb0(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401374);
}
else {
uStack_c = func_0x00400c20(&uStack_1a);
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51b_badSink(uStack_c);
return;
}
| ['gcc'] |
49,735 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87659/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,736 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87659/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51b_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400bf0((long)param_1);
func_0x00400b80(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400b40(lVar1);
}
return;
}
| ['gcc'] |
49,737 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87659/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_51b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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'] |
49,738 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87660/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52_bad(void)
{
long lVar1;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400bb0(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401384);
}
else {
uStack_c = func_0x00400c20(&uStack_1a);
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52b_badSink(uStack_c);
return;
}
| ['gcc'] |
49,739 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87660/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,740 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87660/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52b_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52c_badSink(param_1);
return;
}
| ['gcc'] |
49,741 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87660/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52b_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
49,742 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87660/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52c.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52c_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400bf0((long)param_1);
func_0x00400b80(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400b40(lVar1);
}
return;
}
| ['gcc'] |
49,743 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87660/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52c.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_52c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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'] |
49,744 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87661/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53_bad(void)
{
long lVar1;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400bb0(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013a4);
}
else {
uStack_c = func_0x00400c20(&uStack_1a);
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53b_badSink(uStack_c);
return;
}
| ['gcc'] |
49,745 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87661/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,746 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87661/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53b_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c_badSink(param_1);
return;
}
| ['gcc'] |
49,747 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87661/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53b_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
49,748 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53d_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87661/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53d_badSink(param_1);
return;
}
| ['gcc'] |
49,749 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87661/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53c_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
49,750 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87661/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53d.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53d_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53d_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400bf0((long)param_1);
func_0x00400b80(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400b40(lVar1);
}
return;
}
| ['gcc'] |
49,751 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87661/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53d.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_53d_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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'] |
49,752 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87662/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54_bad(void)
{
long lVar1;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400bb0(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013b4);
}
else {
uStack_c = func_0x00400c20(&uStack_1a);
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54b_badSink(uStack_c);
return;
}
| ['gcc'] |
49,753 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87662/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,754 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87662/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54b_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c_badSink(param_1);
return;
}
| ['gcc'] |
49,755 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87662/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54b_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
49,756 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87662/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d_badSink(param_1);
return;
}
| ['gcc'] |
49,757 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87662/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54c_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
49,758 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54e_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87662/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d_badSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54e_badSink(param_1);
return;
}
| ['gcc'] |
49,759 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87662/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54d_goodG2BSink(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
49,760 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87662/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54e.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54e_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54e_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400bf0((long)param_1);
func_0x00400b80(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400b40(lVar1);
}
return;
}
| ['gcc'] |
49,761 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87662/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54e.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_54e_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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'] |
49,762 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61_bad()
{
int data;
/* Initialize data */
data = -1;
data = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87663/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61_bad(void)
{
int iVar1;
long lVar2;
iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61b_badSource(0xffffffff);
if (iVar1 < 100) {
lVar2 = func_0x00400bf0((long)iVar1);
func_0x00400b80(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400b40(lVar2);
}
return;
}
| ['gcc'] |
49,763 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87663/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,764 | int CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61b_badSource(int data)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
return data;
} | ['/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87663/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61b_badSource |
undefined4
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61b_badSource(undefined4 param_1)
{
long lVar1;
undefined4 uStack_1c;
undefined8 uStack_16;
undefined4 uStack_e;
undefined2 uStack_a;
uStack_16 = 0;
uStack_e = 0;
uStack_a = 0;
lVar1 = func_0x00400bb0(&uStack_16,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401374);
uStack_1c = param_1;
}
else {
uStack_1c = func_0x00400c20(&uStack_16);
}
return uStack_1c;
}
| ['gcc'] |
49,765 | int CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87663/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61b_goodG2BSource |
undefined4 CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_61b_goodG2BSource(void)
{
return 99;
}
| ['gcc'] |
49,766 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87665/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63_bad(void)
{
long lVar1;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400bb0(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401384);
}
else {
uStack_c = func_0x00400c20(&uStack_1a);
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63b_badSink(&uStack_c);
return;
}
| ['gcc'] |
49,767 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87665/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,768 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87665/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63b_badSink(int *param_1)
{
int iVar1;
long lVar2;
iVar1 = *param_1;
if (iVar1 < 100) {
lVar2 = func_0x00400bf0((long)iVar1);
func_0x00400b80(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400b40(lVar2);
}
return;
}
| ['gcc'] |
49,769 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87665/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_63b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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'] |
49,770 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87666/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64_bad(void)
{
long lVar1;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400bb0(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401384);
}
else {
uStack_c = func_0x00400c20(&uStack_1a);
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64b_badSink(&uStack_c);
return;
}
| ['gcc'] |
49,771 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87666/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,772 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87666/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64b_badSink(int *param_1)
{
int iVar1;
long lVar2;
iVar1 = *param_1;
if (iVar1 < 100) {
lVar2 = func_0x00400bf0((long)iVar1);
func_0x00400b80(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400b40(lVar2);
}
return;
}
| ['gcc'] |
49,773 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87666/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_64b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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'] |
49,774 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65_bad()
{
int data;
/* define a function pointer */
void (*funcPtr) (int) = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65b_badSink;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* use the function pointer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87667/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65_bad(void)
{
long lVar1;
undefined8 uStack_26;
undefined4 uStack_1e;
undefined2 uStack_1a;
code *pcStack_18;
undefined4 uStack_c;
pcStack_18 = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65b_badSink;
uStack_c = 0xffffffff;
uStack_26 = 0;
uStack_1e = 0;
uStack_1a = 0;
lVar1 = func_0x00400bb0(&uStack_26,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401384);
}
else {
uStack_c = func_0x00400c20(&uStack_26);
}
(*pcStack_18)(uStack_c);
return;
}
| ['gcc'] |
49,775 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87667/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,776 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87667/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65b_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400bf0((long)param_1);
func_0x00400b80(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400b40(lVar1);
}
return;
}
| ['gcc'] |
49,777 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87667/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_65b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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'] |
49,778 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66_bad()
{
int data;
int dataArray[5];
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
/* put data in array */
dataArray[2] = data;
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66b_badSink(dataArray);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* put data in array */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87668/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66_bad(void)
{
long lVar1;
undefined8 uStack_36;
undefined4 uStack_2e;
undefined2 uStack_2a;
undefined auStack_28 [8];
undefined4 uStack_20;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_36 = 0;
uStack_2e = 0;
uStack_2a = 0;
lVar1 = func_0x00400bb0(&uStack_36,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401384);
}
else {
uStack_c = func_0x00400c20(&uStack_36);
}
uStack_20 = uStack_c;
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66b_badSink(auStack_28);
return;
}
| ['gcc'] |
49,779 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87668/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,780 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87668/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66b_badSink(long param_1)
{
int iVar1;
long lVar2;
iVar1 = *(int *)(param_1 + 8);
if (iVar1 < 100) {
lVar2 = func_0x00400bf0((long)iVar1);
func_0x00400b80(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400b40(lVar2);
}
return;
}
| ['gcc'] |
49,781 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87668/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_66b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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'] |
49,782 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67_bad()
{
int data;
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67_structType myStruct;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
myStruct.structFirst = data;
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67b_badSink(myStruct);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87669/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67_bad(void)
{
long lVar1;
undefined8 uStack_1e;
undefined4 uStack_16;
undefined2 uStack_12;
undefined4 uStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_1e = 0;
uStack_16 = 0;
uStack_12 = 0;
lVar1 = func_0x00400bb0(&uStack_1e,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401384);
}
else {
uStack_c = func_0x00400c20(&uStack_1e);
}
uStack_10 = uStack_c;
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67b_badSink(uStack_c);
return;
}
| ['gcc'] |
49,783 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87669/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,784 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67b_badSink(CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87669/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67b_badSink(int param_1)
{
long lVar1;
if (param_1 < 100) {
lVar1 = func_0x00400bf0((long)param_1);
func_0x00400b80(lVar1,0x41,(long)(param_1 + -1));
*(undefined *)(lVar1 + (long)param_1 + -1) = 0;
printLine(lVar1);
func_0x00400b40(lVar1);
}
return;
}
| ['gcc'] |
49,785 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67b_goodG2BSink(CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87669/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_67b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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'] |
49,786 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_badData = data;
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68b_badSink();
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87670/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_bad(void)
{
long lVar1;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
undefined4 uStack_c;
uStack_c = 0xffffffff;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400bb0(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401384);
}
else {
uStack_c = func_0x00400c20(&uStack_1a);
}
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_badData = uStack_c;
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68b_badSink();
return;
}
| ['gcc'] |
49,787 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87670/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68a.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,788 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68b_badSink()
{
int data = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87670/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68b_badSink(void)
{
int iVar1;
long lVar2;
iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_badData;
if (CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_badData < 100) {
lVar2 = func_0x00400bf0((long)
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_badData);
func_0x00400b80(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400b40(lVar2);
}
return;
}
| ['gcc'] |
49,789 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68b_goodG2BSink()
{
int data = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_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/87670/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68b.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68b_goodG2BSink(void)
{
int iVar1;
long lVar2;
iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_goodG2BData;
if (CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_goodG2BData < 100) {
lVar2 = func_0x00400b00((long)
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_malloc_68_goodG2BData)
;
func_0x00400aa0(lVar2,0x41,(long)(iVar1 + -1));
*(undefined *)(lVar2 + (long)iVar1 + -1) = 0;
printLine(lVar2);
func_0x00400a60(lVar2);
}
return;
}
| ['gcc'] |
49,790 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_01_bad()
{
int data;
/* Initialize data */
data = -1;
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
{
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 */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87678/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_01.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_01_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_01_bad(void)
{
long lVar1;
undefined auStack_f8 [99];
undefined uStack_95;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
int iStack_c;
iStack_c = -1;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400b80(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401394);
}
else {
iStack_c = func_0x00400bf0(&uStack_1a);
}
uStack_88 = 0;
uStack_80 = 0;
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;
func_0x00400b50(auStack_f8,0x41,99);
uStack_95 = 0;
if (iStack_c < 100) {
func_0x00400bb0(&uStack_88,auStack_f8,(long)iStack_c);
*(undefined *)((long)&uStack_88 + (long)iStack_c) = 0;
}
printLine(&uStack_88);
return;
}
| ['gcc'] |
49,791 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_01_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87678/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_01.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_01_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_01_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
49,792 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_02_bad()
{
int data;
/* Initialize data */
data = -1;
if(1)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
}
{
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 */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87679/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_02.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_02_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_02_bad(void)
{
long lVar1;
undefined auStack_f8 [99];
undefined uStack_95;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
int iStack_c;
iStack_c = -1;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400b80(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401394);
}
else {
iStack_c = func_0x00400bf0(&uStack_1a);
}
uStack_88 = 0;
uStack_80 = 0;
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;
func_0x00400b50(auStack_f8,0x41,99);
uStack_95 = 0;
if (iStack_c < 100) {
func_0x00400bb0(&uStack_88,auStack_f8,(long)iStack_c);
*(undefined *)((long)&uStack_88 + (long)iStack_c) = 0;
}
printLine(&uStack_88);
return;
}
| ['gcc'] |
49,793 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_02_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87679/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_02.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_02_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_02_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
49,794 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_03_bad()
{
int data;
/* Initialize data */
data = -1;
if(5==5)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
}
{
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 */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87680/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_03.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_03_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_03_bad(void)
{
long lVar1;
undefined auStack_f8 [99];
undefined uStack_95;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
int iStack_c;
iStack_c = -1;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400b80(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401394);
}
else {
iStack_c = func_0x00400bf0(&uStack_1a);
}
uStack_88 = 0;
uStack_80 = 0;
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;
func_0x00400b50(auStack_f8,0x41,99);
uStack_95 = 0;
if (iStack_c < 100) {
func_0x00400bb0(&uStack_88,auStack_f8,(long)iStack_c);
*(undefined *)((long)&uStack_88 + (long)iStack_c) = 0;
}
printLine(&uStack_88);
return;
}
| ['gcc'] |
49,795 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_03_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87680/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_03.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_03_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_03_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
49,796 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_04_bad()
{
int data;
/* Initialize data */
data = -1;
if(STATIC_CONST_TRUE)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
}
{
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 */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87681/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_04.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_04_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_04_bad(void)
{
long lVar1;
undefined auStack_f8 [99];
undefined uStack_95;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
int iStack_c;
iStack_c = -1;
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400b80(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_0040139c);
}
else {
iStack_c = func_0x00400bf0(&uStack_1a);
}
uStack_88 = 0;
uStack_80 = 0;
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;
func_0x00400b50(auStack_f8,0x41,99);
uStack_95 = 0;
if (iStack_c < 100) {
func_0x00400bb0(&uStack_88,auStack_f8,(long)iStack_c);
*(undefined *)((long)&uStack_88 + (long)iStack_c) = 0;
}
printLine(&uStack_88);
return;
}
| ['gcc'] |
49,797 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_04_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87681/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_04.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_04_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_04_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
49,798 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_05_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticTrue)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
}
{
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 */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* 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/87682/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_05.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_05_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_05_bad(void)
{
long lVar1;
undefined auStack_f8 [99];
undefined uStack_95;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
undefined8 uStack_1a;
undefined4 uStack_12;
undefined2 uStack_e;
int iStack_c;
iStack_c = -1;
if (staticTrue != 0) {
uStack_1a = 0;
uStack_12 = 0;
uStack_e = 0;
lVar1 = func_0x00400b80(&uStack_1a,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401394);
}
else {
iStack_c = func_0x00400bf0(&uStack_1a);
}
}
uStack_88 = 0;
uStack_80 = 0;
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;
func_0x00400b50(auStack_f8,0x41,99);
uStack_95 = 0;
if (iStack_c < 100) {
func_0x00400bb0(&uStack_88,auStack_f8,(long)iStack_c);
*(undefined *)((long)&uStack_88 + (long)iStack_c) = 0;
}
printLine(&uStack_88);
return;
}
| ['gcc'] |
49,799 | void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_05_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87682/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_05.c | CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_05_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_memcpy_05_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.