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
5,100
void CWE606_Unchecked_Loop_Condition__char_console_31_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108998/CWE606_Unchecked_Loop_Condition__char_console_31.c
CWE606_Unchecked_Loop_Condition__char_console_31_good
void CWE606_Unchecked_Loop_Condition__char_console_31_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,101
void CWE606_Unchecked_Loop_Condition__char_console_32_bad() { char * data; char * *dataPtr1 = &data; char * *dataPtr2 = &data; char dataBuffer[100] = ""; data = dataBuffer; { char * data = *dataPtr1; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } *dataPtr1 = data; } { char * data = *dataPtr2; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108999/CWE606_Unchecked_Loop_Condition__char_console_32.c
CWE606_Unchecked_Loop_Condition__char_console_32_bad
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void CWE606_Unchecked_Loop_Condition__char_console_32_bad(void) { int iVar1; long lVar2; int iStack_ac; undefined8 uStack_a8; undefined8 uStack_a0; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined4 uStack_48; undefined8 *puStack_40; undefined8 *puStack_38; long lStack_30; undefined8 *puStack_28; undefined8 **ppuStack_20; undefined8 **ppuStack_18; int iStack_10; int iStack_c; ppuStack_18 = &puStack_40; ppuStack_20 = &puStack_40; uStack_a8 = 0; uStack_a0 = 0; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; puStack_40 = &uStack_a8; puStack_28 = puStack_40; lStack_30 = func_0x00400a80(puStack_40); if (1 < 100U - lStack_30) { lVar2 = func_0x00400ac0((long)puStack_28 + lStack_30,100 - (int)lStack_30,stdin); if (lVar2 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_30 + (long)puStack_28) = 0; } else { lStack_30 = func_0x00400a80(puStack_28); if ((lStack_30 != 0) && (*(char *)((long)puStack_28 + lStack_30 + -1) == '\n')) { *(undefined *)((long)puStack_28 + lStack_30 + -1) = 0; } } } *ppuStack_18 = puStack_28; puStack_38 = *ppuStack_20; iVar1 = func_0x00400b10(puStack_38,&UNK_00401353,&iStack_ac); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_ac; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,102
void CWE606_Unchecked_Loop_Condition__char_console_32_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108999/CWE606_Unchecked_Loop_Condition__char_console_32.c
CWE606_Unchecked_Loop_Condition__char_console_32_good
void CWE606_Unchecked_Loop_Condition__char_console_32_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,103
void CWE606_Unchecked_Loop_Condition__char_console_34_bad() { char * data; CWE606_Unchecked_Loop_Condition__char_console_34_unionType myUnion; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } myUnion.unionFirst = data; { char * data = myUnion.unionSecond; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109001/CWE606_Unchecked_Loop_Condition__char_console_34.c
CWE606_Unchecked_Loop_Condition__char_console_34_bad
void CWE606_Unchecked_Loop_Condition__char_console_34_bad(void) { int iVar1; long lVar2; int iStack_9c; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; undefined8 *puStack_30; undefined8 *puStack_28; long lStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; lStack_20 = func_0x00400a80(puStack_18); if (1 < 100U - lStack_20) { lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin); if (lVar2 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_20 + (long)puStack_18) = 0; } else { lStack_20 = func_0x00400a80(puStack_18); if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_20 + -1) = 0; } } } puStack_30 = puStack_18; puStack_28 = puStack_18; iVar1 = func_0x00400b10(puStack_18,&UNK_00401333,&iStack_9c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_9c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,104
void CWE606_Unchecked_Loop_Condition__char_console_34_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109001/CWE606_Unchecked_Loop_Condition__char_console_34.c
CWE606_Unchecked_Loop_Condition__char_console_34_good
void CWE606_Unchecked_Loop_Condition__char_console_34_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,105
void CWE606_Unchecked_Loop_Condition__char_console_41_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } badSink(data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109002/CWE606_Unchecked_Loop_Condition__char_console_41.c
CWE606_Unchecked_Loop_Condition__char_console_41_bad
void CWE606_Unchecked_Loop_Condition__char_console_41_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400a80(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401317); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400a80(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } badSink(puStack_10); return; }
['gcc']
5,106
void CWE606_Unchecked_Loop_Condition__char_console_41_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109002/CWE606_Unchecked_Loop_Condition__char_console_41.c
CWE606_Unchecked_Loop_Condition__char_console_41_good
void CWE606_Unchecked_Loop_Condition__char_console_41_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
5,107
void CWE606_Unchecked_Loop_Condition__char_console_42_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; data = badSource(data); { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109003/CWE606_Unchecked_Loop_Condition__char_console_42.c
CWE606_Unchecked_Loop_Condition__char_console_42_bad
void CWE606_Unchecked_Loop_Condition__char_console_42_bad(void) { int iVar1; int iStack_8c; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; puStack_18 = (undefined8 *)badSource(puStack_18); iVar1 = func_0x00400b10(puStack_18,&UNK_00401333,&iStack_8c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,108
void CWE606_Unchecked_Loop_Condition__char_console_42_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109003/CWE606_Unchecked_Loop_Condition__char_console_42.c
CWE606_Unchecked_Loop_Condition__char_console_42_good
void CWE606_Unchecked_Loop_Condition__char_console_42_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
5,109
void CWE606_Unchecked_Loop_Condition__char_console_44_bad() { char * data; /* define a function pointer */ void (*funcPtr) (char *) = badSink; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* use the function pointer */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109005/CWE606_Unchecked_Loop_Condition__char_console_44.c
CWE606_Unchecked_Loop_Condition__char_console_44_bad
void CWE606_Unchecked_Loop_Condition__char_console_44_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; undefined8 *puStack_18; code *pcStack_10; pcStack_10 = badSink; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_20 = func_0x00400a80(puStack_18); if (1 < 100U - lStack_20) { lVar1 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin); if (lVar1 == 0) { printLine(&UNK_00401327); *(undefined *)(lStack_20 + (long)puStack_18) = 0; } else { lStack_20 = func_0x00400a80(puStack_18); if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_20 + -1) = 0; } } } (*pcStack_10)(puStack_18); return; }
['gcc']
5,110
void CWE606_Unchecked_Loop_Condition__char_console_44_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109005/CWE606_Unchecked_Loop_Condition__char_console_44.c
CWE606_Unchecked_Loop_Condition__char_console_44_good
void CWE606_Unchecked_Loop_Condition__char_console_44_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,111
void CWE606_Unchecked_Loop_Condition__char_console_45_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE606_Unchecked_Loop_Condition__char_console_45_badData = data; badSink(); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109006/CWE606_Unchecked_Loop_Condition__char_console_45.c
CWE606_Unchecked_Loop_Condition__char_console_45_bad
void CWE606_Unchecked_Loop_Condition__char_console_45_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400a80(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401327); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400a80(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE606_Unchecked_Loop_Condition__char_console_45_badData = puStack_10; badSink(); return; }
['gcc']
5,112
void CWE606_Unchecked_Loop_Condition__char_console_45_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109006/CWE606_Unchecked_Loop_Condition__char_console_45.c
CWE606_Unchecked_Loop_Condition__char_console_45_good
void CWE606_Unchecked_Loop_Condition__char_console_45_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,113
void CWE606_Unchecked_Loop_Condition__char_console_51_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE606_Unchecked_Loop_Condition__char_console_51b_badSink(data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109007/CWE606_Unchecked_Loop_Condition__char_console_51a.c
CWE606_Unchecked_Loop_Condition__char_console_51_bad
void CWE606_Unchecked_Loop_Condition__char_console_51_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400a80(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400a80(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE606_Unchecked_Loop_Condition__char_console_51b_badSink(puStack_10); return; }
['gcc']
5,114
void CWE606_Unchecked_Loop_Condition__char_console_51_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109007/CWE606_Unchecked_Loop_Condition__char_console_51a.c
CWE606_Unchecked_Loop_Condition__char_console_51_good
void CWE606_Unchecked_Loop_Condition__char_console_51_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,115
void CWE606_Unchecked_Loop_Condition__char_console_51b_badSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109007/CWE606_Unchecked_Loop_Condition__char_console_51b.c
CWE606_Unchecked_Loop_Condition__char_console_51b_badSink
void CWE606_Unchecked_Loop_Condition__char_console_51b_badSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401314,&iStack_14); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,116
void CWE606_Unchecked_Loop_Condition__char_console_51b_goodG2BSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109007/CWE606_Unchecked_Loop_Condition__char_console_51b.c
CWE606_Unchecked_Loop_Condition__char_console_51b_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_51b_goodG2BSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401424,&iStack_14); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,117
void CWE606_Unchecked_Loop_Condition__char_console_51b_goodB2GSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* FIX: limit loop iteration counts */ if (n < MAX_LOOP) { intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109007/CWE606_Unchecked_Loop_Condition__char_console_51b.c
CWE606_Unchecked_Loop_Condition__char_console_51b_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_51b_goodB2GSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401424,&iStack_14); if ((iVar1 == 1) && (iStack_14 < 10000)) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,118
void CWE606_Unchecked_Loop_Condition__char_console_52_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE606_Unchecked_Loop_Condition__char_console_52b_badSink(data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109008/CWE606_Unchecked_Loop_Condition__char_console_52a.c
CWE606_Unchecked_Loop_Condition__char_console_52_bad
void CWE606_Unchecked_Loop_Condition__char_console_52_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400a80(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400a80(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE606_Unchecked_Loop_Condition__char_console_52b_badSink(puStack_10); return; }
['gcc']
5,119
void CWE606_Unchecked_Loop_Condition__char_console_52_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109008/CWE606_Unchecked_Loop_Condition__char_console_52a.c
CWE606_Unchecked_Loop_Condition__char_console_52_good
void CWE606_Unchecked_Loop_Condition__char_console_52_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,120
void CWE606_Unchecked_Loop_Condition__char_console_52b_badSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_52c_badSink(data); }
[]
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109008/CWE606_Unchecked_Loop_Condition__char_console_52b.c
CWE606_Unchecked_Loop_Condition__char_console_52b_badSink
void CWE606_Unchecked_Loop_Condition__char_console_52b_badSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_52c_badSink(param_1); return; }
['gcc']
5,121
void CWE606_Unchecked_Loop_Condition__char_console_52b_goodG2BSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_52c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109008/CWE606_Unchecked_Loop_Condition__char_console_52b.c
CWE606_Unchecked_Loop_Condition__char_console_52b_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_52b_goodG2BSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_52c_goodG2BSink(param_1); return; }
['gcc']
5,122
void CWE606_Unchecked_Loop_Condition__char_console_52b_goodB2GSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_52c_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109008/CWE606_Unchecked_Loop_Condition__char_console_52b.c
CWE606_Unchecked_Loop_Condition__char_console_52b_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_52b_goodB2GSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_52c_goodB2GSink(param_1); return; }
['gcc']
5,123
void CWE606_Unchecked_Loop_Condition__char_console_52c_badSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109008/CWE606_Unchecked_Loop_Condition__char_console_52c.c
CWE606_Unchecked_Loop_Condition__char_console_52c_badSink
void CWE606_Unchecked_Loop_Condition__char_console_52c_badSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401334,&iStack_14); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,124
void CWE606_Unchecked_Loop_Condition__char_console_52c_goodG2BSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109008/CWE606_Unchecked_Loop_Condition__char_console_52c.c
CWE606_Unchecked_Loop_Condition__char_console_52c_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_52c_goodG2BSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401464,&iStack_14); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,125
void CWE606_Unchecked_Loop_Condition__char_console_52c_goodB2GSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* FIX: limit loop iteration counts */ if (n < MAX_LOOP) { intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109008/CWE606_Unchecked_Loop_Condition__char_console_52c.c
CWE606_Unchecked_Loop_Condition__char_console_52c_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_52c_goodB2GSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401464,&iStack_14); if ((iVar1 == 1) && (iStack_14 < 10000)) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,126
void CWE606_Unchecked_Loop_Condition__char_console_53_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE606_Unchecked_Loop_Condition__char_console_53b_badSink(data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53a.c
CWE606_Unchecked_Loop_Condition__char_console_53_bad
void CWE606_Unchecked_Loop_Condition__char_console_53_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400a80(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400a80(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE606_Unchecked_Loop_Condition__char_console_53b_badSink(puStack_10); return; }
['gcc']
5,127
void CWE606_Unchecked_Loop_Condition__char_console_53_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53a.c
CWE606_Unchecked_Loop_Condition__char_console_53_good
void CWE606_Unchecked_Loop_Condition__char_console_53_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,128
void CWE606_Unchecked_Loop_Condition__char_console_53b_badSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_53c_badSink(data); }
[]
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53b.c
CWE606_Unchecked_Loop_Condition__char_console_53b_badSink
void CWE606_Unchecked_Loop_Condition__char_console_53b_badSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_53c_badSink(param_1); return; }
['gcc']
5,129
void CWE606_Unchecked_Loop_Condition__char_console_53b_goodG2BSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_53c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53b.c
CWE606_Unchecked_Loop_Condition__char_console_53b_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_53b_goodG2BSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_53c_goodG2BSink(param_1); return; }
['gcc']
5,130
void CWE606_Unchecked_Loop_Condition__char_console_53b_goodB2GSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_53c_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53b.c
CWE606_Unchecked_Loop_Condition__char_console_53b_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_53b_goodB2GSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_53c_goodB2GSink(param_1); return; }
['gcc']
5,131
void CWE606_Unchecked_Loop_Condition__char_console_53c_badSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_53d_badSink(data); }
[]
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53c.c
CWE606_Unchecked_Loop_Condition__char_console_53c_badSink
void CWE606_Unchecked_Loop_Condition__char_console_53c_badSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_53d_badSink(param_1); return; }
['gcc']
5,132
void CWE606_Unchecked_Loop_Condition__char_console_53c_goodG2BSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_53d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53c.c
CWE606_Unchecked_Loop_Condition__char_console_53c_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_53c_goodG2BSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_53d_goodG2BSink(param_1); return; }
['gcc']
5,133
void CWE606_Unchecked_Loop_Condition__char_console_53c_goodB2GSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_53d_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53c.c
CWE606_Unchecked_Loop_Condition__char_console_53c_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_53c_goodB2GSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_53d_goodB2GSink(param_1); return; }
['gcc']
5,134
void CWE606_Unchecked_Loop_Condition__char_console_53d_badSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53d.c
CWE606_Unchecked_Loop_Condition__char_console_53d_badSink
void CWE606_Unchecked_Loop_Condition__char_console_53d_badSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401354,&iStack_14); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,135
void CWE606_Unchecked_Loop_Condition__char_console_53d_goodG2BSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53d.c
CWE606_Unchecked_Loop_Condition__char_console_53d_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_53d_goodG2BSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401494,&iStack_14); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,136
void CWE606_Unchecked_Loop_Condition__char_console_53d_goodB2GSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* FIX: limit loop iteration counts */ if (n < MAX_LOOP) { intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109009/CWE606_Unchecked_Loop_Condition__char_console_53d.c
CWE606_Unchecked_Loop_Condition__char_console_53d_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_53d_goodB2GSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401494,&iStack_14); if ((iVar1 == 1) && (iStack_14 < 10000)) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,137
void CWE606_Unchecked_Loop_Condition__char_console_54_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE606_Unchecked_Loop_Condition__char_console_54b_badSink(data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54a.c
CWE606_Unchecked_Loop_Condition__char_console_54_bad
void CWE606_Unchecked_Loop_Condition__char_console_54_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400a80(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401374); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400a80(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE606_Unchecked_Loop_Condition__char_console_54b_badSink(puStack_10); return; }
['gcc']
5,138
void CWE606_Unchecked_Loop_Condition__char_console_54_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54a.c
CWE606_Unchecked_Loop_Condition__char_console_54_good
void CWE606_Unchecked_Loop_Condition__char_console_54_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,139
void CWE606_Unchecked_Loop_Condition__char_console_54b_badSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_54c_badSink(data); }
[]
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54b.c
CWE606_Unchecked_Loop_Condition__char_console_54b_badSink
void CWE606_Unchecked_Loop_Condition__char_console_54b_badSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_54c_badSink(param_1); return; }
['gcc']
5,140
void CWE606_Unchecked_Loop_Condition__char_console_54b_goodG2BSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_54c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54b.c
CWE606_Unchecked_Loop_Condition__char_console_54b_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_54b_goodG2BSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_54c_goodG2BSink(param_1); return; }
['gcc']
5,141
void CWE606_Unchecked_Loop_Condition__char_console_54b_goodB2GSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_54c_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54b.c
CWE606_Unchecked_Loop_Condition__char_console_54b_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_54b_goodB2GSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_54c_goodB2GSink(param_1); return; }
['gcc']
5,142
void CWE606_Unchecked_Loop_Condition__char_console_54c_badSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_54d_badSink(data); }
[]
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54c.c
CWE606_Unchecked_Loop_Condition__char_console_54c_badSink
void CWE606_Unchecked_Loop_Condition__char_console_54c_badSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_54d_badSink(param_1); return; }
['gcc']
5,143
void CWE606_Unchecked_Loop_Condition__char_console_54c_goodG2BSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_54d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54c.c
CWE606_Unchecked_Loop_Condition__char_console_54c_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_54c_goodG2BSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_54d_goodG2BSink(param_1); return; }
['gcc']
5,144
void CWE606_Unchecked_Loop_Condition__char_console_54c_goodB2GSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_54d_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54c.c
CWE606_Unchecked_Loop_Condition__char_console_54c_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_54c_goodB2GSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_54d_goodB2GSink(param_1); return; }
['gcc']
5,145
void CWE606_Unchecked_Loop_Condition__char_console_54d_badSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_54e_badSink(data); }
[]
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54d.c
CWE606_Unchecked_Loop_Condition__char_console_54d_badSink
void CWE606_Unchecked_Loop_Condition__char_console_54d_badSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_54e_badSink(param_1); return; }
['gcc']
5,146
void CWE606_Unchecked_Loop_Condition__char_console_54d_goodG2BSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_54e_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54d.c
CWE606_Unchecked_Loop_Condition__char_console_54d_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_54d_goodG2BSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_54e_goodG2BSink(param_1); return; }
['gcc']
5,147
void CWE606_Unchecked_Loop_Condition__char_console_54d_goodB2GSink(char * data) { CWE606_Unchecked_Loop_Condition__char_console_54e_goodB2GSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54d.c
CWE606_Unchecked_Loop_Condition__char_console_54d_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_54d_goodB2GSink(undefined8 param_1) { CWE606_Unchecked_Loop_Condition__char_console_54e_goodB2GSink(param_1); return; }
['gcc']
5,148
void CWE606_Unchecked_Loop_Condition__char_console_54e_badSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54e.c
CWE606_Unchecked_Loop_Condition__char_console_54e_badSink
void CWE606_Unchecked_Loop_Condition__char_console_54e_badSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401374,&iStack_14); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,149
void CWE606_Unchecked_Loop_Condition__char_console_54e_goodG2BSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54e.c
CWE606_Unchecked_Loop_Condition__char_console_54e_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_54e_goodG2BSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_004014d4,&iStack_14); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,150
void CWE606_Unchecked_Loop_Condition__char_console_54e_goodB2GSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* FIX: limit loop iteration counts */ if (n < MAX_LOOP) { intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109010/CWE606_Unchecked_Loop_Condition__char_console_54e.c
CWE606_Unchecked_Loop_Condition__char_console_54e_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_54e_goodB2GSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_004014d4,&iStack_14); if ((iVar1 == 1) && (iStack_14 < 10000)) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,151
void CWE606_Unchecked_Loop_Condition__char_console_61_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; data = CWE606_Unchecked_Loop_Condition__char_console_61b_badSource(data); { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109011/CWE606_Unchecked_Loop_Condition__char_console_61a.c
CWE606_Unchecked_Loop_Condition__char_console_61_bad
void CWE606_Unchecked_Loop_Condition__char_console_61_bad(void) { int iVar1; int iStack_8c; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; puStack_18 = (undefined8 *)CWE606_Unchecked_Loop_Condition__char_console_61b_badSource(puStack_18) ; iVar1 = func_0x00400b10(puStack_18,&UNK_00401324,&iStack_8c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,152
void CWE606_Unchecked_Loop_Condition__char_console_61_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109011/CWE606_Unchecked_Loop_Condition__char_console_61a.c
CWE606_Unchecked_Loop_Condition__char_console_61_good
void CWE606_Unchecked_Loop_Condition__char_console_61_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,153
char * CWE606_Unchecked_Loop_Condition__char_console_61b_badSource(char * data) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } return data; }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109011/CWE606_Unchecked_Loop_Condition__char_console_61b.c
CWE606_Unchecked_Loop_Condition__char_console_61b_badSource
long CWE606_Unchecked_Loop_Condition__char_console_61b_badSource(long param_1) { long lVar1; long lVar2; lVar1 = func_0x00400a80(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400ac0(param_1 + lVar1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401324); *(undefined *)(lVar1 + param_1) = 0; } else { lVar1 = func_0x00400a80(param_1); if ((lVar1 != 0) && (*(char *)(param_1 + lVar1 + -1) == '\n')) { *(undefined *)(param_1 + lVar1 + -1) = 0; } } } return param_1; }
['gcc']
5,154
char * CWE606_Unchecked_Loop_Condition__char_console_61b_goodG2BSource(char * data) { /* FIX: Set data to a number less than MAX_LOOP */ strcpy(data, "15"); return data; }
['/* FIX: Set data to a number less than MAX_LOOP */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109011/CWE606_Unchecked_Loop_Condition__char_console_61b.c
CWE606_Unchecked_Loop_Condition__char_console_61b_goodG2BSource
undefined2 * CWE606_Unchecked_Loop_Condition__char_console_61b_goodG2BSource(undefined2 *param_1) { *param_1 = 0x3531; *(undefined *)(param_1 + 1) = 0; return param_1; }
['gcc']
5,155
char * CWE606_Unchecked_Loop_Condition__char_console_61b_goodB2GSource(char * data) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } return data; }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109011/CWE606_Unchecked_Loop_Condition__char_console_61b.c
CWE606_Unchecked_Loop_Condition__char_console_61b_goodB2GSource
long CWE606_Unchecked_Loop_Condition__char_console_61b_goodB2GSource(long param_1) { long lVar1; long lVar2; lVar1 = func_0x00400a80(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400ac0(param_1 + lVar1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401444); *(undefined *)(lVar1 + param_1) = 0; } else { lVar1 = func_0x00400a80(param_1); if ((lVar1 != 0) && (*(char *)(param_1 + lVar1 + -1) == '\n')) { *(undefined *)(param_1 + lVar1 + -1) = 0; } } } return param_1; }
['gcc']
5,156
void CWE606_Unchecked_Loop_Condition__char_console_63_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE606_Unchecked_Loop_Condition__char_console_63b_badSink(&data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109013/CWE606_Unchecked_Loop_Condition__char_console_63a.c
CWE606_Unchecked_Loop_Condition__char_console_63_bad
void CWE606_Unchecked_Loop_Condition__char_console_63_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; undefined8 *puStack_18; long lStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_10 = func_0x00400a80(puStack_18); if (1 < 100U - lStack_10) { lVar1 = func_0x00400ac0((long)puStack_18 + lStack_10,100 - (int)lStack_10,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_10 + (long)puStack_18) = 0; } else { lStack_10 = func_0x00400a80(puStack_18); if ((lStack_10 != 0) && (*(char *)((long)puStack_18 + lStack_10 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_10 + -1) = 0; } } } CWE606_Unchecked_Loop_Condition__char_console_63b_badSink(&puStack_18); return; }
['gcc']
5,157
void CWE606_Unchecked_Loop_Condition__char_console_63_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109013/CWE606_Unchecked_Loop_Condition__char_console_63a.c
CWE606_Unchecked_Loop_Condition__char_console_63_good
void CWE606_Unchecked_Loop_Condition__char_console_63_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,158
void CWE606_Unchecked_Loop_Condition__char_console_63b_badSink(char * * dataPtr) { char * data = *dataPtr; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109013/CWE606_Unchecked_Loop_Condition__char_console_63b.c
CWE606_Unchecked_Loop_Condition__char_console_63b_badSink
void CWE606_Unchecked_Loop_Condition__char_console_63b_badSink(undefined8 *param_1) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = *param_1; iVar1 = func_0x00400b10(uStack_18,&UNK_00401324,&iStack_1c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,159
void CWE606_Unchecked_Loop_Condition__char_console_63b_goodG2BSink(char * * dataPtr) { char * data = *dataPtr; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109013/CWE606_Unchecked_Loop_Condition__char_console_63b.c
CWE606_Unchecked_Loop_Condition__char_console_63b_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_63b_goodG2BSink(undefined8 *param_1) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = *param_1; iVar1 = func_0x00400b10(uStack_18,&UNK_00401444,&iStack_1c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,160
void CWE606_Unchecked_Loop_Condition__char_console_63b_goodB2GSink(char * * dataPtr) { char * data = *dataPtr; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* FIX: limit loop iteration counts */ if (n < MAX_LOOP) { intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109013/CWE606_Unchecked_Loop_Condition__char_console_63b.c
CWE606_Unchecked_Loop_Condition__char_console_63b_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_63b_goodB2GSink(undefined8 *param_1) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = *param_1; iVar1 = func_0x00400b10(uStack_18,&UNK_00401444,&iStack_1c); if ((iVar1 == 1) && (iStack_1c < 10000)) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,161
void CWE606_Unchecked_Loop_Condition__char_console_64_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE606_Unchecked_Loop_Condition__char_console_64b_badSink(&data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109014/CWE606_Unchecked_Loop_Condition__char_console_64a.c
CWE606_Unchecked_Loop_Condition__char_console_64_bad
void CWE606_Unchecked_Loop_Condition__char_console_64_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; undefined8 *puStack_18; long lStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_10 = func_0x00400a80(puStack_18); if (1 < 100U - lStack_10) { lVar1 = func_0x00400ac0((long)puStack_18 + lStack_10,100 - (int)lStack_10,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); *(undefined *)(lStack_10 + (long)puStack_18) = 0; } else { lStack_10 = func_0x00400a80(puStack_18); if ((lStack_10 != 0) && (*(char *)((long)puStack_18 + lStack_10 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_10 + -1) = 0; } } } CWE606_Unchecked_Loop_Condition__char_console_64b_badSink(&puStack_18); return; }
['gcc']
5,162
void CWE606_Unchecked_Loop_Condition__char_console_64_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109014/CWE606_Unchecked_Loop_Condition__char_console_64a.c
CWE606_Unchecked_Loop_Condition__char_console_64_good
void CWE606_Unchecked_Loop_Condition__char_console_64_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,163
void CWE606_Unchecked_Loop_Condition__char_console_64b_badSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ char * * dataPtr = (char * *)dataVoidPtr; /* dereference dataPtr into data */ char * data = (*dataPtr); { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109014/CWE606_Unchecked_Loop_Condition__char_console_64b.c
CWE606_Unchecked_Loop_Condition__char_console_64b_badSink
void CWE606_Unchecked_Loop_Condition__char_console_64b_badSink(undefined8 *param_1) { int iVar1; int iStack_24; undefined8 uStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_20 = *param_1; puStack_18 = param_1; iVar1 = func_0x00400b10(uStack_20,&UNK_00401334,&iStack_24); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_24; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,164
void CWE606_Unchecked_Loop_Condition__char_console_64b_goodG2BSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ char * * dataPtr = (char * *)dataVoidPtr; /* dereference dataPtr into data */ char * data = (*dataPtr); { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109014/CWE606_Unchecked_Loop_Condition__char_console_64b.c
CWE606_Unchecked_Loop_Condition__char_console_64b_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_64b_goodG2BSink(undefined8 *param_1) { int iVar1; int iStack_24; undefined8 uStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_20 = *param_1; puStack_18 = param_1; iVar1 = func_0x00400b10(uStack_20,&UNK_00401454,&iStack_24); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_24; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,165
void CWE606_Unchecked_Loop_Condition__char_console_64b_goodB2GSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ char * * dataPtr = (char * *)dataVoidPtr; /* dereference dataPtr into data */ char * data = (*dataPtr); { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* FIX: limit loop iteration counts */ if (n < MAX_LOOP) { intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109014/CWE606_Unchecked_Loop_Condition__char_console_64b.c
CWE606_Unchecked_Loop_Condition__char_console_64b_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_64b_goodB2GSink(undefined8 *param_1) { int iVar1; int iStack_24; undefined8 uStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_20 = *param_1; puStack_18 = param_1; iVar1 = func_0x00400b10(uStack_20,&UNK_00401454,&iStack_24); if ((iVar1 == 1) && (iStack_24 < 10000)) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_24; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,166
void CWE606_Unchecked_Loop_Condition__char_console_65_bad() { char * data; /* define a function pointer */ void (*funcPtr) (char *) = CWE606_Unchecked_Loop_Condition__char_console_65b_badSink; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* use the function pointer */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109015/CWE606_Unchecked_Loop_Condition__char_console_65a.c
CWE606_Unchecked_Loop_Condition__char_console_65_bad
void CWE606_Unchecked_Loop_Condition__char_console_65_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; undefined8 *puStack_18; code *pcStack_10; pcStack_10 = CWE606_Unchecked_Loop_Condition__char_console_65b_badSink; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_20 = func_0x00400a80(puStack_18); if (1 < 100U - lStack_20) { lVar1 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_20 + (long)puStack_18) = 0; } else { lStack_20 = func_0x00400a80(puStack_18); if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_20 + -1) = 0; } } } (*pcStack_10)(puStack_18); return; }
['gcc']
5,167
void CWE606_Unchecked_Loop_Condition__char_console_65_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109015/CWE606_Unchecked_Loop_Condition__char_console_65a.c
CWE606_Unchecked_Loop_Condition__char_console_65_good
void CWE606_Unchecked_Loop_Condition__char_console_65_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,168
void CWE606_Unchecked_Loop_Condition__char_console_65b_badSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109015/CWE606_Unchecked_Loop_Condition__char_console_65b.c
CWE606_Unchecked_Loop_Condition__char_console_65b_badSink
void CWE606_Unchecked_Loop_Condition__char_console_65b_badSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401324,&iStack_14); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,169
void CWE606_Unchecked_Loop_Condition__char_console_65b_goodG2BSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109015/CWE606_Unchecked_Loop_Condition__char_console_65b.c
CWE606_Unchecked_Loop_Condition__char_console_65b_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_65b_goodG2BSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401444,&iStack_14); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,170
void CWE606_Unchecked_Loop_Condition__char_console_65b_goodB2GSink(char * data) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* FIX: limit loop iteration counts */ if (n < MAX_LOOP) { intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109015/CWE606_Unchecked_Loop_Condition__char_console_65b.c
CWE606_Unchecked_Loop_Condition__char_console_65b_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_65b_goodB2GSink(undefined8 param_1) { int iVar1; int iStack_14; int iStack_10; int iStack_c; iVar1 = func_0x00400b10(param_1,&UNK_00401444,&iStack_14); if ((iVar1 == 1) && (iStack_14 < 10000)) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,171
void CWE606_Unchecked_Loop_Condition__char_console_66_bad() { char * data; char * dataArray[5]; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } /* put data in array */ dataArray[2] = data; CWE606_Unchecked_Loop_Condition__char_console_66b_badSink(dataArray); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* put data in array */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109016/CWE606_Unchecked_Loop_Condition__char_console_66a.c
CWE606_Unchecked_Loop_Condition__char_console_66_bad
void CWE606_Unchecked_Loop_Condition__char_console_66_bad(void) { long lVar1; undefined8 uStack_b8; undefined8 uStack_b0; undefined8 uStack_a8; undefined8 uStack_a0; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined4 uStack_58; undefined auStack_48 [16]; undefined8 *puStack_38; long lStack_18; undefined8 *puStack_10; uStack_b8 = 0; uStack_b0 = 0; uStack_a8 = 0; uStack_a0 = 0; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; puStack_10 = &uStack_b8; lStack_18 = func_0x00400a80(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400a80(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } puStack_38 = puStack_10; CWE606_Unchecked_Loop_Condition__char_console_66b_badSink(auStack_48); return; }
['gcc']
5,172
void CWE606_Unchecked_Loop_Condition__char_console_66_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109016/CWE606_Unchecked_Loop_Condition__char_console_66a.c
CWE606_Unchecked_Loop_Condition__char_console_66_good
void CWE606_Unchecked_Loop_Condition__char_console_66_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,173
void CWE606_Unchecked_Loop_Condition__char_console_66b_badSink(char * dataArray[]) { /* copy data out of dataArray */ char * data = dataArray[2]; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
['/* copy data out of dataArray */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109016/CWE606_Unchecked_Loop_Condition__char_console_66b.c
CWE606_Unchecked_Loop_Condition__char_console_66b_badSink
void CWE606_Unchecked_Loop_Condition__char_console_66b_badSink(long param_1) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = *(undefined8 *)(param_1 + 0x10); iVar1 = func_0x00400b10(uStack_18,&UNK_00401344,&iStack_1c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,174
void CWE606_Unchecked_Loop_Condition__char_console_66b_goodG2BSink(char * dataArray[]) { char * data = dataArray[2]; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109016/CWE606_Unchecked_Loop_Condition__char_console_66b.c
CWE606_Unchecked_Loop_Condition__char_console_66b_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_66b_goodG2BSink(long param_1) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = *(undefined8 *)(param_1 + 0x10); iVar1 = func_0x00400b10(uStack_18,&UNK_00401484,&iStack_1c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,175
void CWE606_Unchecked_Loop_Condition__char_console_66b_goodB2GSink(char * dataArray[]) { char * data = dataArray[2]; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* FIX: limit loop iteration counts */ if (n < MAX_LOOP) { intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109016/CWE606_Unchecked_Loop_Condition__char_console_66b.c
CWE606_Unchecked_Loop_Condition__char_console_66b_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_66b_goodB2GSink(long param_1) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = *(undefined8 *)(param_1 + 0x10); iVar1 = func_0x00400b10(uStack_18,&UNK_00401484,&iStack_1c); if ((iVar1 == 1) && (iStack_1c < 10000)) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,176
void CWE606_Unchecked_Loop_Condition__char_console_67_bad() { char * data; CWE606_Unchecked_Loop_Condition__char_console_67_structType myStruct; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } myStruct.structFirst = data; CWE606_Unchecked_Loop_Condition__char_console_67b_badSink(myStruct); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109017/CWE606_Unchecked_Loop_Condition__char_console_67a.c
CWE606_Unchecked_Loop_Condition__char_console_67_bad
void CWE606_Unchecked_Loop_Condition__char_console_67_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; undefined8 *puStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400a80(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400a80(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } puStack_20 = puStack_10; CWE606_Unchecked_Loop_Condition__char_console_67b_badSink(puStack_10); return; }
['gcc']
5,177
void CWE606_Unchecked_Loop_Condition__char_console_67_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109017/CWE606_Unchecked_Loop_Condition__char_console_67a.c
CWE606_Unchecked_Loop_Condition__char_console_67_good
void CWE606_Unchecked_Loop_Condition__char_console_67_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,178
void CWE606_Unchecked_Loop_Condition__char_console_67b_badSink(CWE606_Unchecked_Loop_Condition__char_console_67_structType myStruct) { char * data = myStruct.structFirst; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109017/CWE606_Unchecked_Loop_Condition__char_console_67b.c
CWE606_Unchecked_Loop_Condition__char_console_67b_badSink
void CWE606_Unchecked_Loop_Condition__char_console_67b_badSink(undefined8 param_1) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = param_1; iVar1 = func_0x00400b10(param_1,&UNK_00401324,&iStack_1c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,179
void CWE606_Unchecked_Loop_Condition__char_console_67b_goodG2BSink(CWE606_Unchecked_Loop_Condition__char_console_67_structType myStruct) { char * data = myStruct.structFirst; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109017/CWE606_Unchecked_Loop_Condition__char_console_67b.c
CWE606_Unchecked_Loop_Condition__char_console_67b_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_67b_goodG2BSink(undefined8 param_1) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = param_1; iVar1 = func_0x00400b10(param_1,&UNK_00401444,&iStack_1c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,180
void CWE606_Unchecked_Loop_Condition__char_console_67b_goodB2GSink(CWE606_Unchecked_Loop_Condition__char_console_67_structType myStruct) { char * data = myStruct.structFirst; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* FIX: limit loop iteration counts */ if (n < MAX_LOOP) { intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109017/CWE606_Unchecked_Loop_Condition__char_console_67b.c
CWE606_Unchecked_Loop_Condition__char_console_67b_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_67b_goodB2GSink(undefined8 param_1) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = param_1; iVar1 = func_0x00400b10(param_1,&UNK_00401444,&iStack_1c); if ((iVar1 == 1) && (iStack_1c < 10000)) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,181
void CWE606_Unchecked_Loop_Condition__char_console_68_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE606_Unchecked_Loop_Condition__char_console_68_badData = data; CWE606_Unchecked_Loop_Condition__char_console_68b_badSink(); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109018/CWE606_Unchecked_Loop_Condition__char_console_68a.c
CWE606_Unchecked_Loop_Condition__char_console_68_bad
void CWE606_Unchecked_Loop_Condition__char_console_68_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400a80(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400a80(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE606_Unchecked_Loop_Condition__char_console_68_badData = puStack_10; CWE606_Unchecked_Loop_Condition__char_console_68b_badSink(); return; }
['gcc']
5,182
void CWE606_Unchecked_Loop_Condition__char_console_68_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109018/CWE606_Unchecked_Loop_Condition__char_console_68a.c
CWE606_Unchecked_Loop_Condition__char_console_68_good
void CWE606_Unchecked_Loop_Condition__char_console_68_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
5,183
void CWE606_Unchecked_Loop_Condition__char_console_68b_badSink() { char * data = CWE606_Unchecked_Loop_Condition__char_console_68_badData; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109018/CWE606_Unchecked_Loop_Condition__char_console_68b.c
CWE606_Unchecked_Loop_Condition__char_console_68b_badSink
void CWE606_Unchecked_Loop_Condition__char_console_68b_badSink(void) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = CWE606_Unchecked_Loop_Condition__char_console_68_badData; iVar1 = func_0x00400b10(CWE606_Unchecked_Loop_Condition__char_console_68_badData,&UNK_00401324, &iStack_1c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,184
void CWE606_Unchecked_Loop_Condition__char_console_68b_goodG2BSink() { char * data = CWE606_Unchecked_Loop_Condition__char_console_68_goodG2BData; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } }
["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109018/CWE606_Unchecked_Loop_Condition__char_console_68b.c
CWE606_Unchecked_Loop_Condition__char_console_68b_goodG2BSink
void CWE606_Unchecked_Loop_Condition__char_console_68b_goodG2BSink(void) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = CWE606_Unchecked_Loop_Condition__char_console_68_goodG2BData; iVar1 = func_0x00400b10(CWE606_Unchecked_Loop_Condition__char_console_68_goodG2BData,&UNK_00401444 ,&iStack_1c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,185
void CWE606_Unchecked_Loop_Condition__char_console_68b_goodB2GSink() { char * data = CWE606_Unchecked_Loop_Condition__char_console_68_goodB2GData; { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* FIX: limit loop iteration counts */ if (n < MAX_LOOP) { intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109018/CWE606_Unchecked_Loop_Condition__char_console_68b.c
CWE606_Unchecked_Loop_Condition__char_console_68b_goodB2GSink
void CWE606_Unchecked_Loop_Condition__char_console_68b_goodB2GSink(void) { int iVar1; int iStack_1c; undefined8 uStack_18; int iStack_10; int iStack_c; uStack_18 = CWE606_Unchecked_Loop_Condition__char_console_68_goodB2GData; iVar1 = func_0x00400b10(CWE606_Unchecked_Loop_Condition__char_console_68_goodB2GData,&UNK_00401444 ,&iStack_1c); if ((iVar1 == 1) && (iStack_1c < 10000)) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,186
void CWE606_Unchecked_Loop_Condition__char_environment_02_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(1) { { /* Append input from an environment variable to data */ size_t dataLen = strlen(data); char * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ strncat(data+dataLen, environment, 100-dataLen-1); } } } if(1) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109027/CWE606_Unchecked_Loop_Condition__char_environment_02.c
CWE606_Unchecked_Loop_Condition__char_environment_02_bad
void CWE606_Unchecked_Loop_Condition__char_environment_02_bad(void) { int iVar1; int iStack_9c; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; lStack_20 = func_0x00400a90(puStack_18); lStack_28 = func_0x00400a60(&UNK_004012c4); if (lStack_28 != 0) { func_0x00400ab0((long)puStack_18 + lStack_20,lStack_28,99 - lStack_20); } iVar1 = func_0x00400b20(puStack_18,&UNK_004012c8,&iStack_9c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_9c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,187
void CWE606_Unchecked_Loop_Condition__char_environment_02_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109027/CWE606_Unchecked_Loop_Condition__char_environment_02.c
CWE606_Unchecked_Loop_Condition__char_environment_02_good
void CWE606_Unchecked_Loop_Condition__char_environment_02_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
5,188
void CWE606_Unchecked_Loop_Condition__char_environment_03_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(5==5) { { /* Append input from an environment variable to data */ size_t dataLen = strlen(data); char * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ strncat(data+dataLen, environment, 100-dataLen-1); } } } if(5==5) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109028/CWE606_Unchecked_Loop_Condition__char_environment_03.c
CWE606_Unchecked_Loop_Condition__char_environment_03_bad
void CWE606_Unchecked_Loop_Condition__char_environment_03_bad(void) { int iVar1; int iStack_9c; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; lStack_20 = func_0x00400a90(puStack_18); lStack_28 = func_0x00400a60(&UNK_004012c4); if (lStack_28 != 0) { func_0x00400ab0((long)puStack_18 + lStack_20,lStack_28,99 - lStack_20); } iVar1 = func_0x00400b20(puStack_18,&UNK_004012c8,&iStack_9c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_9c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,189
void CWE606_Unchecked_Loop_Condition__char_environment_03_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109028/CWE606_Unchecked_Loop_Condition__char_environment_03.c
CWE606_Unchecked_Loop_Condition__char_environment_03_good
void CWE606_Unchecked_Loop_Condition__char_environment_03_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
5,190
void CWE606_Unchecked_Loop_Condition__char_environment_04_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(STATIC_CONST_TRUE) { { /* Append input from an environment variable to data */ size_t dataLen = strlen(data); char * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ strncat(data+dataLen, environment, 100-dataLen-1); } } } if(STATIC_CONST_TRUE) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109029/CWE606_Unchecked_Loop_Condition__char_environment_04.c
CWE606_Unchecked_Loop_Condition__char_environment_04_bad
void CWE606_Unchecked_Loop_Condition__char_environment_04_bad(void) { int iVar1; int iStack_9c; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; lStack_20 = func_0x00400a90(puStack_18); lStack_28 = func_0x00400a60(&UNK_004012dc); if (lStack_28 != 0) { func_0x00400ab0((long)puStack_18 + lStack_20,lStack_28,99 - lStack_20); } iVar1 = func_0x00400b20(puStack_18,&UNK_004012e0,&iStack_9c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_9c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,191
void CWE606_Unchecked_Loop_Condition__char_environment_04_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109029/CWE606_Unchecked_Loop_Condition__char_environment_04.c
CWE606_Unchecked_Loop_Condition__char_environment_04_good
void CWE606_Unchecked_Loop_Condition__char_environment_04_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
5,192
void CWE606_Unchecked_Loop_Condition__char_environment_05_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(staticTrue) { { /* Append input from an environment variable to data */ size_t dataLen = strlen(data); char * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ strncat(data+dataLen, environment, 100-dataLen-1); } } } if(staticTrue) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109030/CWE606_Unchecked_Loop_Condition__char_environment_05.c
CWE606_Unchecked_Loop_Condition__char_environment_05_bad
void CWE606_Unchecked_Loop_Condition__char_environment_05_bad(void) { int iVar1; int iStack_9c; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; if (staticTrue != 0) { lStack_20 = func_0x00400a90(puStack_18); lStack_28 = func_0x00400a60(&UNK_004012d4); if (lStack_28 != 0) { func_0x00400ab0((long)puStack_18 + lStack_20,lStack_28,99 - lStack_20); } } if (staticTrue != 0) { iVar1 = func_0x00400b20(puStack_18,&UNK_004012d8,&iStack_9c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_9c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } } return; }
['gcc']
5,193
void CWE606_Unchecked_Loop_Condition__char_environment_05_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109030/CWE606_Unchecked_Loop_Condition__char_environment_05.c
CWE606_Unchecked_Loop_Condition__char_environment_05_good
void CWE606_Unchecked_Loop_Condition__char_environment_05_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
5,194
void CWE606_Unchecked_Loop_Condition__char_environment_06_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(STATIC_CONST_FIVE==5) { { /* Append input from an environment variable to data */ size_t dataLen = strlen(data); char * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ strncat(data+dataLen, environment, 100-dataLen-1); } } } if(STATIC_CONST_FIVE==5) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109031/CWE606_Unchecked_Loop_Condition__char_environment_06.c
CWE606_Unchecked_Loop_Condition__char_environment_06_bad
void CWE606_Unchecked_Loop_Condition__char_environment_06_bad(void) { int iVar1; int iStack_9c; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; lStack_20 = func_0x00400a90(puStack_18); lStack_28 = func_0x00400a60(&UNK_004012d8); if (lStack_28 != 0) { func_0x00400ab0((long)puStack_18 + lStack_20,lStack_28,99 - lStack_20); } iVar1 = func_0x00400b20(puStack_18,&UNK_004012dc,&iStack_9c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_9c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } return; }
['gcc']
5,195
void CWE606_Unchecked_Loop_Condition__char_environment_06_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109031/CWE606_Unchecked_Loop_Condition__char_environment_06.c
CWE606_Unchecked_Loop_Condition__char_environment_06_good
void CWE606_Unchecked_Loop_Condition__char_environment_06_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
5,196
void CWE606_Unchecked_Loop_Condition__char_environment_07_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(staticFive==5) { { /* Append input from an environment variable to data */ size_t dataLen = strlen(data); char * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ strncat(data+dataLen, environment, 100-dataLen-1); } } } if(staticFive==5) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109032/CWE606_Unchecked_Loop_Condition__char_environment_07.c
CWE606_Unchecked_Loop_Condition__char_environment_07_bad
void CWE606_Unchecked_Loop_Condition__char_environment_07_bad(void) { int iVar1; int iStack_9c; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; if (staticFive == 5) { lStack_20 = func_0x00400a90(puStack_18); lStack_28 = func_0x00400a60(&UNK_004012d4); if (lStack_28 != 0) { func_0x00400ab0((long)puStack_18 + lStack_20,lStack_28,99 - lStack_20); } } if (staticFive == 5) { iVar1 = func_0x00400b20(puStack_18,&UNK_004012d8,&iStack_9c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_9c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } } return; }
['gcc']
5,197
void CWE606_Unchecked_Loop_Condition__char_environment_07_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109032/CWE606_Unchecked_Loop_Condition__char_environment_07.c
CWE606_Unchecked_Loop_Condition__char_environment_07_good
void CWE606_Unchecked_Loop_Condition__char_environment_07_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
5,198
void CWE606_Unchecked_Loop_Condition__char_environment_08_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(staticReturnsTrue()) { { /* Append input from an environment variable to data */ size_t dataLen = strlen(data); char * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ strncat(data+dataLen, environment, 100-dataLen-1); } } } if(staticReturnsTrue()) { { int i, n, intVariable; if (sscanf(data, "%d", &n) == 1) { /* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */ intVariable = 0; for (i = 0; i < n; i++) { /* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */ intVariable++; /* avoid a dead/empty code block issue */ } printIntLine(intVariable); } } } }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */']
['CWE606']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109033/CWE606_Unchecked_Loop_Condition__char_environment_08.c
CWE606_Unchecked_Loop_Condition__char_environment_08_bad
void CWE606_Unchecked_Loop_Condition__char_environment_08_bad(void) { int iVar1; int iStack_9c; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { lStack_20 = func_0x00400a90(puStack_18); lStack_28 = func_0x00400a60(&UNK_004012f4); if (lStack_28 != 0) { func_0x00400ab0((long)puStack_18 + lStack_20,lStack_28,99 - lStack_20); } } iVar1 = staticReturnsTrue(); if (iVar1 != 0) { iVar1 = func_0x00400b20(puStack_18,&UNK_004012f8,&iStack_9c); if (iVar1 == 1) { iStack_10 = 0; for (iStack_c = 0; iStack_c < iStack_9c; iStack_c = iStack_c + 1) { iStack_10 = iStack_10 + 1; } printIntLine(iStack_10); } } return; }
['gcc']
5,199
void CWE606_Unchecked_Loop_Condition__char_environment_08_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109033/CWE606_Unchecked_Loop_Condition__char_environment_08.c
CWE606_Unchecked_Loop_Condition__char_environment_08_good
void CWE606_Unchecked_Loop_Condition__char_environment_08_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']