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,800 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_goodG2BSink(wchar_t * data)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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/109297/CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b10(param_1,&UNK_00401424,&iStack_14);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,801 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_goodB2GSink(wchar_t * data)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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/109297/CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b10(param_1,&UNK_00401424,&iStack_14);
if ((iVar1 == 1) && (iStack_14 < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,802 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Append input from an environment variable to data */
size_t dataLen = wcslen(data);
wchar_t * environment = GETENV(ENV_VARIABLE);
/* If there is data in the environment variable */
if (environment != NULL)
{
/* POTENTIAL FLAW: Read data from an environment variable */
wcsncat(data+dataLen, environment, 100-dataLen-1);
}
}
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_badSink(data);
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
long lStack_20;
long lStack_18;
undefined8 *puStack_10;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar2 = auStack_1a8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_10 = &uStack_1b8;
lStack_18 = func_0x00400ab0(puStack_10);
lStack_20 = func_0x00400a60(&UNK_004012f4);
if (lStack_20 != 0) {
func_0x00400a80(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18);
}
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,803 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,804 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_badSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_badSink(param_1);
return;
}
| ['gcc'] |
5,805 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_goodG2BSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,806 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_goodB2GSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54b_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,807 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_badSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_badSink(param_1);
return;
}
| ['gcc'] |
5,808 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_goodG2BSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,809 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_goodB2GSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54c_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,810 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_badSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_badSink(param_1);
return;
}
| ['gcc'] |
5,811 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_goodG2BSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,812 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_goodB2GSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54d_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,813 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_badSink(wchar_t * data)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400ae0(param_1,&UNK_004012f4,&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,814 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_goodG2BSink(wchar_t * data)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b10(param_1,&UNK_00401464,&iStack_14);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,815 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_goodB2GSink(wchar_t * data)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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/109298/CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_54e_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b10(param_1,&UNK_00401464,&iStack_14);
if ((iVar1 == 1) && (iStack_14 < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,816 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_61_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
data = CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_badSource(data);
{
int i, n, intVariable;
if (swscanf(data, L"%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/109299/CWE606_Unchecked_Loop_Condition__wchar_t_environment_61a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_61_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_61_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1ac;
undefined8 uStack_1a8;
undefined8 uStack_1a0;
undefined8 auStack_198 [48];
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1a8 = 0;
uStack_1a0 = 0;
puVar3 = auStack_198;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1a8;
puStack_18 = (undefined8 *)
CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_badSource(puStack_18);
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012a4,&iStack_1ac);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1ac; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,817 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_61_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109299/CWE606_Unchecked_Loop_Condition__wchar_t_environment_61a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_61_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_61_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,818 | wchar_t * CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_badSource(wchar_t * data)
{
{
/* Append input from an environment variable to data */
size_t dataLen = wcslen(data);
wchar_t * environment = GETENV(ENV_VARIABLE);
/* If there is data in the environment variable */
if (environment != NULL)
{
/* POTENTIAL FLAW: Read data from an environment variable */
wcsncat(data+dataLen, environment, 100-dataLen-1);
}
}
return data;
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109299/CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_badSource |
long CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_badSource(long param_1)
{
long lVar1;
long lVar2;
lVar1 = func_0x00400ab0(param_1);
lVar2 = func_0x00400a60(&UNK_004012a4);
if (lVar2 != 0) {
func_0x00400a80(lVar1 * 4 + param_1,lVar2,99 - lVar1);
}
return param_1;
}
| ['gcc'] |
5,819 | wchar_t * CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_goodG2BSource(wchar_t * data)
{
/* FIX: Set data to a number less than MAX_LOOP */
wcscpy(data, L"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/109299/CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_goodG2BSource |
undefined8
CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_goodG2BSource(undefined8 param_1)
{
func_0x00400b20(param_1,&UNK_004013d4);
return param_1;
}
| ['gcc'] |
5,820 | wchar_t * CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_goodB2GSource(wchar_t * data)
{
{
/* Append input from an environment variable to data */
size_t dataLen = wcslen(data);
wchar_t * environment = GETENV(ENV_VARIABLE);
/* If there is data in the environment variable */
if (environment != NULL)
{
/* POTENTIAL FLAW: Read data from an environment variable */
wcsncat(data+dataLen, environment, 100-dataLen-1);
}
}
return data;
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109299/CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_goodB2GSource |
long CWE606_Unchecked_Loop_Condition__wchar_t_environment_61b_goodB2GSource(long param_1)
{
long lVar1;
long lVar2;
lVar1 = func_0x00400ae0(param_1);
lVar2 = func_0x00400a90(&UNK_004013e0);
if (lVar2 != 0) {
func_0x00400ab0(lVar1 * 4 + param_1,lVar2,99 - lVar1);
}
return param_1;
}
| ['gcc'] |
5,821 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_63_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Append input from an environment variable to data */
size_t dataLen = wcslen(data);
wchar_t * environment = GETENV(ENV_VARIABLE);
/* If there is data in the environment variable */
if (environment != NULL)
{
/* POTENTIAL FLAW: Read data from an environment variable */
wcsncat(data+dataLen, environment, 100-dataLen-1);
}
}
CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_badSink(&data);
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109301/CWE606_Unchecked_Loop_Condition__wchar_t_environment_63a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_63_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_63_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
undefined8 *puStack_20;
long lStack_18;
long lStack_10;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar2 = auStack_1a8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_20 = &uStack_1b8;
lStack_10 = func_0x00400ab0(puStack_20);
lStack_18 = func_0x00400a60(&UNK_004012a4);
if (lStack_18 != 0) {
func_0x00400a80(lStack_10 * 4 + (long)puStack_20,lStack_18,99 - lStack_10);
}
CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_badSink(&puStack_20);
return;
}
| ['gcc'] |
5,822 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_63_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109301/CWE606_Unchecked_Loop_Condition__wchar_t_environment_63a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_63_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_63_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,823 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_badSink(wchar_t * * dataPtr)
{
wchar_t * data = *dataPtr;
{
int i, n, intVariable;
if (swscanf(data, L"%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/109301/CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_badSink(undefined8 *param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *param_1;
iVar1 = func_0x00400ae0(uStack_18,&UNK_004012a4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,824 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_goodG2BSink(wchar_t * * dataPtr)
{
wchar_t * data = *dataPtr;
{
int i, n, intVariable;
if (swscanf(data, L"%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/109301/CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_goodG2BSink(undefined8 *param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *param_1;
iVar1 = func_0x00400b10(uStack_18,&UNK_004013d4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,825 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_goodB2GSink(wchar_t * * dataPtr)
{
wchar_t * data = *dataPtr;
{
int i, n, intVariable;
if (swscanf(data, L"%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/109301/CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_63b_goodB2GSink(undefined8 *param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *param_1;
iVar1 = func_0x00400b10(uStack_18,&UNK_004013d4,&iStack_1c);
if ((iVar1 == 1) && (iStack_1c < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,826 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_64_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Append input from an environment variable to data */
size_t dataLen = wcslen(data);
wchar_t * environment = GETENV(ENV_VARIABLE);
/* If there is data in the environment variable */
if (environment != NULL)
{
/* POTENTIAL FLAW: Read data from an environment variable */
wcsncat(data+dataLen, environment, 100-dataLen-1);
}
}
CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_badSink(&data);
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109302/CWE606_Unchecked_Loop_Condition__wchar_t_environment_64a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_64_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_64_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
undefined8 *puStack_20;
long lStack_18;
long lStack_10;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar2 = auStack_1a8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_20 = &uStack_1b8;
lStack_10 = func_0x00400ab0(puStack_20);
lStack_18 = func_0x00400a60(&UNK_004012b4);
if (lStack_18 != 0) {
func_0x00400a80(lStack_10 * 4 + (long)puStack_20,lStack_18,99 - lStack_10);
}
CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_badSink(&puStack_20);
return;
}
| ['gcc'] |
5,827 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_64_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109302/CWE606_Unchecked_Loop_Condition__wchar_t_environment_64a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_64_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_64_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,828 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_badSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
wchar_t * * dataPtr = (wchar_t * *)dataVoidPtr;
/* dereference dataPtr into data */
wchar_t * data = (*dataPtr);
{
int i, n, intVariable;
if (swscanf(data, L"%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109302/CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_badSink(undefined8 *param_1)
{
int iVar1;
int iStack_24;
undefined8 uStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_20 = *param_1;
puStack_18 = param_1;
iVar1 = func_0x00400ae0(uStack_20,&UNK_004012b4,&iStack_24);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_24; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,829 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_goodG2BSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
wchar_t * * dataPtr = (wchar_t * *)dataVoidPtr;
/* dereference dataPtr into data */
wchar_t * data = (*dataPtr);
{
int i, n, intVariable;
if (swscanf(data, L"%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109302/CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_goodG2BSink(undefined8 *param_1)
{
int iVar1;
int iStack_24;
undefined8 uStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_20 = *param_1;
puStack_18 = param_1;
iVar1 = func_0x00400b10(uStack_20,&UNK_004013e4,&iStack_24);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_24; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,830 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_goodB2GSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
wchar_t * * dataPtr = (wchar_t * *)dataVoidPtr;
/* dereference dataPtr into data */
wchar_t * data = (*dataPtr);
{
int i, n, intVariable;
if (swscanf(data, L"%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109302/CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_64b_goodB2GSink(undefined8 *param_1)
{
int iVar1;
int iStack_24;
undefined8 uStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_20 = *param_1;
puStack_18 = param_1;
iVar1 = func_0x00400b10(uStack_20,&UNK_004013e4,&iStack_24);
if ((iVar1 == 1) && (iStack_24 < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_24; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,831 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_66_bad()
{
wchar_t * data;
wchar_t * dataArray[5];
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Append input from an environment variable to data */
size_t dataLen = wcslen(data);
wchar_t * environment = GETENV(ENV_VARIABLE);
/* If there is data in the environment variable */
if (environment != NULL)
{
/* POTENTIAL FLAW: Read data from an environment variable */
wcsncat(data+dataLen, environment, 100-dataLen-1);
}
}
/* put data in array */
dataArray[2] = data;
CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_badSink(dataArray);
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', '/* put data in array */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109304/CWE606_Unchecked_Loop_Condition__wchar_t_environment_66a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_66_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_66_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1d8;
undefined8 uStack_1d0;
undefined8 auStack_1c8 [48];
undefined auStack_48 [16];
undefined8 *puStack_38;
long lStack_20;
long lStack_18;
undefined8 *puStack_10;
uStack_1d8 = 0;
uStack_1d0 = 0;
puVar2 = auStack_1c8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_10 = &uStack_1d8;
lStack_18 = func_0x00400ab0(puStack_10);
lStack_20 = func_0x00400a60(&UNK_004012b4);
if (lStack_20 != 0) {
func_0x00400a80(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18);
}
puStack_38 = puStack_10;
CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_badSink(auStack_48);
return;
}
| ['gcc'] |
5,832 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_66_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109304/CWE606_Unchecked_Loop_Condition__wchar_t_environment_66a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_66_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_66_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,833 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_badSink(wchar_t * dataArray[])
{
/* copy data out of dataArray */
wchar_t * data = dataArray[2];
{
int i, n, intVariable;
if (swscanf(data, L"%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ['/* copy data out of dataArray */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109304/CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_badSink(long param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *(undefined8 *)(param_1 + 0x10);
iVar1 = func_0x00400ae0(uStack_18,&UNK_004012b4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,834 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_goodG2BSink(wchar_t * dataArray[])
{
wchar_t * data = dataArray[2];
{
int i, n, intVariable;
if (swscanf(data, L"%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/109304/CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_goodG2BSink(long param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *(undefined8 *)(param_1 + 0x10);
iVar1 = func_0x00400b10(uStack_18,&UNK_004013e4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,835 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_goodB2GSink(wchar_t * dataArray[])
{
wchar_t * data = dataArray[2];
{
int i, n, intVariable;
if (swscanf(data, L"%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/109304/CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_66b_goodB2GSink(long param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *(undefined8 *)(param_1 + 0x10);
iVar1 = func_0x00400b10(uStack_18,&UNK_004013e4,&iStack_1c);
if ((iVar1 == 1) && (iStack_1c < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,836 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_67_bad()
{
wchar_t * data;
CWE606_Unchecked_Loop_Condition__wchar_t_environment_67_structType myStruct;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Append input from an environment variable to data */
size_t dataLen = wcslen(data);
wchar_t * environment = GETENV(ENV_VARIABLE);
/* If there is data in the environment variable */
if (environment != NULL)
{
/* POTENTIAL FLAW: Read data from an environment variable */
wcsncat(data+dataLen, environment, 100-dataLen-1);
}
}
myStruct.structFirst = data;
CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_badSink(myStruct);
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109305/CWE606_Unchecked_Loop_Condition__wchar_t_environment_67a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_67_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_67_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
undefined8 *puStack_28;
long lStack_20;
long lStack_18;
undefined8 *puStack_10;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar2 = auStack_1a8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_10 = &uStack_1b8;
lStack_18 = func_0x00400ab0(puStack_10);
lStack_20 = func_0x00400a60(&UNK_004012b4);
if (lStack_20 != 0) {
func_0x00400a80(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18);
}
puStack_28 = puStack_10;
CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,837 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_67_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109305/CWE606_Unchecked_Loop_Condition__wchar_t_environment_67a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_67_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_67_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,838 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_badSink(CWE606_Unchecked_Loop_Condition__wchar_t_environment_67_structType myStruct)
{
wchar_t * data = myStruct.structFirst;
{
int i, n, intVariable;
if (swscanf(data, L"%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/109305/CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_badSink(undefined8 param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = param_1;
iVar1 = func_0x00400ae0(param_1,&UNK_004012b4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,839 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_goodG2BSink(CWE606_Unchecked_Loop_Condition__wchar_t_environment_67_structType myStruct)
{
wchar_t * data = myStruct.structFirst;
{
int i, n, intVariable;
if (swscanf(data, L"%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/109305/CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = param_1;
iVar1 = func_0x00400b10(param_1,&UNK_004013e4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,840 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_goodB2GSink(CWE606_Unchecked_Loop_Condition__wchar_t_environment_67_structType myStruct)
{
wchar_t * data = myStruct.structFirst;
{
int i, n, intVariable;
if (swscanf(data, L"%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/109305/CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_67b_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = param_1;
iVar1 = func_0x00400b10(param_1,&UNK_004013e4,&iStack_1c);
if ((iVar1 == 1) && (iStack_1c < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,841 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_01_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109314/CWE606_Unchecked_Loop_Condition__wchar_t_file_01.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_01_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_01_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401316,&UNK_00401314);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401334,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,842 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_01_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109314/CWE606_Unchecked_Loop_Condition__wchar_t_file_01.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_01_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_01_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,843 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_02_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(1)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(1)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109315/CWE606_Unchecked_Loop_Condition__wchar_t_file_02.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_02_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_02_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401316,&UNK_00401314);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401334,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,844 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_02_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109315/CWE606_Unchecked_Loop_Condition__wchar_t_file_02.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_02_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_02_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,845 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_03_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(5==5)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(5==5)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109316/CWE606_Unchecked_Loop_Condition__wchar_t_file_03.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_03_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_03_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401316,&UNK_00401314);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401334,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,846 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_03_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109316/CWE606_Unchecked_Loop_Condition__wchar_t_file_03.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_03_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_03_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,847 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_04_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(STATIC_CONST_TRUE)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(STATIC_CONST_TRUE)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109317/CWE606_Unchecked_Loop_Condition__wchar_t_file_04.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_04_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_04_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
lStack_20 = func_0x00400ae0(puStack_18);
if ((1 < 100U - lStack_20) &&
(lStack_28 = func_0x00400b60(&UNK_0040133e,&UNK_0040133c), lStack_28 != 0)) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_0040134c);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
iVar1 = func_0x00400b10(puStack_18,&UNK_0040135c,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,848 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_04_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109317/CWE606_Unchecked_Loop_Condition__wchar_t_file_04.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_04_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_04_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,849 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_05_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(staticTrue)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(staticTrue)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109318/CWE606_Unchecked_Loop_Condition__wchar_t_file_05.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_05_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_05_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
if (staticTrue != 0) {
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401336,&UNK_00401334);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401344);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
}
if (staticTrue != 0) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401354,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,850 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_05_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109318/CWE606_Unchecked_Loop_Condition__wchar_t_file_05.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_05_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_05_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,851 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_06_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(STATIC_CONST_FIVE==5)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(STATIC_CONST_FIVE==5)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109319/CWE606_Unchecked_Loop_Condition__wchar_t_file_06.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_06_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_06_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
lStack_20 = func_0x00400ae0(puStack_18);
if ((1 < 100U - lStack_20) &&
(lStack_28 = func_0x00400b60(&UNK_0040133a,&UNK_00401338), lStack_28 != 0)) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401348);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401358,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,852 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_06_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109319/CWE606_Unchecked_Loop_Condition__wchar_t_file_06.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_06_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_06_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,853 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_07_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(staticFive==5)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(staticFive==5)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109320/CWE606_Unchecked_Loop_Condition__wchar_t_file_07.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_07_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_07_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
if (staticFive == 5) {
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401336,&UNK_00401334);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401344);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
}
if (staticFive == 5) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401354,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,854 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_07_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109320/CWE606_Unchecked_Loop_Condition__wchar_t_file_07.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_07_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_07_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,855 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_08_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(staticReturnsTrue())
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(staticReturnsTrue())
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109321/CWE606_Unchecked_Loop_Condition__wchar_t_file_08.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_08_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_08_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401356,&UNK_00401354);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401364);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
}
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401374,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,856 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_08_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109321/CWE606_Unchecked_Loop_Condition__wchar_t_file_08.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_08_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_08_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,857 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_09_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(GLOBAL_CONST_TRUE)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(GLOBAL_CONST_TRUE)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109322/CWE606_Unchecked_Loop_Condition__wchar_t_file_09.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_09_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_09_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
if (GLOBAL_CONST_TRUE != 0) {
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401336,&UNK_00401334);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401344);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
}
if (GLOBAL_CONST_TRUE != 0) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401354,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,858 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_09_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109322/CWE606_Unchecked_Loop_Condition__wchar_t_file_09.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_09_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_09_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,859 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_10_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalTrue)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(globalTrue)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109323/CWE606_Unchecked_Loop_Condition__wchar_t_file_10.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_10_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_10_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
if (globalTrue != 0) {
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401336,&UNK_00401334);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401344);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
}
if (globalTrue != 0) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401354,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,860 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_10_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109323/CWE606_Unchecked_Loop_Condition__wchar_t_file_10.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_10_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_10_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,861 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_11_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalReturnsTrue())
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(globalReturnsTrue())
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109324/CWE606_Unchecked_Loop_Condition__wchar_t_file_11.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_11_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_11_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401336,&UNK_00401334);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401344);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
}
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401354,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,862 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_11_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109324/CWE606_Unchecked_Loop_Condition__wchar_t_file_11.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_11_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_11_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,863 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_12_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalReturnsTrueOrFalse())
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
else
{
/* FIX: Set data to a number less than MAX_LOOP */
wcscpy(data, L"15");
}
if(globalReturnsTrueOrFalse())
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 (swscanf(data, L"%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 fgetws 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/109325/CWE606_Unchecked_Loop_Condition__wchar_t_file_12.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_12_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_12_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1d0;
int iStack_1cc;
undefined8 uStack_1c8;
undefined8 uStack_1c0;
undefined8 auStack_1b8 [49];
long lStack_30;
long lStack_28;
undefined8 *puStack_20;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
uStack_1c8 = 0;
uStack_1c0 = 0;
puVar3 = auStack_1b8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_20 = &uStack_1c8;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
func_0x00400ba0(puStack_20,&UNK_00401464);
}
else {
lStack_28 = func_0x00400b60(puStack_20);
if (1 < 100U - lStack_28) {
lStack_30 = func_0x00400bf0(&UNK_00401446,&UNK_00401444);
if (lStack_30 != 0) {
lVar2 = func_0x00400b10(lStack_28 * 4 + (long)puStack_20,100 - (int)lStack_28,lStack_30);
if (lVar2 == 0) {
printLine(&UNK_00401454);
*(undefined4 *)((long)puStack_20 + lStack_28 * 4) = 0;
}
func_0x00400b40(lStack_30);
}
}
}
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
iVar1 = func_0x00400b90(puStack_20,&UNK_00401470,&iStack_1d0);
if ((iVar1 == 1) && (iStack_1d0 < 10000)) {
iStack_18 = 0;
for (iStack_14 = 0; iStack_14 < iStack_1d0; iStack_14 = iStack_14 + 1) {
iStack_18 = iStack_18 + 1;
}
printIntLine(iStack_18);
}
}
else {
iVar1 = func_0x00400b90(puStack_20,&UNK_00401470,&iStack_1cc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1cc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,864 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_12_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109325/CWE606_Unchecked_Loop_Condition__wchar_t_file_12.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_12_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_12_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,865 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_13_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(GLOBAL_CONST_FIVE==5)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(GLOBAL_CONST_FIVE==5)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109326/CWE606_Unchecked_Loop_Condition__wchar_t_file_13.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_13_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_13_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
if (GLOBAL_CONST_FIVE == 5) {
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401336,&UNK_00401334);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401344);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
}
if (GLOBAL_CONST_FIVE == 5) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401354,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,866 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_13_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109326/CWE606_Unchecked_Loop_Condition__wchar_t_file_13.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_13_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_13_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,867 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_14_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalFive==5)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
if(globalFive==5)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109327/CWE606_Unchecked_Loop_Condition__wchar_t_file_14.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_14_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_14_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
if (globalFive == 5) {
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401336,&UNK_00401334);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401344);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
}
if (globalFive == 5) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401354,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,868 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_14_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109327/CWE606_Unchecked_Loop_Condition__wchar_t_file_14.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_14_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_14_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,869 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_15_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
switch(6)
{
case 6:
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\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 (swscanf(data, L"%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 fgetws 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/109328/CWE606_Unchecked_Loop_Condition__wchar_t_file_15.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_15_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_15_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401316,&UNK_00401314);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401334,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,870 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_15_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109328/CWE606_Unchecked_Loop_Condition__wchar_t_file_15.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_15_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_15_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,871 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_16_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
while(1)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
break;
}
while(1)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109329/CWE606_Unchecked_Loop_Condition__wchar_t_file_16.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_16_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_16_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401316,&UNK_00401314);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401334,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,872 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_16_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109329/CWE606_Unchecked_Loop_Condition__wchar_t_file_16.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_16_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_16_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,873 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_17_bad()
{
int i,j;
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
for(i = 0; i < 1; i++)
{
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
}
for(j = 0; j < 1; j++)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109330/CWE606_Unchecked_Loop_Condition__wchar_t_file_17.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_17_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_17_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1cc;
undefined8 uStack_1c8;
undefined8 uStack_1c0;
undefined8 auStack_1b8 [49];
long lStack_30;
long lStack_28;
undefined8 *puStack_20;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
uStack_1c8 = 0;
uStack_1c0 = 0;
puVar3 = auStack_1b8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_20 = &uStack_1c8;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
lStack_28 = func_0x00400ae0(puStack_20);
if (1 < 100U - lStack_28) {
lStack_30 = func_0x00400b60(&UNK_00401346,&UNK_00401344);
if (lStack_30 != 0) {
lVar2 = func_0x00400a90(lStack_28 * 4 + (long)puStack_20,100 - (int)lStack_28,lStack_30);
if (lVar2 == 0) {
printLine(&UNK_00401354);
*(undefined4 *)((long)puStack_20 + lStack_28 * 4) = 0;
}
func_0x00400ac0(lStack_30);
}
}
}
for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) {
iVar1 = func_0x00400b10(puStack_20,&UNK_00401364,&iStack_1cc);
if (iVar1 == 1) {
iStack_18 = 0;
for (iStack_14 = 0; iStack_14 < iStack_1cc; iStack_14 = iStack_14 + 1) {
iStack_18 = iStack_18 + 1;
}
printIntLine(iStack_18);
}
}
return;
}
| ['gcc'] |
5,874 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_17_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109330/CWE606_Unchecked_Loop_Condition__wchar_t_file_17.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_17_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_17_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,875 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_18_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
goto source;
source:
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
goto sink;
sink:
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109331/CWE606_Unchecked_Loop_Condition__wchar_t_file_18.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_18_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_18_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar3 = auStack_1a8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1b8;
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401316,&UNK_00401314);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401334,&iStack_1bc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1bc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,876 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_18_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109331/CWE606_Unchecked_Loop_Condition__wchar_t_file_18.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_18_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_18_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,877 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_21_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\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 fgetws fails */', '/* true */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109332/CWE606_Unchecked_Loop_Condition__wchar_t_file_21.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_21_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_21_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
long lStack_20;
long lStack_18;
undefined8 *puStack_10;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar2 = auStack_1a8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_10 = &uStack_1b8;
lStack_18 = func_0x00400ae0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401352,&UNK_00401350);
if (lStack_20 != 0) {
lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401360);
*(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0;
}
func_0x00400ac0(lStack_20);
}
}
badStatic = 1;
badSink(puStack_10);
return;
}
| ['gcc'] |
5,878 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_21_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109332/CWE606_Unchecked_Loop_Condition__wchar_t_file_21.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_21_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_21_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
5,879 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
CWE606_Unchecked_Loop_Condition__wchar_t_file_22_badGlobal = 1; /* true */
CWE606_Unchecked_Loop_Condition__wchar_t_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 fgetws fails */', '/* true */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109333/CWE606_Unchecked_Loop_Condition__wchar_t_file_22a.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_22_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
long lStack_20;
long lStack_18;
undefined8 *puStack_10;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar2 = auStack_1a8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_10 = &uStack_1b8;
lStack_18 = func_0x00400ae0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401346,&UNK_00401344);
if (lStack_20 != 0) {
lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401354);
*(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0;
}
func_0x00400ac0(lStack_20);
}
}
CWE606_Unchecked_Loop_Condition__wchar_t_file_22_badGlobal = 1;
CWE606_Unchecked_Loop_Condition__wchar_t_file_22_badSink(puStack_10);
return;
}
| ['gcc'] |
5,880 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109333/CWE606_Unchecked_Loop_Condition__wchar_t_file_22a.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_22_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
5,881 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_badSink(wchar_t * data)
{
if(CWE606_Unchecked_Loop_Condition__wchar_t_file_22_badGlobal)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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/109333/CWE606_Unchecked_Loop_Condition__wchar_t_file_22b.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_22_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__wchar_t_file_22_badGlobal != 0) {
iVar1 = func_0x00400b10(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,882 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodB2G1Sink(wchar_t * data)
{
if(CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodB2G1Global)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
{
int i, n, intVariable;
if (swscanf(data, L"%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/109333/CWE606_Unchecked_Loop_Condition__wchar_t_file_22b.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodB2G1Sink |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodB2G1Sink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodB2G1Global == 0) {
iVar1 = func_0x00400b90(param_1,&UNK_0040165c,&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_00401644);
}
return;
}
| ['gcc'] |
5,883 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodB2G2Sink(wchar_t * data)
{
if(CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodB2G2Global)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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/109333/CWE606_Unchecked_Loop_Condition__wchar_t_file_22b.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodB2G2Sink |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodB2G2Sink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodB2G2Global != 0) {
iVar1 = func_0x00400b90(param_1,&UNK_0040165c,&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,884 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodG2BSink(wchar_t * data)
{
if(CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodG2BGlobal)
{
{
int i, n, intVariable;
if (swscanf(data, L"%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/109333/CWE606_Unchecked_Loop_Condition__wchar_t_file_22b.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__wchar_t_file_22_goodG2BGlobal != 0) {
iVar1 = func_0x00400b90(param_1,&UNK_0040165c,&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,885 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_31_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
{
wchar_t * dataCopy = data;
wchar_t * data = dataCopy;
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109334/CWE606_Unchecked_Loop_Condition__wchar_t_file_31.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_31_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_31_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1cc;
undefined8 uStack_1c8;
undefined8 uStack_1c0;
undefined8 auStack_1b8 [48];
undefined8 *puStack_38;
undefined8 *puStack_30;
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1c8 = 0;
uStack_1c0 = 0;
puVar3 = auStack_1b8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1c8;
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401326,&UNK_00401324);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401334);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
puStack_30 = puStack_18;
puStack_38 = puStack_18;
iVar1 = func_0x00400b10(puStack_18,&UNK_00401344,&iStack_1cc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1cc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,886 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_31_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109334/CWE606_Unchecked_Loop_Condition__wchar_t_file_31.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_31_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_31_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,887 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_32_bad()
{
wchar_t * data;
wchar_t * *dataPtr1 = &data;
wchar_t * *dataPtr2 = &data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
wchar_t * data = *dataPtr1;
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
*dataPtr1 = data;
}
{
wchar_t * data = *dataPtr2;
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109335/CWE606_Unchecked_Loop_Condition__wchar_t_file_32.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_32_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_32_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1dc;
undefined8 uStack_1d8;
undefined8 uStack_1d0;
undefined8 auStack_1c8 [48];
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_1d8 = 0;
uStack_1d0 = 0;
puVar3 = auStack_1c8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_48 = &uStack_1d8;
puStack_28 = *ppuStack_18;
lStack_30 = func_0x00400ae0(puStack_28);
if (1 < 100U - lStack_30) {
lStack_38 = func_0x00400b60(&UNK_00401346,&UNK_00401344);
if (lStack_38 != 0) {
lVar2 = func_0x00400a90(lStack_30 * 4 + (long)puStack_28,100 - (int)lStack_30,lStack_38);
if (lVar2 == 0) {
printLine(&UNK_00401354);
*(undefined4 *)((long)puStack_28 + lStack_30 * 4) = 0;
}
func_0x00400ac0(lStack_38);
}
}
*ppuStack_18 = puStack_28;
puStack_40 = *ppuStack_20;
iVar1 = func_0x00400b10(puStack_40,&UNK_00401364,&iStack_1dc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1dc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,888 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_32_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109335/CWE606_Unchecked_Loop_Condition__wchar_t_file_32.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_32_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_32_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,889 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_34_bad()
{
wchar_t * data;
CWE606_Unchecked_Loop_Condition__wchar_t_file_34_unionType myUnion;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
myUnion.unionFirst = data;
{
wchar_t * data = myUnion.unionSecond;
{
int i, n, intVariable;
if (swscanf(data, L"%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 fgetws 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/109337/CWE606_Unchecked_Loop_Condition__wchar_t_file_34.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_34_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_34_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1cc;
undefined8 uStack_1c8;
undefined8 uStack_1c0;
undefined8 auStack_1b8 [48];
undefined8 *puStack_38;
undefined8 *puStack_30;
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1c8 = 0;
uStack_1c0 = 0;
puVar3 = auStack_1b8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1c8;
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401326,&UNK_00401324);
if (lStack_28 != 0) {
lVar2 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar2 == 0) {
printLine(&UNK_00401334);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
puStack_38 = puStack_18;
puStack_30 = puStack_18;
iVar1 = func_0x00400b10(puStack_18,&UNK_00401344,&iStack_1cc);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1cc; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,890 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_34_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109337/CWE606_Unchecked_Loop_Condition__wchar_t_file_34.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_34_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_34_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,891 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_41_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\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 fgetws fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109338/CWE606_Unchecked_Loop_Condition__wchar_t_file_41.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_41_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_41_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
long lStack_20;
long lStack_18;
undefined8 *puStack_10;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar2 = auStack_1a8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_10 = &uStack_1b8;
lStack_18 = func_0x00400ae0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401342,&UNK_00401340);
if (lStack_20 != 0) {
lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401350);
*(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0;
}
func_0x00400ac0(lStack_20);
}
}
badSink(puStack_10);
return;
}
| ['gcc'] |
5,892 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_41_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109338/CWE606_Unchecked_Loop_Condition__wchar_t_file_41.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_41_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_41_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,893 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_42_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
data = badSource(data);
{
int i, n, intVariable;
if (swscanf(data, L"%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/109339/CWE606_Unchecked_Loop_Condition__wchar_t_file_42.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_42_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_42_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1ac;
undefined8 uStack_1a8;
undefined8 uStack_1a0;
undefined8 auStack_198 [48];
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_1a8 = 0;
uStack_1a0 = 0;
puVar3 = auStack_198;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_18 = &uStack_1a8;
puStack_18 = (undefined8 *)badSource(puStack_18);
iVar1 = func_0x00400b10(puStack_18,&UNK_00401354,&iStack_1ac);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1ac; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,894 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_42_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109339/CWE606_Unchecked_Loop_Condition__wchar_t_file_42.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_42_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_42_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,895 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_44_bad()
{
wchar_t * data;
/* define a function pointer */
void (*funcPtr) (wchar_t *) = badSink;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\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 fgetws fails */', '/* use the function pointer */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109341/CWE606_Unchecked_Loop_Condition__wchar_t_file_44.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_44_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_44_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
long lStack_20;
undefined8 *puStack_18;
code *pcStack_10;
pcStack_10 = badSink;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar2 = auStack_1a8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_18 = &uStack_1b8;
lStack_20 = func_0x00400ae0(puStack_18);
if (1 < 100U - lStack_20) {
lStack_28 = func_0x00400b60(&UNK_00401342,&UNK_00401340);
if (lStack_28 != 0) {
lVar1 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,lStack_28);
if (lVar1 == 0) {
printLine(&UNK_00401350);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
func_0x00400ac0(lStack_28);
}
}
(*pcStack_10)(puStack_18);
return;
}
| ['gcc'] |
5,896 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_44_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109341/CWE606_Unchecked_Loop_Condition__wchar_t_file_44.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_44_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_44_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,897 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_45_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
CWE606_Unchecked_Loop_Condition__wchar_t_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 fgetws fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109342/CWE606_Unchecked_Loop_Condition__wchar_t_file_45.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_45_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_45_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
long lStack_20;
long lStack_18;
undefined8 *puStack_10;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar2 = auStack_1a8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_10 = &uStack_1b8;
lStack_18 = func_0x00400ae0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401352,&UNK_00401350);
if (lStack_20 != 0) {
lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401360);
*(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0;
}
func_0x00400ac0(lStack_20);
}
}
CWE606_Unchecked_Loop_Condition__wchar_t_file_45_badData = puStack_10;
badSink();
return;
}
| ['gcc'] |
5,898 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_45_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109342/CWE606_Unchecked_Loop_Condition__wchar_t_file_45.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_45_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_45_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,899 | void CWE606_Unchecked_Loop_Condition__wchar_t_file_51_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
/* Read input from a file */
size_t dataLen = wcslen(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 (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL)
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
fclose(pFile);
}
}
}
CWE606_Unchecked_Loop_Condition__wchar_t_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 fgetws fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109343/CWE606_Unchecked_Loop_Condition__wchar_t_file_51a.c | CWE606_Unchecked_Loop_Condition__wchar_t_file_51_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_file_51_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
long lStack_20;
long lStack_18;
undefined8 *puStack_10;
uStack_1b8 = 0;
uStack_1b0 = 0;
puVar2 = auStack_1a8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_10 = &uStack_1b8;
lStack_18 = func_0x00400ae0(puStack_10);
if (1 < 100U - lStack_18) {
lStack_20 = func_0x00400b60(&UNK_00401336,&UNK_00401334);
if (lStack_20 != 0) {
lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20);
if (lVar1 == 0) {
printLine(&UNK_00401344);
*(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0;
}
func_0x00400ac0(lStack_20);
}
}
CWE606_Unchecked_Loop_Condition__wchar_t_file_51b_badSink(puStack_10);
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.