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
7,200
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110369/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_10.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_10_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_10_bad(void) { long lVar1; undefined8 uStack_2e; undefined4 uStack_26; undefined2 uStack_22; undefined4 *puStack_20; ulong uStack_18; int iStack_c; iStack_c = -1; if (globalTrue != 0) { uStack_2e = 0; uStack_26 = 0; uStack_22 = 0; lVar1 = func_0x00400b70(&uStack_2e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); } else { iStack_c = func_0x00400be0(&uStack_2e); } } puStack_20 = (undefined4 *)func_0x00400bb0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puStack_20[uStack_18] = 0; } printIntLine(*puStack_20); func_0x00400b10(puStack_20); return; }
['gcc']
7,201
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110369/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_10.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_10_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,202
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110370/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_11.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_11_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_11_bad(void) { int iVar1; long lVar2; undefined8 uStack_2e; undefined4 uStack_26; undefined2 uStack_22; undefined4 *puStack_20; ulong uStack_18; int iStack_c; iStack_c = -1; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { uStack_2e = 0; uStack_26 = 0; uStack_22 = 0; lVar2 = func_0x00400b70(&uStack_2e,0xe,stdin); if (lVar2 == 0) { printLine(&UNK_00401334); } else { iStack_c = func_0x00400be0(&uStack_2e); } } puStack_20 = (undefined4 *)func_0x00400bb0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puStack_20[uStack_18] = 0; } printIntLine(*puStack_20); func_0x00400b10(puStack_20); return; }
['gcc']
7,203
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110370/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_11.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_11_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,204
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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: Set data to a relatively small number greater than zero */ data = 20; } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* FIX: Set data to a relatively small number greater than zero */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110371/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_12.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_12_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_12_bad(void) { int iVar1; long lVar2; undefined8 uStack_2e; undefined4 uStack_26; undefined2 uStack_22; undefined4 *puStack_20; ulong uStack_18; int iStack_c; iStack_c = -1; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { iStack_c = 0x14; } else { uStack_2e = 0; uStack_26 = 0; uStack_22 = 0; lVar2 = func_0x00400b70(&uStack_2e,0xe,stdin); if (lVar2 == 0) { printLine(&UNK_00401334); } else { iStack_c = func_0x00400be0(&uStack_2e); } } puStack_20 = (undefined4 *)func_0x00400bb0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puStack_20[uStack_18] = 0; } printIntLine(*puStack_20); func_0x00400b10(puStack_20); return; }
['gcc']
7,205
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110371/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_12.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_12_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_12_good(void) { goodG2B(); return; }
['gcc']
7,206
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110372/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_13.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_13_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_13_bad(void) { long lVar1; undefined8 uStack_2e; undefined4 uStack_26; undefined2 uStack_22; undefined4 *puStack_20; ulong uStack_18; int iStack_c; iStack_c = -1; if (GLOBAL_CONST_FIVE == 5) { uStack_2e = 0; uStack_26 = 0; uStack_22 = 0; lVar1 = func_0x00400b70(&uStack_2e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); } else { iStack_c = func_0x00400be0(&uStack_2e); } } puStack_20 = (undefined4 *)func_0x00400bb0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puStack_20[uStack_18] = 0; } printIntLine(*puStack_20); func_0x00400b10(puStack_20); return; }
['gcc']
7,207
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110372/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_13.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_13_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,208
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110373/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_14.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_14_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_14_bad(void) { long lVar1; undefined8 uStack_2e; undefined4 uStack_26; undefined2 uStack_22; undefined4 *puStack_20; ulong uStack_18; int iStack_c; iStack_c = -1; if (globalFive == 5) { uStack_2e = 0; uStack_26 = 0; uStack_22 = 0; lVar1 = func_0x00400b70(&uStack_2e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); } else { iStack_c = func_0x00400be0(&uStack_2e); } } puStack_20 = (undefined4 *)func_0x00400bb0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puStack_20[uStack_18] = 0; } printIntLine(*puStack_20); func_0x00400b10(puStack_20); return; }
['gcc']
7,209
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110373/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_14.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_14_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,210
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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; } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* 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: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110374/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_15.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_15_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_15_bad(void) { long lVar1; undefined8 uStack_2e; undefined4 uStack_26; undefined2 uStack_22; undefined4 *puStack_20; ulong uStack_18; int iStack_c; iStack_c = -1; uStack_2e = 0; uStack_26 = 0; uStack_22 = 0; lVar1 = func_0x00400b70(&uStack_2e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); } else { iStack_c = func_0x00400be0(&uStack_2e); } puStack_20 = (undefined4 *)func_0x00400bb0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puStack_20[uStack_18] = 0; } printIntLine(*puStack_20); func_0x00400b10(puStack_20); return; }
['gcc']
7,211
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110374/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_15.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_15_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,212
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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; } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110375/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_16.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_16_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_16_bad(void) { long lVar1; undefined8 uStack_2e; undefined4 uStack_26; undefined2 uStack_22; undefined4 *puStack_20; ulong uStack_18; int iStack_c; iStack_c = -1; uStack_2e = 0; uStack_26 = 0; uStack_22 = 0; lVar1 = func_0x00400b70(&uStack_2e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); } else { iStack_c = func_0x00400be0(&uStack_2e); } puStack_20 = (undefined4 *)func_0x00400bb0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puStack_20[uStack_18] = 0; } printIntLine(*puStack_20); func_0x00400b10(puStack_20); return; }
['gcc']
7,213
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110375/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_16.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_16_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_16_good(void) { goodG2B(); return; }
['gcc']
7,214
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_17_bad() { int i; int data; /* Initialize data */ data = -1; for(i = 0; i < 1; i++) { { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110376/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_17.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_17_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_17_bad(void) { long lVar1; undefined8 uStack_2e; undefined4 uStack_26; undefined2 uStack_22; undefined4 *puStack_20; ulong uStack_18; int iStack_10; int iStack_c; iStack_10 = -1; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { uStack_2e = 0; uStack_26 = 0; uStack_22 = 0; lVar1 = func_0x00400b70(&uStack_2e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); } else { iStack_10 = func_0x00400be0(&uStack_2e); } } puStack_20 = (undefined4 *)func_0x00400bb0((long)iStack_10 << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_10; uStack_18 = uStack_18 + 1) { puStack_20[uStack_18] = 0; } printIntLine(*puStack_20); func_0x00400b10(puStack_20); return; }
['gcc']
7,215
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110376/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_17.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_17_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_17_good(void) { goodG2B(); return; }
['gcc']
7,216
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_18_bad() { int data; /* Initialize data */ data = -1; goto source; source: { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110377/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_18.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_18_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_18_bad(void) { long lVar1; undefined8 uStack_2e; undefined4 uStack_26; undefined2 uStack_22; undefined4 *puStack_20; ulong uStack_18; int iStack_c; iStack_c = -1; uStack_2e = 0; uStack_26 = 0; uStack_22 = 0; lVar1 = func_0x00400b70(&uStack_2e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); } else { iStack_c = func_0x00400be0(&uStack_2e); } puStack_20 = (undefined4 *)func_0x00400bb0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puStack_20[uStack_18] = 0; } printIntLine(*puStack_20); func_0x00400b10(puStack_20); return; }
['gcc']
7,217
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_18_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110377/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_18.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_18_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_18_good(void) { goodG2B(); return; }
['gcc']
7,218
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_21_bad() { int data; /* Initialize data */ data = -1; badStatic = 1; /* true */ data = badSource(data); { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* true */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110378/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_21.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_21_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_21_bad(void) { int iVar1; undefined4 *puVar2; ulong uStack_10; badStatic = 1; iVar1 = badSource(0xffffffff); puVar2 = (undefined4 *)func_0x00400bb0((long)iVar1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { puVar2[uStack_10] = 0; } printIntLine(*puVar2); func_0x00400b10(puVar2); return; }
['gcc']
7,219
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110378/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_21.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_21_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,220
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_bad() { int data; /* Initialize data */ data = -1; CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_badGlobal = 1; /* true */ data = CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_badSource(data); { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* true */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110379/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_bad(void) { int iVar1; undefined4 *puVar2; ulong uStack_10; CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_badGlobal = 1; iVar1 = CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_badSource(0xffffffff); puVar2 = (undefined4 *)func_0x00400bb0((long)iVar1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { puVar2[uStack_10] = 0; } printIntLine(*puVar2); func_0x00400b10(puVar2); return; }
['gcc']
7,221
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110379/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,222
int CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_badSource(int data) { if(CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_badGlobal) { { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } } return data; }
['/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110379/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_badSource
undefined4 CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_badSource(undefined4 param_1) { long lVar1; undefined4 uStack_1c; undefined8 uStack_16; undefined4 uStack_e; undefined2 uStack_a; uStack_1c = param_1; if (CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_badGlobal != 0) { uStack_16 = 0; uStack_e = 0; uStack_a = 0; lVar1 = func_0x00400b70(&uStack_16,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); } else { uStack_1c = func_0x00400be0(&uStack_16); } } return uStack_1c; }
['gcc']
7,223
int CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_goodG2B1Source(int data) { if(CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_goodG2B1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Set data to a relatively small number greater than zero */ data = 20; } return data; }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Set data to a relatively small number greater than zero */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110379/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_goodG2B1Source
undefined4 CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_goodG2B1Source(undefined4 param_1) { undefined4 uStack_c; if (CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_goodG2B1Global == 0) { uStack_c = 0x14; } else { printLine(&UNK_004012c4); uStack_c = param_1; } return uStack_c; }
['gcc']
7,224
int CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_goodG2B2Source(int data) { if(CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_goodG2B2Global) { /* FIX: Set data to a relatively small number greater than zero */ data = 20; } return data; }
['/* FIX: Set data to a relatively small number greater than zero */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110379/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_goodG2B2Source
undefined4 CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_goodG2B2Source(undefined4 param_1) { undefined4 uStack_c; uStack_c = param_1; if (CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_22_goodG2B2Global != 0) { uStack_c = 0x14; } return uStack_c; }
['gcc']
7,225
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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; { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110380/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_31.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_31_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_31_bad(void) { long lVar1; undefined8 uStack_36; undefined4 uStack_2e; undefined2 uStack_2a; undefined4 *puStack_28; int iStack_20; int iStack_1c; ulong uStack_18; int iStack_c; iStack_c = -1; uStack_36 = 0; uStack_2e = 0; uStack_2a = 0; lVar1 = func_0x00400b70(&uStack_36,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); } else { iStack_c = func_0x00400be0(&uStack_36); } iStack_1c = iStack_c; iStack_20 = iStack_c; puStack_28 = (undefined4 *)func_0x00400bb0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_20; uStack_18 = uStack_18 + 1) { puStack_28[uStack_18] = 0; } printIntLine(*puStack_28); func_0x00400b10(puStack_28); return; }
['gcc']
7,226
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_31_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110380/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_31.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_31_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_31_good(void) { goodG2B(); return; }
['gcc']
7,227
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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; { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110381/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_32.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_32_bad
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_32_bad(void) { long lVar1; undefined8 uStack_4a; undefined4 uStack_42; undefined2 uStack_3e; int iStack_3c; undefined4 *puStack_38; int iStack_2c; int *piStack_28; int *piStack_20; ulong uStack_18; int iStack_c; piStack_20 = &iStack_3c; piStack_28 = &iStack_3c; iStack_3c = -1; iStack_c = -1; uStack_4a = 0; uStack_42 = 0; uStack_3e = 0; lVar1 = func_0x00400b70(&uStack_4a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); } else { iStack_c = func_0x00400be0(&uStack_4a); } *piStack_20 = iStack_c; iStack_2c = *piStack_28; puStack_38 = (undefined4 *)func_0x00400bb0((long)iStack_2c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_2c; uStack_18 = uStack_18 + 1) { puStack_38[uStack_18] = 0; } printIntLine(*puStack_38); func_0x00400b10(puStack_38); return; }
['gcc']
7,228
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110381/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_32.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_32_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_32_good(void) { goodG2B(); return; }
['gcc']
7,229
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_34_bad() { int data; CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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; { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110383/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_34.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_34_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_34_bad(void) { long lVar1; undefined8 uStack_3a; undefined4 uStack_32; undefined2 uStack_2e; int iStack_2c; undefined4 *puStack_28; int iStack_1c; ulong uStack_18; int iStack_c; iStack_c = -1; uStack_3a = 0; uStack_32 = 0; uStack_2e = 0; lVar1 = func_0x00400b70(&uStack_3a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); } else { iStack_c = func_0x00400be0(&uStack_3a); } iStack_2c = iStack_c; iStack_1c = iStack_c; puStack_28 = (undefined4 *)func_0x00400bb0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_1c; uStack_18 = uStack_18 + 1) { puStack_28[uStack_18] = 0; } printIntLine(*puStack_28); func_0x00400b10(puStack_28); return; }
['gcc']
7,230
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_34_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110383/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_34.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_34_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_34_good(void) { goodG2B(); return; }
['gcc']
7,231
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_badSink(int data) { { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110384/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_badSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400bb0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400b10(puVar1); return; }
['gcc']
7,232
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110384/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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_0x00400b70(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); } else { uStack_c = func_0x00400be0(&uStack_1a); } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_badSink(uStack_c); return; }
['gcc']
7,233
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_goodG2BSink(int data) { { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110384/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_goodG2BSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400ab0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,234
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110384/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_41_good(void) { goodG2B(); return; }
['gcc']
7,235
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_42_bad() { int data; /* Initialize data */ data = -1; data = badSource(data); { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110385/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_42.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_42_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_42_bad(void) { int iVar1; undefined4 *puVar2; ulong uStack_10; iVar1 = badSource(0xffffffff); puVar2 = (undefined4 *)func_0x00400bb0((long)iVar1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { puVar2[uStack_10] = 0; } printIntLine(*puVar2); func_0x00400b10(puVar2); return; }
['gcc']
7,236
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_42_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110385/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_42.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_42_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_42_good(void) { goodG2B(); return; }
['gcc']
7,237
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110389/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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_0x00400b70(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); } else { uStack_c = func_0x00400be0(&uStack_1a); } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51b_badSink(uStack_c); return; }
['gcc']
7,238
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110389/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51_good(void) { goodG2B(); return; }
['gcc']
7,239
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51b_badSink(int data) { { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110389/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51b_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51b_badSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400bb0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400b10(puVar1); return; }
['gcc']
7,240
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51b_goodG2BSink(int data) { { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110389/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51b_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_51b_goodG2BSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400ab0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,241
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110390/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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_0x00400b70(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); } else { uStack_c = func_0x00400be0(&uStack_1a); } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52b_badSink(uStack_c); return; }
['gcc']
7,242
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110390/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52_good(void) { goodG2B(); return; }
['gcc']
7,243
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52b_badSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c_badSink(data); }
[]
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110390/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52b_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52b_badSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c_badSink(param_1); return; }
['gcc']
7,244
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52b_goodG2BSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110390/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52b_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52b_goodG2BSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c_goodG2BSink(param_1); return; }
['gcc']
7,245
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c_badSink(int data) { { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110390/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c_badSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400bb0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400b10(puVar1); return; }
['gcc']
7,246
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c_goodG2BSink(int data) { { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110390/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_52c_goodG2BSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400ab0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,247
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110391/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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_0x00400b70(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401364); } else { uStack_c = func_0x00400be0(&uStack_1a); } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53b_badSink(uStack_c); return; }
['gcc']
7,248
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110391/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53_good(void) { goodG2B(); return; }
['gcc']
7,249
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53b_badSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c_badSink(data); }
[]
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110391/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53b_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53b_badSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c_badSink(param_1); return; }
['gcc']
7,250
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53b_goodG2BSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110391/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53b_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53b_goodG2BSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c_goodG2BSink(param_1); return; }
['gcc']
7,251
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c_badSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d_badSink(data); }
[]
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110391/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c_badSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d_badSink(param_1); return; }
['gcc']
7,252
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c_goodG2BSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110391/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53c_goodG2BSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d_goodG2BSink(param_1); return; }
['gcc']
7,253
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d_badSink(int data) { { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110391/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d_badSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400bb0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400b10(puVar1); return; }
['gcc']
7,254
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d_goodG2BSink(int data) { { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110391/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_53d_goodG2BSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400ab0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,255
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110392/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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_0x00400b70(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401384); } else { uStack_c = func_0x00400be0(&uStack_1a); } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54b_badSink(uStack_c); return; }
['gcc']
7,256
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110392/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54_good(void) { goodG2B(); return; }
['gcc']
7,257
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54b_badSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c_badSink(data); }
[]
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110392/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54b_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54b_badSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c_badSink(param_1); return; }
['gcc']
7,258
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54b_goodG2BSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110392/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54b_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54b_goodG2BSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c_goodG2BSink(param_1); return; }
['gcc']
7,259
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c_badSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d_badSink(data); }
[]
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110392/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c_badSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d_badSink(param_1); return; }
['gcc']
7,260
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c_goodG2BSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110392/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54c_goodG2BSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d_goodG2BSink(param_1); return; }
['gcc']
7,261
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d_badSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e_badSink(data); }
[]
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110392/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d_badSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e_badSink(param_1); return; }
['gcc']
7,262
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d_goodG2BSink(int data) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110392/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54d_goodG2BSink(undefined4 param_1) { CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e_goodG2BSink(param_1); return; }
['gcc']
7,263
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e_badSink(int data) { { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110392/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e_badSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400bb0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400b10(puVar1); return; }
['gcc']
7,264
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e_goodG2BSink(int data) { { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110392/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_54e_goodG2BSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400ab0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,265
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61_bad() { int data; /* Initialize data */ data = -1; data = CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61b_badSource(data); { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110393/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61_bad(void) { int iVar1; undefined4 *puVar2; ulong uStack_10; iVar1 = CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61b_badSource(0xffffffff); puVar2 = (undefined4 *)func_0x00400bb0((long)iVar1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { puVar2[uStack_10] = 0; } printIntLine(*puVar2); func_0x00400b10(puVar2); return; }
['gcc']
7,266
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110393/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61_good(void) { goodG2B(); return; }
['gcc']
7,267
int CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61b_badSource(int data) { { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } return data; }
['/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110393/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61b_badSource
undefined4 CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61b_badSource(undefined4 param_1) { long lVar1; undefined4 uStack_1c; undefined8 uStack_16; undefined4 uStack_e; undefined2 uStack_a; uStack_16 = 0; uStack_e = 0; uStack_a = 0; lVar1 = func_0x00400b70(&uStack_16,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); uStack_1c = param_1; } else { uStack_1c = func_0x00400be0(&uStack_16); } return uStack_1c; }
['gcc']
7,268
int CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61b_goodG2BSource(int data) { /* FIX: Set data to a relatively small number greater than zero */ data = 20; return data; }
['/* FIX: Set data to a relatively small number greater than zero */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110393/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61b_goodG2BSource
undefined4 CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_61b_goodG2BSource(void) { return 0x14; }
['gcc']
7,269
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63b_badSink(&data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110395/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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_0x00400b70(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); } else { uStack_c = func_0x00400be0(&uStack_1a); } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63b_badSink(&uStack_c); return; }
['gcc']
7,270
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110395/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63_good(void) { goodG2B(); return; }
['gcc']
7,271
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63b_badSink(int * dataPtr) { int data = *dataPtr; { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110395/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63b_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63b_badSink(int *param_1) { int iVar1; undefined4 *puVar2; ulong uStack_10; iVar1 = *param_1; puVar2 = (undefined4 *)func_0x00400bb0((long)iVar1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { puVar2[uStack_10] = 0; } printIntLine(*puVar2); func_0x00400b10(puVar2); return; }
['gcc']
7,272
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63b_goodG2BSink(int * dataPtr) { int data = *dataPtr; { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110395/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63b_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_63b_goodG2BSink(int *param_1) { int iVar1; undefined4 *puVar2; ulong uStack_10; iVar1 = *param_1; puVar2 = (undefined4 *)func_0x00400ab0((long)iVar1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { puVar2[uStack_10] = 0; } printIntLine(*puVar2); func_0x00400a20(puVar2); return; }
['gcc']
7,273
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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."); } } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64b_badSink(&data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110396/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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_0x00400b70(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); } else { uStack_c = func_0x00400be0(&uStack_1a); } CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64b_badSink(&uStack_c); return; }
['gcc']
7,274
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110396/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64_good(void) { goodG2B(); return; }
['gcc']
7,275
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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); { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110396/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64b_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64b_badSink(int *param_1) { int iVar1; undefined4 *puVar2; ulong uStack_10; iVar1 = *param_1; puVar2 = (undefined4 *)func_0x00400bb0((long)iVar1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { puVar2[uStack_10] = 0; } printIntLine(*puVar2); func_0x00400b10(puVar2); return; }
['gcc']
7,276
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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); { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110396/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64b_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_64b_goodG2BSink(int *param_1) { int iVar1; undefined4 *puVar2; ulong uStack_10; iVar1 = *param_1; puVar2 = (undefined4 *)func_0x00400ab0((long)iVar1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { puVar2[uStack_10] = 0; } printIntLine(*puVar2); func_0x00400a20(puVar2); return; }
['gcc']
7,277
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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; CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66b_badSink(dataArray); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* put data in array */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110398/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_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_0x00400b70(&uStack_36,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); } else { uStack_c = func_0x00400be0(&uStack_36); } uStack_20 = uStack_c; CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66b_badSink(auStack_28); return; }
['gcc']
7,278
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110398/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66_good(void) { goodG2B(); return; }
['gcc']
7,279
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66b_badSink(int dataArray[]) { /* copy data out of dataArray */ int data = dataArray[2]; { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* copy data out of dataArray */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110398/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66b_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66b_badSink(long param_1) { int iVar1; undefined4 *puVar2; ulong uStack_10; iVar1 = *(int *)(param_1 + 8); puVar2 = (undefined4 *)func_0x00400bb0((long)iVar1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { puVar2[uStack_10] = 0; } printIntLine(*puVar2); func_0x00400b10(puVar2); return; }
['gcc']
7,280
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66b_goodG2BSink(int dataArray[]) { int data = dataArray[2]; { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110398/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66b_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_66b_goodG2BSink(long param_1) { int iVar1; undefined4 *puVar2; ulong uStack_10; iVar1 = *(int *)(param_1 + 8); puVar2 = (undefined4 *)func_0x00400ab0((long)iVar1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { puVar2[uStack_10] = 0; } printIntLine(*puVar2); func_0x00400a20(puVar2); return; }
['gcc']
7,281
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67_bad() { int data; CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67_structType myStruct; /* Initialize data */ data = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } myStruct.structFirst = data; CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67b_badSink(myStruct); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110399/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67_bad(void) { long lVar1; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; undefined4 uStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400b70(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); } else { uStack_c = func_0x00400be0(&uStack_1e); } uStack_10 = uStack_c; CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67b_badSink(uStack_c); return; }
['gcc']
7,282
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110399/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67a.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67_good(void) { goodG2B(); return; }
['gcc']
7,283
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67b_badSink(CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67_structType myStruct) { int data = myStruct.structFirst; { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110399/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67b_badSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67b_badSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400bb0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400b10(puVar1); return; }
['gcc']
7,284
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67b_goodG2BSink(CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67_structType myStruct) { int data = myStruct.structFirst; { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110399/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67b.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67b_goodG2BSink
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fgets_67b_goodG2BSink(int param_1) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400ab0((long)param_1 << 2); for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,285
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_01_bad() { int data; /* Initialize data */ data = -1; /* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */ data = INT_MAX / 2 + 2; /* 1073741825 */ /* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however * the for loop will attempt to access indices 0-1073741824 */ { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */', '/* 1073741825 */', '/* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however\r\n * the for loop will attempt to access indices 0-1073741824 */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110408/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_01.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_01_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_01_bad(void) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400ab0(0x100000004); for (uStack_10 = 0; uStack_10 < 0x40000001; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,286
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_01_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110408/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_01.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_01_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_01_good(void) { goodG2B(); return; }
['gcc']
7,287
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_02_bad() { int data; /* Initialize data */ data = -1; if(1) { /* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */ data = INT_MAX / 2 + 2; /* 1073741825 */ /* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however * the for loop will attempt to access indices 0-1073741824 */ } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */', '/* 1073741825 */', '/* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however\r\n * the for loop will attempt to access indices 0-1073741824 */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110409/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_02.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_02_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_02_bad(void) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400ab0(0x100000004); for (uStack_10 = 0; uStack_10 < 0x40000001; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,288
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110409/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_02.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_02_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,289
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_03_bad() { int data; /* Initialize data */ data = -1; if(5==5) { /* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */ data = INT_MAX / 2 + 2; /* 1073741825 */ /* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however * the for loop will attempt to access indices 0-1073741824 */ } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */', '/* 1073741825 */', '/* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however\r\n * the for loop will attempt to access indices 0-1073741824 */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110410/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_03.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_03_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_03_bad(void) { undefined4 *puVar1; ulong uStack_10; puVar1 = (undefined4 *)func_0x00400ab0(0x100000004); for (uStack_10 = 0; uStack_10 < 0x40000001; uStack_10 = uStack_10 + 1) { puVar1[uStack_10] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,290
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110410/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_03.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_03_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,291
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_04_bad() { int data; /* Initialize data */ data = -1; if(STATIC_CONST_TRUE) { /* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */ data = INT_MAX / 2 + 2; /* 1073741825 */ /* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however * the for loop will attempt to access indices 0-1073741824 */ } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */', '/* 1073741825 */', '/* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however\r\n * the for loop will attempt to access indices 0-1073741824 */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110411/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_04.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_04_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_04_bad(void) { undefined4 *puVar1; ulong uStack_18; puVar1 = (undefined4 *)func_0x00400ab0(0x100000004); for (uStack_18 = 0; uStack_18 < 0x40000001; uStack_18 = uStack_18 + 1) { puVar1[uStack_18] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,292
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110411/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_04.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_04_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,293
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_05_bad() { int data; /* Initialize data */ data = -1; if(staticTrue) { /* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */ data = INT_MAX / 2 + 2; /* 1073741825 */ /* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however * the for loop will attempt to access indices 0-1073741824 */ } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */', '/* 1073741825 */', '/* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however\r\n * the for loop will attempt to access indices 0-1073741824 */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110412/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_05.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_05_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_05_bad(void) { undefined4 *puVar1; ulong uStack_18; int iStack_c; iStack_c = -1; if (staticTrue != 0) { iStack_c = 0x40000001; } puVar1 = (undefined4 *)func_0x00400ab0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puVar1[uStack_18] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,294
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110412/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_05.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_05_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,295
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_06_bad() { int data; /* Initialize data */ data = -1; if(STATIC_CONST_FIVE==5) { /* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */ data = INT_MAX / 2 + 2; /* 1073741825 */ /* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however * the for loop will attempt to access indices 0-1073741824 */ } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */', '/* 1073741825 */', '/* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however\r\n * the for loop will attempt to access indices 0-1073741824 */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110413/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_06.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_06_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_06_bad(void) { undefined4 *puVar1; ulong uStack_18; puVar1 = (undefined4 *)func_0x00400ab0(0x100000004); for (uStack_18 = 0; uStack_18 < 0x40000001; uStack_18 = uStack_18 + 1) { puVar1[uStack_18] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,296
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110413/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_06.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_06_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,297
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_07_bad() { int data; /* Initialize data */ data = -1; if(staticFive==5) { /* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */ data = INT_MAX / 2 + 2; /* 1073741825 */ /* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however * the for loop will attempt to access indices 0-1073741824 */ } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */', '/* 1073741825 */', '/* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however\r\n * the for loop will attempt to access indices 0-1073741824 */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110414/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_07.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_07_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_07_bad(void) { undefined4 *puVar1; ulong uStack_18; int iStack_c; iStack_c = -1; if (staticFive == 5) { iStack_c = 0x40000001; } puVar1 = (undefined4 *)func_0x00400ab0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puVar1[uStack_18] = 0; } printIntLine(*puVar1); func_0x00400a20(puVar1); return; }
['gcc']
7,298
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110414/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_07.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_07_good
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
7,299
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_08_bad() { int data; /* Initialize data */ data = -1; if(staticReturnsTrue()) { /* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */ data = INT_MAX / 2 + 2; /* 1073741825 */ /* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however * the for loop will attempt to access indices 0-1073741824 */ } { size_t i; int *intPointer; /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value * so that the for loop doing the initialization causes a buffer overflow */ intPointer = (int*)malloc(data * sizeof(int)); for (i = 0; i < (size_t)data; i++) { intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */ } printIntLine(intPointer[0]); free(intPointer); } }
['/* Initialize data */', '/* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */', '/* 1073741825 */', '/* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however\r\n * the for loop will attempt to access indices 0-1073741824 */', '/* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value\r\n * so that the for loop doing the initialization causes a buffer overflow */', '/* Potentially writes beyond the boundary of intPointer */']
['CWE680']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/110415/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_08.c
CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_08_bad
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_08_bad(void) { int iVar1; undefined4 *puVar2; ulong uStack_18; int iStack_c; iStack_c = -1; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { iStack_c = 0x40000001; } puVar2 = (undefined4 *)func_0x00400ab0((long)iStack_c << 2); for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_c; uStack_18 = uStack_18 + 1) { puVar2[uStack_18] = 0; } printIntLine(*puVar2); func_0x00400a20(puVar2); return; }
['gcc']