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
15,200
void CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodB2GSink() { int data = CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_goodB2GData; { int i; int buffer[10] = { 0 }; /* FIX: Properly validate the array index and prevent a buffer overflow */ if (data >= 0 && data < (10)) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is out-of-bounds"); } } }
['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62556/CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodB2GSink(void) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_10; int iStack_c; iStack_10 = CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_goodB2GData; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if ((CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_goodB2GData < 0) || (9 < CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_goodB2GData)) { printLine(&UNK_004015b8); } else { *(undefined4 *) ((long)&uStack_38 + (long)CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_goodB2GData * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,201
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } } if(1) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62565/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_02.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_02_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_02_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401258); } else { iStack_c = func_0x00400b10(&uStack_1e); } uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401268); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } return; }
['gcc']
15,202
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_02_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62565/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_02.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_02_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_02_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,203
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } } if(5==5) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62566/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_03.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_03_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_03_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401258); } else { iStack_c = func_0x00400b10(&uStack_1e); } uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401268); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } return; }
['gcc']
15,204
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_03_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62566/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_03.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_03_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_03_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,205
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } } if(STATIC_CONST_TRUE) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62567/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_04.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_04_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_04_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401270); } else { iStack_c = func_0x00400b10(&uStack_1e); } uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401280); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } return; }
['gcc']
15,206
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_04_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62567/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_04.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_04_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_04_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,207
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } } if(staticTrue) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62568/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_05.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_05_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_05_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; if (staticTrue != 0) { uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401278); } else { iStack_c = func_0x00400b10(&uStack_1e); } } if (staticTrue != 0) { uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } } return; }
['gcc']
15,208
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_05_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62568/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_05.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_05_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_05_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,209
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_06_bad() { int data; /* Initialize data */ data = -1; if(STATIC_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."); } } } if(STATIC_CONST_FIVE==5) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62569/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_06.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_06_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_06_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_0040127c); } else { iStack_c = func_0x00400b10(&uStack_1e); } uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401290); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } return; }
['gcc']
15,210
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_06_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62569/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_06.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_06_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_06_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,211
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_07_bad() { int data; /* Initialize data */ data = -1; if(staticFive==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."); } } } if(staticFive==5) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62570/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_07.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_07_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_07_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; if (staticFive == 5) { uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401278); } else { iStack_c = func_0x00400b10(&uStack_1e); } } if (staticFive == 5) { uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } } return; }
['gcc']
15,212
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_07_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62570/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_07.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_07_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_07_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,213
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_08_bad() { int data; /* Initialize data */ data = -1; if(staticReturnsTrue()) { { 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."); } } } if(staticReturnsTrue()) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62571/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_08.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_08_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_08_bad(void) { int iVar1; long lVar2; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar2 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar2 == 0) { printLine(&UNK_00401288); } else { iStack_c = func_0x00400b10(&uStack_1e); } } iVar1 = staticReturnsTrue(); if (iVar1 != 0) { uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401298); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } } return; }
['gcc']
15,214
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_08_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62571/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_08.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_08_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_08_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,215
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_09_bad() { int data; /* Initialize data */ data = -1; if(GLOBAL_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."); } } } if(GLOBAL_CONST_TRUE) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62572/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_09.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_09_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_09_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; if (GLOBAL_CONST_TRUE != 0) { uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401278); } else { iStack_c = func_0x00400b10(&uStack_1e); } } if (GLOBAL_CONST_TRUE != 0) { uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } } return; }
['gcc']
15,216
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_09_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62572/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_09.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_09_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_09_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,217
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_10_bad() { int data; /* Initialize data */ data = -1; if(globalTrue) { { 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."); } } } if(globalTrue) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62573/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_10.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_10_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_10_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; if (globalTrue != 0) { uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401278); } else { iStack_c = func_0x00400b10(&uStack_1e); } } if (globalTrue != 0) { uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } } return; }
['gcc']
15,218
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_10_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62573/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_10.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_10_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_10_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,219
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_11_bad() { int data; /* Initialize data */ data = -1; if(globalReturnsTrue()) { { 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."); } } } if(globalReturnsTrue()) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62574/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_11.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_11_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_11_bad(void) { int iVar1; long lVar2; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar2 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar2 == 0) { printLine(&UNK_00401278); } else { iStack_c = func_0x00400b10(&uStack_1e); } } iVar1 = globalReturnsTrue(); if (iVar1 != 0) { uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } } return; }
['gcc']
15,220
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_11_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62574/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_11.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_11_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_11_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,221
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_12_bad() { int data; /* Initialize data */ data = -1; if(globalReturnsTrueOrFalse()) { { 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."); } } } else { /* FIX: Use a value greater than 0, but less than 10 to avoid attempting to * access an index of the array in the sink that is out-of-bounds */ data = 7; } if(globalReturnsTrueOrFalse()) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } else { { int i; int buffer[10] = { 0 }; /* FIX: Properly validate the array index and prevent a buffer overflow */ if (data >= 0 && data < (10)) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is out-of-bounds"); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* FIX: Use a value greater than 0, but less than 10 to avoid attempting to\r\n * access an index of the array in the sink that is out-of-bounds */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */', '/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62575/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_12.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_12_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_12_bad(void) { int iVar1; long lVar2; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_22; undefined4 uStack_1a; undefined2 uStack_16; int iStack_14; int iStack_10; int iStack_c; iStack_c = -1; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { iStack_c = 7; } else { uStack_22 = 0; uStack_1a = 0; uStack_16 = 0; lVar2 = func_0x00400ab0(&uStack_22,0xe,stdin); if (lVar2 == 0) { printLine(&UNK_004012f8); } else { iStack_c = func_0x00400b10(&uStack_22); } } iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; if ((iStack_c < 0) || (9 < iStack_c)) { printLine(&UNK_00401328); } else { *(undefined4 *)((long)&uStack_58 + (long)iStack_c * 4) = 1; for (iStack_14 = 0; iStack_14 < 10; iStack_14 = iStack_14 + 1) { printIntLine(*(undefined4 *)((long)&uStack_58 + (long)iStack_14 * 4)); } } } else { uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; if (iStack_c < 0) { printLine(&UNK_00401308); } else { *(undefined4 *)((long)&uStack_58 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_58 + (long)iStack_10 * 4)); } } } return; }
['gcc']
15,222
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_12_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62575/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_12.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_12_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_12_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
15,223
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } } if(GLOBAL_CONST_FIVE==5) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62576/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_13.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_13_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_13_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; if (GLOBAL_CONST_FIVE == 5) { uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401278); } else { iStack_c = func_0x00400b10(&uStack_1e); } } if (GLOBAL_CONST_FIVE == 5) { uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } } return; }
['gcc']
15,224
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_13_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62576/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_13.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_13_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_13_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,225
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } } if(globalFive==5) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62577/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_14.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_14_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_14_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; if (globalFive == 5) { uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401278); } else { iStack_c = func_0x00400b10(&uStack_1e); } } if (globalFive == 5) { uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } } return; }
['gcc']
15,226
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_14_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62577/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_14.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_14_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_14_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,227
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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; } switch(7) { case 7: { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } }
['/* 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 */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62578/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_15.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_15_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_15_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401258); } else { iStack_c = func_0x00400b10(&uStack_1e); } uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401268); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } return; }
['gcc']
15,228
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_15_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62578/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_15.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_15_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_15_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
15,229
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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; } while(1) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } break; } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62579/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_16.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_16_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_16_bad(void) { long lVar1; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; int iStack_10; int iStack_c; iStack_c = -1; uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401258); } else { iStack_c = func_0x00400b10(&uStack_1e); } uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_c < 0) { printLine(&UNK_00401268); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_10 * 4)); } } return; }
['gcc']
15,230
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_16_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62579/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_16.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_16_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_16_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
15,231
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_17_bad() { int i,j; 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."); } } } for(j = 0; j < 1; j++) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62580/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_17.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_17_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_17_bad(void) { long lVar1; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_26; undefined4 uStack_1e; undefined2 uStack_1a; int iStack_18; int iStack_14; int iStack_10; int iStack_c; iStack_14 = -1; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { uStack_26 = 0; uStack_1e = 0; uStack_1a = 0; lVar1 = func_0x00400ab0(&uStack_26,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401288); } else { iStack_14 = func_0x00400b10(&uStack_26); } } for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) { uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; if (iStack_14 < 0) { printLine(&UNK_00401298); } else { *(undefined4 *)((long)&uStack_58 + (long)iStack_14 * 4) = 1; for (iStack_18 = 0; iStack_18 < 10; iStack_18 = iStack_18 + 1) { printIntLine(*(undefined4 *)((long)&uStack_58 + (long)iStack_18 * 4)); } } } return; }
['gcc']
15,232
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_17_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62580/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_17.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_17_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_17_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
15,233
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_21_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."); } } badStatic = 1; /* true */ badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* true */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62582/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_21.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_21_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_21_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_0x00400ab0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_004012a8); } else { uStack_c = func_0x00400b10(&uStack_1a); } badStatic = 1; badSink(uStack_c); return; }
['gcc']
15,234
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_21_good() { goodB2G1(); goodB2G2(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62582/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_21.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_21_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_21_good(void) { goodB2G1(); goodB2G2(); goodG2B(); return; }
['gcc']
15,235
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_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."); } } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_badGlobal = 1; /* true */ CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* true */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62583/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_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_0x00400ab0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401284); } else { uStack_c = func_0x00400b10(&uStack_1a); } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_badGlobal = 1; CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_badSink(uStack_c); return; }
['gcc']
15,236
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_good() { goodB2G1(); goodB2G2(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62583/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_good(void) { goodB2G1(); goodB2G2(); goodG2B(); return; }
['gcc']
15,237
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_badSink(int data) { if(CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_badGlobal) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62583/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_badSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; if (CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_badGlobal != 0) { uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (param_1 < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } } return; }
['gcc']
15,238
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodB2G1Sink(int data) { if(CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodB2G1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { { int i; int buffer[10] = { 0 }; /* FIX: Properly validate the array index and prevent a buffer overflow */ if (data >= 0 && data < (10)) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is out-of-bounds"); } } } }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62583/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodB2G1Sink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodB2G1Sink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; if (CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodB2G1Global == 0) { uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if ((param_1 < 0) || (9 < param_1)) { printLine(&UNK_00401480); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } } else { printLine(&UNK_00401468); } return; }
['gcc']
15,239
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodB2G2Sink(int data) { if(CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodB2G2Global) { { int i; int buffer[10] = { 0 }; /* FIX: Properly validate the array index and prevent a buffer overflow */ if (data >= 0 && data < (10)) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is out-of-bounds"); } } } }
['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62583/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodB2G2Sink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodB2G2Sink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; if (CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodB2G2Global != 0) { uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if ((param_1 < 0) || (9 < param_1)) { printLine(&UNK_00401480); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } } return; }
['gcc']
15,240
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodG2BSink(int data) { if(CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodG2BGlobal) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62583/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodG2BSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; if (CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_22_goodG2BGlobal != 0) { uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (param_1 < 0) { printLine(&UNK_004014a8); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } } return; }
['gcc']
15,241
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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; { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62584/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_31.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_31_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_31_bad(void) { long lVar1; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_26; undefined4 uStack_1e; undefined2 uStack_1a; int iStack_18; int iStack_14; int iStack_10; int iStack_c; iStack_c = -1; uStack_26 = 0; uStack_1e = 0; uStack_1a = 0; lVar1 = func_0x00400ab0(&uStack_26,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401268); } else { iStack_c = func_0x00400b10(&uStack_26); } iStack_14 = iStack_c; iStack_18 = iStack_c; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; if (iStack_c < 0) { printLine(&UNK_00401278); } else { *(undefined4 *)((long)&uStack_58 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_58 + (long)iStack_10 * 4)); } } return; }
['gcc']
15,242
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_31_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62584/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_31.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_31_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_31_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
15,243
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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; { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62585/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_32.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_32_bad
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_32_bad(void) { long lVar1; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_36; undefined4 uStack_2e; undefined2 uStack_2a; int iStack_28; int iStack_24; int *piStack_20; int *piStack_18; int iStack_10; int iStack_c; piStack_18 = &iStack_28; piStack_20 = &iStack_28; iStack_28 = -1; iStack_c = -1; uStack_36 = 0; uStack_2e = 0; uStack_2a = 0; lVar1 = func_0x00400ab0(&uStack_36,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401288); } else { iStack_c = func_0x00400b10(&uStack_36); } *piStack_18 = iStack_c; iStack_24 = *piStack_20; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; if (iStack_24 < 0) { printLine(&UNK_00401298); } else { *(undefined4 *)((long)&uStack_68 + (long)iStack_24 * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_68 + (long)iStack_10 * 4)); } } return; }
['gcc']
15,244
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_32_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62585/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_32.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_32_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_32_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
15,245
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_34_bad() { int data; CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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; { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62587/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_34.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_34_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_34_bad(void) { long lVar1; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_26; undefined4 uStack_1e; undefined2 uStack_1a; int iStack_18; int iStack_14; int iStack_10; int iStack_c; iStack_c = -1; uStack_26 = 0; uStack_1e = 0; uStack_1a = 0; lVar1 = func_0x00400ab0(&uStack_26,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401268); } else { iStack_c = func_0x00400b10(&uStack_26); } iStack_18 = iStack_c; iStack_14 = iStack_c; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; if (iStack_c < 0) { printLine(&UNK_00401278); } else { *(undefined4 *)((long)&uStack_58 + (long)iStack_c * 4) = 1; for (iStack_10 = 0; iStack_10 < 10; iStack_10 = iStack_10 + 1) { printIntLine(*(undefined4 *)((long)&uStack_58 + (long)iStack_10 * 4)); } } return; }
['gcc']
15,246
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_34_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62587/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_34.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_34_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_34_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
15,247
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62588/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_41.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_41_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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_0x00400ab0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401298); } else { uStack_c = func_0x00400b10(&uStack_1a); } badSink(uStack_c); return; }
['gcc']
15,248
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_41_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62588/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_41.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_41_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_41_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
15,249
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62593/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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_0x00400ab0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401274); } else { uStack_c = func_0x00400b10(&uStack_1a); } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_badSink(uStack_c); return; }
['gcc']
15,250
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62593/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
15,251
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_badSink(int data) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62593/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_badSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (param_1 < 0) { printLine(&UNK_00401278); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,252
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_goodG2BSink(int data) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62593/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_goodG2BSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (param_1 < 0) { printLine(&UNK_00401338); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,253
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_goodB2GSink(int data) { { int i; int buffer[10] = { 0 }; /* FIX: Properly validate the array index and prevent a buffer overflow */ if (data >= 0 && data < (10)) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is out-of-bounds"); } } }
['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62593/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_51b_goodB2GSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if ((param_1 < 0) || (9 < param_1)) { printLine(&UNK_00401358); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,254
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62594/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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_0x00400ab0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401284); } else { uStack_c = func_0x00400b10(&uStack_1a); } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_badSink(uStack_c); return; }
['gcc']
15,255
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62594/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
15,256
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_badSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_badSink(data); }
[]
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62594/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_badSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_badSink(param_1); return; }
['gcc']
15,257
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_goodG2BSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62594/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_goodG2BSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_goodG2BSink(param_1); return; }
['gcc']
15,258
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_goodB2GSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62594/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52b_goodB2GSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_goodB2GSink(param_1); return; }
['gcc']
15,259
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_badSink(int data) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62594/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_badSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (param_1 < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,260
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_goodG2BSink(int data) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62594/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_goodG2BSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (param_1 < 0) { printLine(&UNK_00401368); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,261
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_goodB2GSink(int data) { { int i; int buffer[10] = { 0 }; /* FIX: Properly validate the array index and prevent a buffer overflow */ if (data >= 0 && data < (10)) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is out-of-bounds"); } } }
['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62594/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_52c_goodB2GSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if ((param_1 < 0) || (9 < param_1)) { printLine(&UNK_00401388); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,262
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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_0x00400ab0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_004012a4); } else { uStack_c = func_0x00400b10(&uStack_1a); } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_badSink(uStack_c); return; }
['gcc']
15,263
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
15,264
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_badSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_badSink(data); }
[]
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_badSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_badSink(param_1); return; }
['gcc']
15,265
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_goodG2BSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_goodG2BSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_goodG2BSink(param_1); return; }
['gcc']
15,266
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_goodB2GSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53b_goodB2GSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_goodB2GSink(param_1); return; }
['gcc']
15,267
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_badSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_badSink(data); }
[]
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_badSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_badSink(param_1); return; }
['gcc']
15,268
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_goodG2BSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_goodG2BSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_goodG2BSink(param_1); return; }
['gcc']
15,269
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_goodB2GSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53c_goodB2GSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_goodB2GSink(param_1); return; }
['gcc']
15,270
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_badSink(int data) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_badSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (param_1 < 0) { printLine(&UNK_004012a8); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,271
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_goodG2BSink(int data) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_goodG2BSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (param_1 < 0) { printLine(&UNK_00401398); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,272
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_goodB2GSink(int data) { { int i; int buffer[10] = { 0 }; /* FIX: Properly validate the array index and prevent a buffer overflow */ if (data >= 0 && data < (10)) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is out-of-bounds"); } } }
['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62595/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_53d_goodB2GSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if ((param_1 < 0) || (9 < param_1)) { printLine(&UNK_004013b8); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,273
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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_0x00400ab0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_004012b4); } else { uStack_c = func_0x00400b10(&uStack_1a); } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_badSink(uStack_c); return; }
['gcc']
15,274
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
15,275
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_badSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_badSink(data); }
[]
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_badSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_badSink(param_1); return; }
['gcc']
15,276
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_goodG2BSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_goodG2BSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_goodG2BSink(param_1); return; }
['gcc']
15,277
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_goodB2GSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54b_goodB2GSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_goodB2GSink(param_1); return; }
['gcc']
15,278
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_badSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_badSink(data); }
[]
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_badSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_badSink(param_1); return; }
['gcc']
15,279
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_goodG2BSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_goodG2BSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_goodG2BSink(param_1); return; }
['gcc']
15,280
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_goodB2GSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54c_goodB2GSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_goodB2GSink(param_1); return; }
['gcc']
15,281
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_badSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_badSink(data); }
[]
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_badSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_badSink(param_1); return; }
['gcc']
15,282
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_goodG2BSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_goodG2BSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_goodG2BSink(param_1); return; }
['gcc']
15,283
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_goodB2GSink(int data) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54d_goodB2GSink(undefined4 param_1) { CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_goodB2GSink(param_1); return; }
['gcc']
15,284
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_badSink(int data) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_badSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (param_1 < 0) { printLine(&UNK_004012b8); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,285
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_goodG2BSink(int data) { { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_goodG2BSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (param_1 < 0) { printLine(&UNK_004013c8); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,286
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_goodB2GSink(int data) { { int i; int buffer[10] = { 0 }; /* FIX: Properly validate the array index and prevent a buffer overflow */ if (data >= 0 && data < (10)) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is out-of-bounds"); } } }
['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62596/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_54e_goodB2GSink(int param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_c; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if ((param_1 < 0) || (9 < param_1)) { printLine(&UNK_004013e8); } else { *(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,287
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_badSink(&data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62599/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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_0x00400ab0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401284); } else { uStack_c = func_0x00400b10(&uStack_1a); } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_badSink(&uStack_c); return; }
['gcc']
15,288
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62599/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
15,289
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_badSink(int * dataPtr) { int data = *dataPtr; { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62599/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_badSink(int *param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_10; int iStack_c; iStack_10 = *param_1; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (iStack_10 < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,290
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_goodG2BSink(int * dataPtr) { int data = *dataPtr; { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62599/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_goodG2BSink(int *param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_10; int iStack_c; iStack_10 = *param_1; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (iStack_10 < 0) { printLine(&UNK_00401348); } else { *(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,291
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_goodB2GSink(int * dataPtr) { int data = *dataPtr; { int i; int buffer[10] = { 0 }; /* FIX: Properly validate the array index and prevent a buffer overflow */ if (data >= 0 && data < (10)) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is out-of-bounds"); } } }
['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62599/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_63b_goodB2GSink(int *param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_10; int iStack_c; iStack_10 = *param_1; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if ((iStack_10 < 0) || (9 < iStack_10)) { printLine(&UNK_00401368); } else { *(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']
15,292
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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."); } } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b_badSink(&data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62600/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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_0x00400ab0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401284); } else { uStack_c = func_0x00400b10(&uStack_1a); } CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b_badSink(&uStack_c); return; }
['gcc']
15,293
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62600/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
15,294
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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); { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62600/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b_badSink(int *param_1) { undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; int iStack_1c; int *piStack_18; int iStack_c; piStack_18 = param_1; iStack_1c = *param_1; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_1c < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_1c * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4)); } } return; }
['gcc']
15,295
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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); { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62600/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b_goodG2BSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b_goodG2BSink(int *param_1) { undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; int iStack_1c; int *piStack_18; int iStack_c; piStack_18 = param_1; iStack_1c = *param_1; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if (iStack_1c < 0) { printLine(&UNK_00401358); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_1c * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4)); } } return; }
['gcc']
15,296
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b_goodB2GSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ int * dataPtr = (int *)dataVoidPtr; /* dereference dataPtr into data */ int data = (*dataPtr); { int i; int buffer[10] = { 0 }; /* FIX: Properly validate the array index and prevent a buffer overflow */ if (data >= 0 && data < (10)) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is out-of-bounds"); } } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62600/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b_goodB2GSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_64b_goodB2GSink(int *param_1) { undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; int iStack_1c; int *piStack_18; int iStack_c; piStack_18 = param_1; iStack_1c = *param_1; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; if ((iStack_1c < 0) || (9 < iStack_1c)) { printLine(&UNK_00401378); } else { *(undefined4 *)((long)&uStack_48 + (long)iStack_1c * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4)); } } return; }
['gcc']
15,297
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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; CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66b_badSink(dataArray); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* put data in array */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62602/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66_bad
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_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_0x00400ab0(&uStack_36,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401284); } else { uStack_c = func_0x00400b10(&uStack_36); } uStack_20 = uStack_c; CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66b_badSink(auStack_28); return; }
['gcc']
15,298
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62602/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66a.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66_good
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
15,299
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66b_badSink(int dataArray[]) { /* copy data out of dataArray */ int data = dataArray[2]; { int i; int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound * This code does check to see if the array index is negative */ if (data >= 0) { buffer[data] = 1; /* Print the array values */ for(i = 0; i < 10; i++) { printIntLine(buffer[i]); } } else { printLine("ERROR: Array index is negative."); } } }
['/* copy data out of dataArray */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */']
['CWE121', 'CWE129']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62602/CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66b.c
CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66b_badSink
void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_66b_badSink(long param_1) { undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined8 uStack_18; int iStack_10; int iStack_c; iStack_10 = *(int *)(param_1 + 8); uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; if (iStack_10 < 0) { printLine(&UNK_00401288); } else { *(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1; for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) { printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4)); } } return; }
['gcc']