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,300 | void CWE606_Unchecked_Loop_Condition__char_file_01_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109074/CWE606_Unchecked_Loop_Condition__char_file_01.c | CWE606_Unchecked_Loop_Condition__char_file_01_good |
void CWE606_Unchecked_Loop_Condition__char_file_01_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,301 | void CWE606_Unchecked_Loop_Condition__char_file_02_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(1)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
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);
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109075/CWE606_Unchecked_Loop_Condition__char_file_02.c | CWE606_Unchecked_Loop_Condition__char_file_02_bad |
void CWE606_Unchecked_Loop_Condition__char_file_02_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;
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_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401346,&UNK_00401344);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401354);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
iVar1 = func_0x00400b50(puStack_18,&UNK_00401363,&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,302 | void CWE606_Unchecked_Loop_Condition__char_file_02_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109075/CWE606_Unchecked_Loop_Condition__char_file_02.c | CWE606_Unchecked_Loop_Condition__char_file_02_good |
void CWE606_Unchecked_Loop_Condition__char_file_02_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,303 | void CWE606_Unchecked_Loop_Condition__char_file_03_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(5==5)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
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);
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109076/CWE606_Unchecked_Loop_Condition__char_file_03.c | CWE606_Unchecked_Loop_Condition__char_file_03_bad |
void CWE606_Unchecked_Loop_Condition__char_file_03_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;
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_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401346,&UNK_00401344);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401354);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
iVar1 = func_0x00400b50(puStack_18,&UNK_00401363,&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,304 | void CWE606_Unchecked_Loop_Condition__char_file_03_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109076/CWE606_Unchecked_Loop_Condition__char_file_03.c | CWE606_Unchecked_Loop_Condition__char_file_03_good |
void CWE606_Unchecked_Loop_Condition__char_file_03_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,305 | void CWE606_Unchecked_Loop_Condition__char_file_04_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(STATIC_CONST_TRUE)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
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);
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109077/CWE606_Unchecked_Loop_Condition__char_file_04.c | CWE606_Unchecked_Loop_Condition__char_file_04_bad |
void CWE606_Unchecked_Loop_Condition__char_file_04_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;
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_0x00400ac0(puStack_18);
if ((1 < 100U - lStack_20) &&
(lStack_28 = func_0x00400b60(&UNK_0040135e,&UNK_0040135c), lStack_28 != 0)) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_0040136c);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
iVar1 = func_0x00400b50(puStack_18,&UNK_0040137b,&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,306 | void CWE606_Unchecked_Loop_Condition__char_file_04_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109077/CWE606_Unchecked_Loop_Condition__char_file_04.c | CWE606_Unchecked_Loop_Condition__char_file_04_good |
void CWE606_Unchecked_Loop_Condition__char_file_04_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,307 | void CWE606_Unchecked_Loop_Condition__char_file_05_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(staticTrue)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
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);
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109078/CWE606_Unchecked_Loop_Condition__char_file_05.c | CWE606_Unchecked_Loop_Condition__char_file_05_bad |
void CWE606_Unchecked_Loop_Condition__char_file_05_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;
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_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401364);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
}
if (staticTrue != 0) {
iVar1 = func_0x00400b50(puStack_18,&UNK_00401373,&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,308 | void CWE606_Unchecked_Loop_Condition__char_file_05_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109078/CWE606_Unchecked_Loop_Condition__char_file_05.c | CWE606_Unchecked_Loop_Condition__char_file_05_good |
void CWE606_Unchecked_Loop_Condition__char_file_05_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,309 | void CWE606_Unchecked_Loop_Condition__char_file_06_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(STATIC_CONST_FIVE==5)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
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);
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109079/CWE606_Unchecked_Loop_Condition__char_file_06.c | CWE606_Unchecked_Loop_Condition__char_file_06_bad |
void CWE606_Unchecked_Loop_Condition__char_file_06_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;
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_0x00400ac0(puStack_18);
if ((1 < 100U - lStack_20) &&
(lStack_28 = func_0x00400b60(&UNK_0040135a,&UNK_00401358), lStack_28 != 0)) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401368);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
iVar1 = func_0x00400b50(puStack_18,&UNK_00401377,&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,310 | void CWE606_Unchecked_Loop_Condition__char_file_06_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109079/CWE606_Unchecked_Loop_Condition__char_file_06.c | CWE606_Unchecked_Loop_Condition__char_file_06_good |
void CWE606_Unchecked_Loop_Condition__char_file_06_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,311 | void CWE606_Unchecked_Loop_Condition__char_file_07_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(staticFive==5)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
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);
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109080/CWE606_Unchecked_Loop_Condition__char_file_07.c | CWE606_Unchecked_Loop_Condition__char_file_07_bad |
void CWE606_Unchecked_Loop_Condition__char_file_07_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;
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_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401364);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
}
if (staticFive == 5) {
iVar1 = func_0x00400b50(puStack_18,&UNK_00401373,&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,312 | void CWE606_Unchecked_Loop_Condition__char_file_07_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109080/CWE606_Unchecked_Loop_Condition__char_file_07.c | CWE606_Unchecked_Loop_Condition__char_file_07_good |
void CWE606_Unchecked_Loop_Condition__char_file_07_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,313 | void CWE606_Unchecked_Loop_Condition__char_file_08_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(staticReturnsTrue())
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
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);
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109081/CWE606_Unchecked_Loop_Condition__char_file_08.c | CWE606_Unchecked_Loop_Condition__char_file_08_bad |
void CWE606_Unchecked_Loop_Condition__char_file_08_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;
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_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401376,&UNK_00401374);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401384);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
}
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400b50(puStack_18,&UNK_00401393,&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,314 | void CWE606_Unchecked_Loop_Condition__char_file_08_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109081/CWE606_Unchecked_Loop_Condition__char_file_08.c | CWE606_Unchecked_Loop_Condition__char_file_08_good |
void CWE606_Unchecked_Loop_Condition__char_file_08_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,315 | void CWE606_Unchecked_Loop_Condition__char_file_09_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(GLOBAL_CONST_TRUE)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
if(GLOBAL_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);
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109082/CWE606_Unchecked_Loop_Condition__char_file_09.c | CWE606_Unchecked_Loop_Condition__char_file_09_bad |
void CWE606_Unchecked_Loop_Condition__char_file_09_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;
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 (GLOBAL_CONST_TRUE != 0) {
lStack_20 = func_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401364);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
}
if (GLOBAL_CONST_TRUE != 0) {
iVar1 = func_0x00400b50(puStack_18,&UNK_00401373,&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,316 | void CWE606_Unchecked_Loop_Condition__char_file_09_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109082/CWE606_Unchecked_Loop_Condition__char_file_09.c | CWE606_Unchecked_Loop_Condition__char_file_09_good |
void CWE606_Unchecked_Loop_Condition__char_file_09_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,317 | void CWE606_Unchecked_Loop_Condition__char_file_10_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalTrue)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
if(globalTrue)
{
{
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 a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109083/CWE606_Unchecked_Loop_Condition__char_file_10.c | CWE606_Unchecked_Loop_Condition__char_file_10_bad |
void CWE606_Unchecked_Loop_Condition__char_file_10_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;
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 (globalTrue != 0) {
lStack_20 = func_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401364);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
}
if (globalTrue != 0) {
iVar1 = func_0x00400b50(puStack_18,&UNK_00401373,&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,318 | void CWE606_Unchecked_Loop_Condition__char_file_10_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109083/CWE606_Unchecked_Loop_Condition__char_file_10.c | CWE606_Unchecked_Loop_Condition__char_file_10_good |
void CWE606_Unchecked_Loop_Condition__char_file_10_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,319 | void CWE606_Unchecked_Loop_Condition__char_file_11_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalReturnsTrue())
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
if(globalReturnsTrue())
{
{
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 a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109084/CWE606_Unchecked_Loop_Condition__char_file_11.c | CWE606_Unchecked_Loop_Condition__char_file_11_bad |
void CWE606_Unchecked_Loop_Condition__char_file_11_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;
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 = globalReturnsTrue();
if (iVar1 != 0) {
lStack_20 = func_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401366,&UNK_00401364);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401374);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
}
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400b50(puStack_18,&UNK_00401383,&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,320 | void CWE606_Unchecked_Loop_Condition__char_file_11_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109084/CWE606_Unchecked_Loop_Condition__char_file_11.c | CWE606_Unchecked_Loop_Condition__char_file_11_good |
void CWE606_Unchecked_Loop_Condition__char_file_11_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,321 | void CWE606_Unchecked_Loop_Condition__char_file_12_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalReturnsTrueOrFalse())
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
else
{
/* FIX: Set data to a number less than MAX_LOOP */
strcpy(data, "15");
}
if(globalReturnsTrueOrFalse())
{
{
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);
}
}
}
else
{
{
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);
}
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* FIX: Set data to a number less than MAX_LOOP */', "/* 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 */', '/* FIX: limit loop iteration counts */', '/* 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/109085/CWE606_Unchecked_Loop_Condition__char_file_12.c | CWE606_Unchecked_Loop_Condition__char_file_12_bad |
void CWE606_Unchecked_Loop_Condition__char_file_12_bad(void)
{
undefined8 *puVar1;
int iVar2;
long lVar3;
int iStack_a0;
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_30;
long lStack_28;
undefined8 *puStack_20;
int iStack_18;
int iStack_14;
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_20 = &uStack_98;
iVar2 = globalReturnsTrueOrFalse();
puVar1 = puStack_20;
if (iVar2 == 0) {
*(undefined2 *)puStack_20 = 0x3531;
*(undefined *)((long)puVar1 + 2) = 0;
}
else {
lStack_28 = func_0x00400ac0(puStack_20);
if (1 < 100U - lStack_28) {
lStack_30 = func_0x00400b60(&UNK_004013d6,&UNK_004013d4);
if (lStack_30 != 0) {
lVar3 = func_0x00400b00((long)puStack_20 + lStack_28,100 - (int)lStack_28,lStack_30);
if (lVar3 == 0) {
printLine(&UNK_004013e4);
*(undefined *)(lStack_28 + (long)puStack_20) = 0;
}
func_0x00400ab0(lStack_30);
}
}
}
iVar2 = globalReturnsTrueOrFalse();
if (iVar2 == 0) {
iVar2 = func_0x00400b50(puStack_20,&UNK_004013f3,&iStack_a0);
if ((iVar2 == 1) && (iStack_a0 < 10000)) {
iStack_18 = 0;
for (iStack_14 = 0; iStack_14 < iStack_a0; iStack_14 = iStack_14 + 1) {
iStack_18 = iStack_18 + 1;
}
printIntLine(iStack_18);
}
}
else {
iVar2 = func_0x00400b50(puStack_20,&UNK_004013f3,&iStack_9c);
if (iVar2 == 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,322 | void CWE606_Unchecked_Loop_Condition__char_file_12_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109085/CWE606_Unchecked_Loop_Condition__char_file_12.c | CWE606_Unchecked_Loop_Condition__char_file_12_good |
void CWE606_Unchecked_Loop_Condition__char_file_12_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,323 | void CWE606_Unchecked_Loop_Condition__char_file_13_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(GLOBAL_CONST_FIVE==5)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
if(GLOBAL_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);
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109086/CWE606_Unchecked_Loop_Condition__char_file_13.c | CWE606_Unchecked_Loop_Condition__char_file_13_bad |
void CWE606_Unchecked_Loop_Condition__char_file_13_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;
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 (GLOBAL_CONST_FIVE == 5) {
lStack_20 = func_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401364);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
}
if (GLOBAL_CONST_FIVE == 5) {
iVar1 = func_0x00400b50(puStack_18,&UNK_00401373,&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,324 | void CWE606_Unchecked_Loop_Condition__char_file_13_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109086/CWE606_Unchecked_Loop_Condition__char_file_13.c | CWE606_Unchecked_Loop_Condition__char_file_13_good |
void CWE606_Unchecked_Loop_Condition__char_file_13_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,325 | void CWE606_Unchecked_Loop_Condition__char_file_14_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalFive==5)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
if(globalFive==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);
}
}
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109087/CWE606_Unchecked_Loop_Condition__char_file_14.c | CWE606_Unchecked_Loop_Condition__char_file_14_bad |
void CWE606_Unchecked_Loop_Condition__char_file_14_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;
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 (globalFive == 5) {
lStack_20 = func_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401364);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
}
if (globalFive == 5) {
iVar1 = func_0x00400b50(puStack_18,&UNK_00401373,&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,326 | void CWE606_Unchecked_Loop_Condition__char_file_14_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109087/CWE606_Unchecked_Loop_Condition__char_file_14.c | CWE606_Unchecked_Loop_Condition__char_file_14_good |
void CWE606_Unchecked_Loop_Condition__char_file_14_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,327 | void CWE606_Unchecked_Loop_Condition__char_file_15_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
switch(6)
{
case 6:
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
switch(7)
{
case 7:
{
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);
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', "/* 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 */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109088/CWE606_Unchecked_Loop_Condition__char_file_15.c | CWE606_Unchecked_Loop_Condition__char_file_15_bad |
void CWE606_Unchecked_Loop_Condition__char_file_15_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;
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_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401346,&UNK_00401344);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401354);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
iVar1 = func_0x00400b50(puStack_18,&UNK_00401363,&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,328 | void CWE606_Unchecked_Loop_Condition__char_file_15_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109088/CWE606_Unchecked_Loop_Condition__char_file_15.c | CWE606_Unchecked_Loop_Condition__char_file_15_good |
void CWE606_Unchecked_Loop_Condition__char_file_15_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,329 | void CWE606_Unchecked_Loop_Condition__char_file_16_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
while(1)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
break;
}
while(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);
}
}
break;
}
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109089/CWE606_Unchecked_Loop_Condition__char_file_16.c | CWE606_Unchecked_Loop_Condition__char_file_16_bad |
void CWE606_Unchecked_Loop_Condition__char_file_16_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;
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_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401346,&UNK_00401344);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401354);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
iVar1 = func_0x00400b50(puStack_18,&UNK_00401363,&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,330 | void CWE606_Unchecked_Loop_Condition__char_file_16_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109089/CWE606_Unchecked_Loop_Condition__char_file_16.c | CWE606_Unchecked_Loop_Condition__char_file_16_good |
void CWE606_Unchecked_Loop_Condition__char_file_16_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,331 | void CWE606_Unchecked_Loop_Condition__char_file_17_bad()
{
int i,j;
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
for(i = 0; i < 1; i++)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
}
for(j = 0; j < 1; j++)
{
{
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 a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109090/CWE606_Unchecked_Loop_Condition__char_file_17.c | CWE606_Unchecked_Loop_Condition__char_file_17_bad |
void CWE606_Unchecked_Loop_Condition__char_file_17_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;
long lStack_30;
long lStack_28;
undefined8 *puStack_20;
int iStack_18;
int iStack_14;
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_20 = &uStack_98;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
lStack_28 = func_0x00400ac0(puStack_20);
if (1 < 100U - lStack_28) {
lStack_30 = func_0x00400b60(&UNK_00401376,&UNK_00401374);
if (lStack_30 != 0) {
lVar2 = func_0x00400b00((long)puStack_20 + lStack_28,100 - (int)lStack_28,lStack_30);
if (lVar2 == 0) {
printLine(&UNK_00401384);
*(undefined *)(lStack_28 + (long)puStack_20) = 0;
}
func_0x00400ab0(lStack_30);
}
}
}
for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) {
iVar1 = func_0x00400b50(puStack_20,&UNK_00401393,&iStack_9c);
if (iVar1 == 1) {
iStack_18 = 0;
for (iStack_14 = 0; iStack_14 < iStack_9c; iStack_14 = iStack_14 + 1) {
iStack_18 = iStack_18 + 1;
}
printIntLine(iStack_18);
}
}
return;
}
| ['gcc'] |
5,332 | void CWE606_Unchecked_Loop_Condition__char_file_17_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109090/CWE606_Unchecked_Loop_Condition__char_file_17.c | CWE606_Unchecked_Loop_Condition__char_file_17_good |
void CWE606_Unchecked_Loop_Condition__char_file_17_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,333 | void CWE606_Unchecked_Loop_Condition__char_file_18_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
goto source;
source:
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
goto sink;
sink:
{
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 a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109091/CWE606_Unchecked_Loop_Condition__char_file_18.c | CWE606_Unchecked_Loop_Condition__char_file_18_bad |
void CWE606_Unchecked_Loop_Condition__char_file_18_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;
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_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401346,&UNK_00401344);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401354);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
iVar1 = func_0x00400b50(puStack_18,&UNK_00401363,&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,334 | void CWE606_Unchecked_Loop_Condition__char_file_18_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109091/CWE606_Unchecked_Loop_Condition__char_file_18.c | CWE606_Unchecked_Loop_Condition__char_file_18_good |
void CWE606_Unchecked_Loop_Condition__char_file_18_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,335 | void CWE606_Unchecked_Loop_Condition__char_file_21_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
badStatic = 1; /* true */
badSink(data);
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* true */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109092/CWE606_Unchecked_Loop_Condition__char_file_21.c | CWE606_Unchecked_Loop_Condition__char_file_21_bad |
void CWE606_Unchecked_Loop_Condition__char_file_21_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;
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_0x00400ac0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401369,&UNK_00401367);
if (lStack_20 != 0) {
lVar1 = func_0x00400b00((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401377);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
func_0x00400ab0(lStack_20);
}
}
badStatic = 1;
badSink(puStack_10);
return;
}
| ['gcc'] |
5,336 | void CWE606_Unchecked_Loop_Condition__char_file_21_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109092/CWE606_Unchecked_Loop_Condition__char_file_21.c | CWE606_Unchecked_Loop_Condition__char_file_21_good |
void CWE606_Unchecked_Loop_Condition__char_file_21_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
5,337 | void CWE606_Unchecked_Loop_Condition__char_file_22_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
CWE606_Unchecked_Loop_Condition__char_file_22_badGlobal = 1; /* true */
CWE606_Unchecked_Loop_Condition__char_file_22_badSink(data);
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* true */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109093/CWE606_Unchecked_Loop_Condition__char_file_22a.c | CWE606_Unchecked_Loop_Condition__char_file_22_bad |
void CWE606_Unchecked_Loop_Condition__char_file_22_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;
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_0x00400ac0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401366,&UNK_00401364);
if (lStack_20 != 0) {
lVar1 = func_0x00400b00((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401374);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
func_0x00400ab0(lStack_20);
}
}
CWE606_Unchecked_Loop_Condition__char_file_22_badGlobal = 1;
CWE606_Unchecked_Loop_Condition__char_file_22_badSink(puStack_10);
return;
}
| ['gcc'] |
5,338 | void CWE606_Unchecked_Loop_Condition__char_file_22_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109093/CWE606_Unchecked_Loop_Condition__char_file_22a.c | CWE606_Unchecked_Loop_Condition__char_file_22_good |
void CWE606_Unchecked_Loop_Condition__char_file_22_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
5,339 | void CWE606_Unchecked_Loop_Condition__char_file_22_badSink(char * data)
{
if(CWE606_Unchecked_Loop_Condition__char_file_22_badGlobal)
{
{
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/109093/CWE606_Unchecked_Loop_Condition__char_file_22b.c | CWE606_Unchecked_Loop_Condition__char_file_22_badSink |
void CWE606_Unchecked_Loop_Condition__char_file_22_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__char_file_22_badGlobal != 0) {
iVar1 = func_0x00400b50(param_1,&UNK_00401364,&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,340 | void CWE606_Unchecked_Loop_Condition__char_file_22_goodB2G1Sink(char * data)
{
if(CWE606_Unchecked_Loop_Condition__char_file_22_goodB2G1Global)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
{
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);
}
}
}
}
} | ['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* 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/109093/CWE606_Unchecked_Loop_Condition__char_file_22b.c | CWE606_Unchecked_Loop_Condition__char_file_22_goodB2G1Sink |
void CWE606_Unchecked_Loop_Condition__char_file_22_goodB2G1Sink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__char_file_22_goodB2G1Global == 0) {
iVar1 = func_0x00400b50(param_1,&UNK_00401639,&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);
}
}
else {
printLine(&UNK_00401624);
}
return;
}
| ['gcc'] |
5,341 | void CWE606_Unchecked_Loop_Condition__char_file_22_goodB2G2Sink(char * data)
{
if(CWE606_Unchecked_Loop_Condition__char_file_22_goodB2G2Global)
{
{
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/109093/CWE606_Unchecked_Loop_Condition__char_file_22b.c | CWE606_Unchecked_Loop_Condition__char_file_22_goodB2G2Sink |
void CWE606_Unchecked_Loop_Condition__char_file_22_goodB2G2Sink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__char_file_22_goodB2G2Global != 0) {
iVar1 = func_0x00400b50(param_1,&UNK_00401639,&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,342 | void CWE606_Unchecked_Loop_Condition__char_file_22_goodG2BSink(char * data)
{
if(CWE606_Unchecked_Loop_Condition__char_file_22_goodG2BGlobal)
{
{
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/109093/CWE606_Unchecked_Loop_Condition__char_file_22b.c | CWE606_Unchecked_Loop_Condition__char_file_22_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_22_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__char_file_22_goodG2BGlobal != 0) {
iVar1 = func_0x00400b50(param_1,&UNK_00401639,&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,343 | void CWE606_Unchecked_Loop_Condition__char_file_31_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
{
char * dataCopy = data;
char * data = dataCopy;
{
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 a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109094/CWE606_Unchecked_Loop_Condition__char_file_31.c | CWE606_Unchecked_Loop_Condition__char_file_31_bad |
void CWE606_Unchecked_Loop_Condition__char_file_31_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_38;
undefined8 *puStack_30;
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
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_18 = &uStack_a8;
lStack_20 = func_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401364);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
puStack_30 = puStack_18;
puStack_38 = puStack_18;
iVar1 = func_0x00400b50(puStack_18,&UNK_00401373,&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,344 | void CWE606_Unchecked_Loop_Condition__char_file_31_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109094/CWE606_Unchecked_Loop_Condition__char_file_31.c | CWE606_Unchecked_Loop_Condition__char_file_31_good |
void CWE606_Unchecked_Loop_Condition__char_file_31_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,345 | void CWE606_Unchecked_Loop_Condition__char_file_32_bad()
{
char * data;
char * *dataPtr1 = &data;
char * *dataPtr2 = &data;
char dataBuffer[100] = "";
data = dataBuffer;
{
char * data = *dataPtr1;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
*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 a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109095/CWE606_Unchecked_Loop_Condition__char_file_32.c | CWE606_Unchecked_Loop_Condition__char_file_32_bad |
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void CWE606_Unchecked_Loop_Condition__char_file_32_bad(void)
{
int iVar1;
long lVar2;
int iStack_bc;
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;
undefined8 *puStack_48;
undefined8 *puStack_40;
long lStack_38;
long lStack_30;
undefined8 *puStack_28;
undefined8 **ppuStack_20;
undefined8 **ppuStack_18;
int iStack_10;
int iStack_c;
ppuStack_18 = &puStack_48;
ppuStack_20 = &puStack_48;
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_48 = &uStack_b8;
puStack_28 = puStack_48;
lStack_30 = func_0x00400ac0(puStack_48);
if (1 < 100U - lStack_30) {
lStack_38 = func_0x00400b60(&UNK_00401386,&UNK_00401384);
if (lStack_38 != 0) {
lVar2 = func_0x00400b00((long)puStack_28 + lStack_30,100 - (int)lStack_30,lStack_38);
if (lVar2 == 0) {
printLine(&UNK_00401394);
*(undefined *)(lStack_30 + (long)puStack_28) = 0;
}
func_0x00400ab0(lStack_38);
}
}
*ppuStack_18 = puStack_28;
puStack_40 = *ppuStack_20;
iVar1 = func_0x00400b50(puStack_40,&UNK_004013a3,&iStack_bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,346 | void CWE606_Unchecked_Loop_Condition__char_file_32_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109095/CWE606_Unchecked_Loop_Condition__char_file_32.c | CWE606_Unchecked_Loop_Condition__char_file_32_good |
void CWE606_Unchecked_Loop_Condition__char_file_32_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,347 | void CWE606_Unchecked_Loop_Condition__char_file_34_bad()
{
char * data;
CWE606_Unchecked_Loop_Condition__char_file_34_unionType myUnion;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
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 a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109097/CWE606_Unchecked_Loop_Condition__char_file_34.c | CWE606_Unchecked_Loop_Condition__char_file_34_bad |
void CWE606_Unchecked_Loop_Condition__char_file_34_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_38;
undefined8 *puStack_30;
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
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_18 = &uStack_a8;
lStack_20 = func_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lStack_28 != 0) {
lVar2 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401364);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
puStack_38 = puStack_18;
puStack_30 = puStack_18;
iVar1 = func_0x00400b50(puStack_18,&UNK_00401373,&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,348 | void CWE606_Unchecked_Loop_Condition__char_file_34_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109097/CWE606_Unchecked_Loop_Condition__char_file_34.c | CWE606_Unchecked_Loop_Condition__char_file_34_good |
void CWE606_Unchecked_Loop_Condition__char_file_34_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,349 | void CWE606_Unchecked_Loop_Condition__char_file_41_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
badSink(data);
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109098/CWE606_Unchecked_Loop_Condition__char_file_41.c | CWE606_Unchecked_Loop_Condition__char_file_41_bad |
void CWE606_Unchecked_Loop_Condition__char_file_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_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_0x00400ac0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401349,&UNK_00401347);
if (lStack_20 != 0) {
lVar1 = func_0x00400b00((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401357);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
func_0x00400ab0(lStack_20);
}
}
badSink(puStack_10);
return;
}
| ['gcc'] |
5,350 | void CWE606_Unchecked_Loop_Condition__char_file_41_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109098/CWE606_Unchecked_Loop_Condition__char_file_41.c | CWE606_Unchecked_Loop_Condition__char_file_41_good |
void CWE606_Unchecked_Loop_Condition__char_file_41_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,351 | void CWE606_Unchecked_Loop_Condition__char_file_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/109099/CWE606_Unchecked_Loop_Condition__char_file_42.c | CWE606_Unchecked_Loop_Condition__char_file_42_bad |
void CWE606_Unchecked_Loop_Condition__char_file_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_0x00400b50(puStack_18,&UNK_00401373,&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,352 | void CWE606_Unchecked_Loop_Condition__char_file_42_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109099/CWE606_Unchecked_Loop_Condition__char_file_42.c | CWE606_Unchecked_Loop_Condition__char_file_42_good |
void CWE606_Unchecked_Loop_Condition__char_file_42_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,353 | void CWE606_Unchecked_Loop_Condition__char_file_44_bad()
{
char * data;
/* define a function pointer */
void (*funcPtr) (char *) = badSink;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* 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/109101/CWE606_Unchecked_Loop_Condition__char_file_44.c | CWE606_Unchecked_Loop_Condition__char_file_44_bad |
void CWE606_Unchecked_Loop_Condition__char_file_44_bad(void)
{
long lVar1;
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;
code *pcStack_10;
pcStack_10 = badSink;
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_0x00400ac0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401369,&UNK_00401367);
if (lStack_28 != 0) {
lVar1 = func_0x00400b00((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28);
if (lVar1 == 0) {
printLine(&UNK_00401377);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
func_0x00400ab0(lStack_28);
}
}
(*pcStack_10)(puStack_18);
return;
}
| ['gcc'] |
5,354 | void CWE606_Unchecked_Loop_Condition__char_file_44_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109101/CWE606_Unchecked_Loop_Condition__char_file_44.c | CWE606_Unchecked_Loop_Condition__char_file_44_good |
void CWE606_Unchecked_Loop_Condition__char_file_44_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,355 | void CWE606_Unchecked_Loop_Condition__char_file_45_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
CWE606_Unchecked_Loop_Condition__char_file_45_badData = data;
badSink();
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109102/CWE606_Unchecked_Loop_Condition__char_file_45.c | CWE606_Unchecked_Loop_Condition__char_file_45_bad |
void CWE606_Unchecked_Loop_Condition__char_file_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_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_0x00400ac0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401359,&UNK_00401357);
if (lStack_20 != 0) {
lVar1 = func_0x00400b00((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401367);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
func_0x00400ab0(lStack_20);
}
}
CWE606_Unchecked_Loop_Condition__char_file_45_badData = puStack_10;
badSink();
return;
}
| ['gcc'] |
5,356 | void CWE606_Unchecked_Loop_Condition__char_file_45_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109102/CWE606_Unchecked_Loop_Condition__char_file_45.c | CWE606_Unchecked_Loop_Condition__char_file_45_good |
void CWE606_Unchecked_Loop_Condition__char_file_45_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,357 | void CWE606_Unchecked_Loop_Condition__char_file_51_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
CWE606_Unchecked_Loop_Condition__char_file_51b_badSink(data);
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109103/CWE606_Unchecked_Loop_Condition__char_file_51a.c | CWE606_Unchecked_Loop_Condition__char_file_51_bad |
void CWE606_Unchecked_Loop_Condition__char_file_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_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_0x00400ac0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401346,&UNK_00401344);
if (lStack_20 != 0) {
lVar1 = func_0x00400b00((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401354);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
func_0x00400ab0(lStack_20);
}
}
CWE606_Unchecked_Loop_Condition__char_file_51b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,358 | void CWE606_Unchecked_Loop_Condition__char_file_51_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109103/CWE606_Unchecked_Loop_Condition__char_file_51a.c | CWE606_Unchecked_Loop_Condition__char_file_51_good |
void CWE606_Unchecked_Loop_Condition__char_file_51_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,359 | void CWE606_Unchecked_Loop_Condition__char_file_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/109103/CWE606_Unchecked_Loop_Condition__char_file_51b.c | CWE606_Unchecked_Loop_Condition__char_file_51b_badSink |
void CWE606_Unchecked_Loop_Condition__char_file_51b_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(param_1,&UNK_00401344,&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,360 | void CWE606_Unchecked_Loop_Condition__char_file_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/109103/CWE606_Unchecked_Loop_Condition__char_file_51b.c | CWE606_Unchecked_Loop_Condition__char_file_51b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_51b_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(param_1,&UNK_00401454,&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,361 | void CWE606_Unchecked_Loop_Condition__char_file_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/109103/CWE606_Unchecked_Loop_Condition__char_file_51b.c | CWE606_Unchecked_Loop_Condition__char_file_51b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_file_51b_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(param_1,&UNK_00401454,&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,362 | void CWE606_Unchecked_Loop_Condition__char_file_52_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
CWE606_Unchecked_Loop_Condition__char_file_52b_badSink(data);
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109104/CWE606_Unchecked_Loop_Condition__char_file_52a.c | CWE606_Unchecked_Loop_Condition__char_file_52_bad |
void CWE606_Unchecked_Loop_Condition__char_file_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_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_0x00400ac0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401366,&UNK_00401364);
if (lStack_20 != 0) {
lVar1 = func_0x00400b00((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401374);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
func_0x00400ab0(lStack_20);
}
}
CWE606_Unchecked_Loop_Condition__char_file_52b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,363 | void CWE606_Unchecked_Loop_Condition__char_file_52_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109104/CWE606_Unchecked_Loop_Condition__char_file_52a.c | CWE606_Unchecked_Loop_Condition__char_file_52_good |
void CWE606_Unchecked_Loop_Condition__char_file_52_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,364 | void CWE606_Unchecked_Loop_Condition__char_file_52b_goodG2BSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109104/CWE606_Unchecked_Loop_Condition__char_file_52b.c | CWE606_Unchecked_Loop_Condition__char_file_52b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_52b_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,365 | void CWE606_Unchecked_Loop_Condition__char_file_52b_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_52c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109104/CWE606_Unchecked_Loop_Condition__char_file_52b.c | CWE606_Unchecked_Loop_Condition__char_file_52b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_file_52b_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_52c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,366 | void CWE606_Unchecked_Loop_Condition__char_file_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/109104/CWE606_Unchecked_Loop_Condition__char_file_52c.c | CWE606_Unchecked_Loop_Condition__char_file_52c_badSink |
void CWE606_Unchecked_Loop_Condition__char_file_52c_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(param_1,&UNK_00401364,&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,367 | void CWE606_Unchecked_Loop_Condition__char_file_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/109104/CWE606_Unchecked_Loop_Condition__char_file_52c.c | CWE606_Unchecked_Loop_Condition__char_file_52c_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_52c_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(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,368 | void CWE606_Unchecked_Loop_Condition__char_file_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/109104/CWE606_Unchecked_Loop_Condition__char_file_52c.c | CWE606_Unchecked_Loop_Condition__char_file_52c_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_file_52c_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(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,369 | void CWE606_Unchecked_Loop_Condition__char_file_53_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
CWE606_Unchecked_Loop_Condition__char_file_53b_badSink(data);
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109105/CWE606_Unchecked_Loop_Condition__char_file_53a.c | CWE606_Unchecked_Loop_Condition__char_file_53_bad |
void CWE606_Unchecked_Loop_Condition__char_file_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_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_0x00400ac0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401386,&UNK_00401384);
if (lStack_20 != 0) {
lVar1 = func_0x00400b00((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401394);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
func_0x00400ab0(lStack_20);
}
}
CWE606_Unchecked_Loop_Condition__char_file_53b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,370 | void CWE606_Unchecked_Loop_Condition__char_file_53_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109105/CWE606_Unchecked_Loop_Condition__char_file_53a.c | CWE606_Unchecked_Loop_Condition__char_file_53_good |
void CWE606_Unchecked_Loop_Condition__char_file_53_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,371 | void CWE606_Unchecked_Loop_Condition__char_file_53b_badSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_53c_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109105/CWE606_Unchecked_Loop_Condition__char_file_53b.c | CWE606_Unchecked_Loop_Condition__char_file_53b_badSink |
void CWE606_Unchecked_Loop_Condition__char_file_53b_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_53c_badSink(param_1);
return;
}
| ['gcc'] |
5,372 | void CWE606_Unchecked_Loop_Condition__char_file_53b_goodG2BSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109105/CWE606_Unchecked_Loop_Condition__char_file_53b.c | CWE606_Unchecked_Loop_Condition__char_file_53b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_53b_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,373 | void CWE606_Unchecked_Loop_Condition__char_file_53b_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_53c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109105/CWE606_Unchecked_Loop_Condition__char_file_53b.c | CWE606_Unchecked_Loop_Condition__char_file_53b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_file_53b_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_53c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,374 | void CWE606_Unchecked_Loop_Condition__char_file_53c_badSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_53d_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109105/CWE606_Unchecked_Loop_Condition__char_file_53c.c | CWE606_Unchecked_Loop_Condition__char_file_53c_badSink |
void CWE606_Unchecked_Loop_Condition__char_file_53c_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_53d_badSink(param_1);
return;
}
| ['gcc'] |
5,375 | void CWE606_Unchecked_Loop_Condition__char_file_53c_goodG2BSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109105/CWE606_Unchecked_Loop_Condition__char_file_53c.c | CWE606_Unchecked_Loop_Condition__char_file_53c_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_53c_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,376 | void CWE606_Unchecked_Loop_Condition__char_file_53c_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_53d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109105/CWE606_Unchecked_Loop_Condition__char_file_53c.c | CWE606_Unchecked_Loop_Condition__char_file_53c_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_file_53c_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_53d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,377 | void CWE606_Unchecked_Loop_Condition__char_file_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/109105/CWE606_Unchecked_Loop_Condition__char_file_53d.c | CWE606_Unchecked_Loop_Condition__char_file_53d_badSink |
void CWE606_Unchecked_Loop_Condition__char_file_53d_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(param_1,&UNK_00401384,&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,378 | void CWE606_Unchecked_Loop_Condition__char_file_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/109105/CWE606_Unchecked_Loop_Condition__char_file_53d.c | CWE606_Unchecked_Loop_Condition__char_file_53d_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_53d_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(param_1,&UNK_004014c4,&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,379 | void CWE606_Unchecked_Loop_Condition__char_file_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/109105/CWE606_Unchecked_Loop_Condition__char_file_53d.c | CWE606_Unchecked_Loop_Condition__char_file_53d_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_file_53d_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(param_1,&UNK_004014c4,&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,380 | void CWE606_Unchecked_Loop_Condition__char_file_54_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
CWE606_Unchecked_Loop_Condition__char_file_54b_badSink(data);
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54a.c | CWE606_Unchecked_Loop_Condition__char_file_54_bad |
void CWE606_Unchecked_Loop_Condition__char_file_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_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_0x00400ac0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401396,&UNK_00401394);
if (lStack_20 != 0) {
lVar1 = func_0x00400b00((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_004013a4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
func_0x00400ab0(lStack_20);
}
}
CWE606_Unchecked_Loop_Condition__char_file_54b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,381 | void CWE606_Unchecked_Loop_Condition__char_file_54_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54a.c | CWE606_Unchecked_Loop_Condition__char_file_54_good |
void CWE606_Unchecked_Loop_Condition__char_file_54_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,382 | void CWE606_Unchecked_Loop_Condition__char_file_54b_badSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_54c_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54b.c | CWE606_Unchecked_Loop_Condition__char_file_54b_badSink |
void CWE606_Unchecked_Loop_Condition__char_file_54b_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_54c_badSink(param_1);
return;
}
| ['gcc'] |
5,383 | void CWE606_Unchecked_Loop_Condition__char_file_54b_goodG2BSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54b.c | CWE606_Unchecked_Loop_Condition__char_file_54b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_54b_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,384 | void CWE606_Unchecked_Loop_Condition__char_file_54b_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_54c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54b.c | CWE606_Unchecked_Loop_Condition__char_file_54b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_file_54b_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_54c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,385 | void CWE606_Unchecked_Loop_Condition__char_file_54c_badSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_54d_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54c.c | CWE606_Unchecked_Loop_Condition__char_file_54c_badSink |
void CWE606_Unchecked_Loop_Condition__char_file_54c_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_54d_badSink(param_1);
return;
}
| ['gcc'] |
5,386 | void CWE606_Unchecked_Loop_Condition__char_file_54c_goodG2BSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54c.c | CWE606_Unchecked_Loop_Condition__char_file_54c_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_54c_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,387 | void CWE606_Unchecked_Loop_Condition__char_file_54c_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_54d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54c.c | CWE606_Unchecked_Loop_Condition__char_file_54c_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_file_54c_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_54d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,388 | void CWE606_Unchecked_Loop_Condition__char_file_54d_badSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_54e_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54d.c | CWE606_Unchecked_Loop_Condition__char_file_54d_badSink |
void CWE606_Unchecked_Loop_Condition__char_file_54d_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_54e_badSink(param_1);
return;
}
| ['gcc'] |
5,389 | void CWE606_Unchecked_Loop_Condition__char_file_54d_goodG2BSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54d.c | CWE606_Unchecked_Loop_Condition__char_file_54d_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_54d_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,390 | void CWE606_Unchecked_Loop_Condition__char_file_54d_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_file_54e_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109106/CWE606_Unchecked_Loop_Condition__char_file_54d.c | CWE606_Unchecked_Loop_Condition__char_file_54d_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_file_54d_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_file_54e_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,391 | void CWE606_Unchecked_Loop_Condition__char_file_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/109106/CWE606_Unchecked_Loop_Condition__char_file_54e.c | CWE606_Unchecked_Loop_Condition__char_file_54e_badSink |
void CWE606_Unchecked_Loop_Condition__char_file_54e_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(param_1,&UNK_00401394,&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,392 | void CWE606_Unchecked_Loop_Condition__char_file_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/109106/CWE606_Unchecked_Loop_Condition__char_file_54e.c | CWE606_Unchecked_Loop_Condition__char_file_54e_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_file_54e_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b50(param_1,&UNK_00401504,&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,393 | void CWE606_Unchecked_Loop_Condition__char_file_61_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
data = CWE606_Unchecked_Loop_Condition__char_file_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/109107/CWE606_Unchecked_Loop_Condition__char_file_61a.c | CWE606_Unchecked_Loop_Condition__char_file_61_bad |
void CWE606_Unchecked_Loop_Condition__char_file_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_file_61b_badSource(puStack_18);
iVar1 = func_0x00400b50(puStack_18,&UNK_00401354,&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,394 | void CWE606_Unchecked_Loop_Condition__char_file_61_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109107/CWE606_Unchecked_Loop_Condition__char_file_61a.c | CWE606_Unchecked_Loop_Condition__char_file_61_good |
void CWE606_Unchecked_Loop_Condition__char_file_61_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,395 | char * CWE606_Unchecked_Loop_Condition__char_file_61b_badSource(char * data)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
return data;
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109107/CWE606_Unchecked_Loop_Condition__char_file_61b.c | CWE606_Unchecked_Loop_Condition__char_file_61b_badSource |
long CWE606_Unchecked_Loop_Condition__char_file_61b_badSource(long param_1)
{
long lVar1;
long lVar2;
long lVar3;
lVar1 = func_0x00400ac0(param_1);
if (1 < 100U - lVar1) {
lVar2 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lVar2 != 0) {
lVar3 = func_0x00400b00(param_1 + lVar1,100 - (int)lVar1,lVar2);
if (lVar3 == 0) {
printLine(&UNK_00401364);
*(undefined *)(lVar1 + param_1) = 0;
}
func_0x00400ab0(lVar2);
}
}
return param_1;
}
| ['gcc'] |
5,396 | char * CWE606_Unchecked_Loop_Condition__char_file_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/109107/CWE606_Unchecked_Loop_Condition__char_file_61b.c | CWE606_Unchecked_Loop_Condition__char_file_61b_goodG2BSource |
undefined2 * CWE606_Unchecked_Loop_Condition__char_file_61b_goodG2BSource(undefined2 *param_1)
{
*param_1 = 0x3531;
*(undefined *)(param_1 + 1) = 0;
return param_1;
}
| ['gcc'] |
5,397 | char * CWE606_Unchecked_Loop_Condition__char_file_61b_goodB2GSource(char * data)
{
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
return data;
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109107/CWE606_Unchecked_Loop_Condition__char_file_61b.c | CWE606_Unchecked_Loop_Condition__char_file_61b_goodB2GSource |
long CWE606_Unchecked_Loop_Condition__char_file_61b_goodB2GSource(long param_1)
{
long lVar1;
long lVar2;
long lVar3;
lVar1 = func_0x00400ac0(param_1);
if (1 < 100U - lVar1) {
lVar2 = func_0x00400b60(&UNK_00401476,&UNK_00401474);
if (lVar2 != 0) {
lVar3 = func_0x00400b00(param_1 + lVar1,100 - (int)lVar1,lVar2);
if (lVar3 == 0) {
printLine(&UNK_00401484);
*(undefined *)(lVar1 + param_1) = 0;
}
func_0x00400ab0(lVar2);
}
}
return param_1;
}
| ['gcc'] |
5,398 | void CWE606_Unchecked_Loop_Condition__char_file_63_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = strlen(data);
FILE * pFile;
/* if there is room in data, attempt to read the input from a file */
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
/* POTENTIAL FLAW: Read data from a file */
if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
fclose(pFile);
}
}
}
CWE606_Unchecked_Loop_Condition__char_file_63b_badSink(&data);
} | ['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109109/CWE606_Unchecked_Loop_Condition__char_file_63a.c | CWE606_Unchecked_Loop_Condition__char_file_63_bad |
void CWE606_Unchecked_Loop_Condition__char_file_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_20;
long lStack_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_20 = &uStack_88;
lStack_10 = func_0x00400ac0(puStack_20);
if (1 < 100U - lStack_10) {
lStack_18 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lStack_18 != 0) {
lVar1 = func_0x00400b00((long)puStack_20 + lStack_10,100 - (int)lStack_10,lStack_18);
if (lVar1 == 0) {
printLine(&UNK_00401364);
*(undefined *)(lStack_10 + (long)puStack_20) = 0;
}
func_0x00400ab0(lStack_18);
}
}
CWE606_Unchecked_Loop_Condition__char_file_63b_badSink(&puStack_20);
return;
}
| ['gcc'] |
5,399 | void CWE606_Unchecked_Loop_Condition__char_file_63_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109109/CWE606_Unchecked_Loop_Condition__char_file_63a.c | CWE606_Unchecked_Loop_Condition__char_file_63_good |
void CWE606_Unchecked_Loop_Condition__char_file_63_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.