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,700 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_08_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(staticReturnsTrue())
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
}
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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109225/CWE606_Unchecked_Loop_Condition__wchar_t_console_08.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_08_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_08_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
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_0x00400aa0(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400a60(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
else {
lStack_20 = func_0x00400aa0(puStack_18);
if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0;
}
}
}
}
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400ad0(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,701 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_08_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109225/CWE606_Unchecked_Loop_Condition__wchar_t_console_08.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_08_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_08_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,702 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_09_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(GLOBAL_CONST_TRUE)
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
}
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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109226/CWE606_Unchecked_Loop_Condition__wchar_t_console_09.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_09_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_09_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
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_0x00400aa0(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400a60(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401304);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
else {
lStack_20 = func_0x00400aa0(puStack_18);
if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0;
}
}
}
}
if (GLOBAL_CONST_TRUE != 0) {
iVar1 = func_0x00400ad0(puStack_18,&UNK_00401314,&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,703 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_09_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109226/CWE606_Unchecked_Loop_Condition__wchar_t_console_09.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_09_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_09_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,704 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_10_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalTrue)
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
}
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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109227/CWE606_Unchecked_Loop_Condition__wchar_t_console_10.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_10_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_10_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
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_0x00400aa0(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400a60(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401304);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
else {
lStack_20 = func_0x00400aa0(puStack_18);
if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0;
}
}
}
}
if (globalTrue != 0) {
iVar1 = func_0x00400ad0(puStack_18,&UNK_00401314,&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,705 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_10_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109227/CWE606_Unchecked_Loop_Condition__wchar_t_console_10.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_10_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_10_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,706 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_11_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalReturnsTrue())
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
}
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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109228/CWE606_Unchecked_Loop_Condition__wchar_t_console_11.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_11_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_11_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
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_0x00400aa0(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400a60(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401314);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
else {
lStack_20 = func_0x00400aa0(puStack_18);
if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0;
}
}
}
}
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400ad0(puStack_18,&UNK_00401324,&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,707 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_11_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109228/CWE606_Unchecked_Loop_Condition__wchar_t_console_11.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_11_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_11_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,708 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_12_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalReturnsTrueOrFalse())
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
}
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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109229/CWE606_Unchecked_Loop_Condition__wchar_t_console_12.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_12_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_12_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1c0;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
undefined8 *puStack_20;
int iStack_18;
int iStack_14;
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_20 = &uStack_1b8;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
func_0x00400b10(puStack_20,&UNK_004013d4);
}
else {
lStack_28 = func_0x00400ad0(puStack_20);
if (1 < 100U - lStack_28) {
lVar2 = func_0x00400a90(lStack_28 * 4 + (long)puStack_20,100 - (int)lStack_28,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013c4);
*(undefined4 *)((long)puStack_20 + lStack_28 * 4) = 0;
}
else {
lStack_28 = func_0x00400ad0(puStack_20);
if ((lStack_28 != 0) && (*(int *)((long)puStack_20 + lStack_28 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_20 + lStack_28 * 4 + -4) = 0;
}
}
}
}
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
iVar1 = func_0x00400b00(puStack_20,&UNK_004013e0,&iStack_1c0);
if ((iVar1 == 1) && (iStack_1c0 < 10000)) {
iStack_18 = 0;
for (iStack_14 = 0; iStack_14 < iStack_1c0; iStack_14 = iStack_14 + 1) {
iStack_18 = iStack_18 + 1;
}
printIntLine(iStack_18);
}
}
else {
iVar1 = func_0x00400b00(puStack_20,&UNK_004013e0,&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,709 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_12_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109229/CWE606_Unchecked_Loop_Condition__wchar_t_console_12.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_12_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_12_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,710 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_13_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(GLOBAL_CONST_FIVE==5)
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
}
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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109230/CWE606_Unchecked_Loop_Condition__wchar_t_console_13.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_13_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_13_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
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_0x00400aa0(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400a60(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401304);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
else {
lStack_20 = func_0x00400aa0(puStack_18);
if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0;
}
}
}
}
if (GLOBAL_CONST_FIVE == 5) {
iVar1 = func_0x00400ad0(puStack_18,&UNK_00401314,&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,711 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_13_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109230/CWE606_Unchecked_Loop_Condition__wchar_t_console_13.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_13_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_13_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,712 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_14_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalFive==5)
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
}
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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109231/CWE606_Unchecked_Loop_Condition__wchar_t_console_14.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_14_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_14_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
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_0x00400aa0(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400a60(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401304);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
else {
lStack_20 = func_0x00400aa0(puStack_18);
if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0;
}
}
}
}
if (globalFive == 5) {
iVar1 = func_0x00400ad0(puStack_18,&UNK_00401314,&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,713 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_14_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109231/CWE606_Unchecked_Loop_Condition__wchar_t_console_14.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_14_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_14_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,714 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_15_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
switch(6)
{
case 6:
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109232/CWE606_Unchecked_Loop_Condition__wchar_t_console_15.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_15_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_15_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
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_0x00400aa0(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400a60(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_004012f4);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
else {
lStack_20 = func_0x00400aa0(puStack_18);
if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0;
}
}
}
iVar1 = func_0x00400ad0(puStack_18,&UNK_00401304,&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,715 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_15_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109232/CWE606_Unchecked_Loop_Condition__wchar_t_console_15.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_15_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_15_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,716 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_16_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
while(1)
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109233/CWE606_Unchecked_Loop_Condition__wchar_t_console_16.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_16_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_16_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [49];
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_0x00400aa0(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400a60(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_004012f4);
*(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0;
}
else {
lStack_20 = func_0x00400aa0(puStack_18);
if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0;
}
}
}
iVar1 = func_0x00400ad0(puStack_18,&UNK_00401304,&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,717 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_16_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109233/CWE606_Unchecked_Loop_Condition__wchar_t_console_16.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_16_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_16_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,718 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_17_bad()
{
int i,j;
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
for(i = 0; i < 1; i++)
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
}
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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109234/CWE606_Unchecked_Loop_Condition__wchar_t_console_17.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_17_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_17_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1bc;
undefined8 uStack_1b8;
undefined8 uStack_1b0;
undefined8 auStack_1a8 [48];
long lStack_28;
undefined8 *puStack_20;
int iStack_18;
int iStack_14;
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_20 = &uStack_1b8;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
lStack_28 = func_0x00400aa0(puStack_20);
if (1 < 100U - lStack_28) {
lVar2 = func_0x00400a60(lStack_28 * 4 + (long)puStack_20,100 - (int)lStack_28,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined4 *)((long)puStack_20 + lStack_28 * 4) = 0;
}
else {
lStack_28 = func_0x00400aa0(puStack_20);
if ((lStack_28 != 0) && (*(int *)((long)puStack_20 + lStack_28 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_20 + lStack_28 * 4 + -4) = 0;
}
}
}
}
for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) {
iVar1 = func_0x00400ad0(puStack_20,&UNK_00401334,&iStack_1bc);
if (iVar1 == 1) {
iStack_18 = 0;
for (iStack_14 = 0; iStack_14 < iStack_1bc; iStack_14 = iStack_14 + 1) {
iStack_18 = iStack_18 + 1;
}
printIntLine(iStack_18);
}
}
return;
}
| ['gcc'] |
5,719 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_17_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109234/CWE606_Unchecked_Loop_Condition__wchar_t_console_17.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_17_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_17_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,720 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_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 the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
*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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* 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/109239/CWE606_Unchecked_Loop_Condition__wchar_t_console_32.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_32_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_32_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
int iStack_1dc;
undefined8 uStack_1d8;
undefined8 uStack_1d0;
undefined8 auStack_1c8 [49];
undefined8 *puStack_40;
undefined8 *puStack_38;
long lStack_30;
undefined8 *puStack_28;
undefined8 **ppuStack_20;
undefined8 **ppuStack_18;
int iStack_10;
int iStack_c;
ppuStack_18 = &puStack_40;
ppuStack_20 = &puStack_40;
uStack_1d8 = 0;
uStack_1d0 = 0;
puVar3 = auStack_1c8;
for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puStack_40 = &uStack_1d8;
puStack_28 = *ppuStack_18;
lStack_30 = func_0x00400aa0(puStack_28);
if (1 < 100U - lStack_30) {
lVar2 = func_0x00400a60(lStack_30 * 4 + (long)puStack_28,100 - (int)lStack_30,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined4 *)((long)puStack_28 + lStack_30 * 4) = 0;
}
else {
lStack_30 = func_0x00400aa0(puStack_28);
if ((lStack_30 != 0) && (*(int *)((long)puStack_28 + lStack_30 * 4 + -4) == 10)) {
*(undefined4 *)((long)puStack_28 + lStack_30 * 4 + -4) = 0;
}
}
}
*ppuStack_18 = puStack_28;
puStack_38 = *ppuStack_20;
iVar1 = func_0x00400ad0(puStack_38,&UNK_00401334,&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,721 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_32_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109239/CWE606_Unchecked_Loop_Condition__wchar_t_console_32.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_32_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_32_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,722 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_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/109243/CWE606_Unchecked_Loop_Condition__wchar_t_console_42.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_42_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_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_0x00400ad0(puStack_18,&UNK_00401324,&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,723 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_42_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109243/CWE606_Unchecked_Loop_Condition__wchar_t_console_42.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_42_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_42_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,724 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_61_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
data = CWE606_Unchecked_Loop_Condition__wchar_t_console_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/109251/CWE606_Unchecked_Loop_Condition__wchar_t_console_61a.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_61_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_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_console_61b_badSource(puStack_18);
iVar1 = func_0x00400ad0(puStack_18,&UNK_00401314,&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,725 | void CWE606_Unchecked_Loop_Condition__wchar_t_console_61_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109251/CWE606_Unchecked_Loop_Condition__wchar_t_console_61a.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_61_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_console_61_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,726 | wchar_t * CWE606_Unchecked_Loop_Condition__wchar_t_console_61b_badSource(wchar_t * data)
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
return data;
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* Restore NUL terminator if fgetws fails */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109251/CWE606_Unchecked_Loop_Condition__wchar_t_console_61b.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_61b_badSource |
long CWE606_Unchecked_Loop_Condition__wchar_t_console_61b_badSource(long param_1)
{
long lVar1;
long lVar2;
lVar1 = func_0x00400aa0(param_1);
if (1 < 100U - lVar1) {
lVar2 = func_0x00400a60(lVar1 * 4 + param_1,100 - (int)lVar1,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401314);
*(undefined4 *)(param_1 + lVar1 * 4) = 0;
}
else {
lVar1 = func_0x00400aa0(param_1);
if ((lVar1 != 0) && (*(int *)(param_1 + lVar1 * 4 + -4) == 10)) {
*(undefined4 *)(param_1 + lVar1 * 4 + -4) = 0;
}
}
}
return param_1;
}
| ['gcc'] |
5,727 | wchar_t * CWE606_Unchecked_Loop_Condition__wchar_t_console_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/109251/CWE606_Unchecked_Loop_Condition__wchar_t_console_61b.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_61b_goodG2BSource |
undefined8 CWE606_Unchecked_Loop_Condition__wchar_t_console_61b_goodG2BSource(undefined8 param_1)
{
func_0x00400b10(param_1,&UNK_00401444);
return param_1;
}
| ['gcc'] |
5,728 | wchar_t * CWE606_Unchecked_Loop_Condition__wchar_t_console_61b_goodB2GSource(wchar_t * data)
{
{
/* Read input from the console */
size_t dataLen = wcslen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgetws() */
dataLen = wcslen(data);
if (dataLen > 0 && data[dataLen-1] == L'\n')
{
data[dataLen-1] = L'\0';
}
}
else
{
printLine("fgetws() failed");
/* Restore NUL terminator if fgetws fails */
data[dataLen] = L'\0';
}
}
}
return data;
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* Restore NUL terminator if fgetws fails */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109251/CWE606_Unchecked_Loop_Condition__wchar_t_console_61b.c | CWE606_Unchecked_Loop_Condition__wchar_t_console_61b_goodB2GSource |
long CWE606_Unchecked_Loop_Condition__wchar_t_console_61b_goodB2GSource(long param_1)
{
long lVar1;
long lVar2;
lVar1 = func_0x00400ad0(param_1);
if (1 < 100U - lVar1) {
lVar2 = func_0x00400a90(lVar1 * 4 + param_1,100 - (int)lVar1,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401450);
*(undefined4 *)(param_1 + lVar1 * 4) = 0;
}
else {
lVar1 = func_0x00400ad0(param_1);
if ((lVar1 != 0) && (*(int *)(param_1 + lVar1 * 4 + -4) == 10)) {
*(undefined4 *)(param_1 + lVar1 * 4 + -4) = 0;
}
}
}
return param_1;
}
| ['gcc'] |
5,729 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_02_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(1)
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109267/CWE606_Unchecked_Loop_Condition__wchar_t_environment_02.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_02_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_00401284);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
iVar1 = func_0x00400ae0(puStack_18,&UNK_00401294,&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,730 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_02_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109267/CWE606_Unchecked_Loop_Condition__wchar_t_environment_02.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_02_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_02_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,731 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_03_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(5==5)
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109268/CWE606_Unchecked_Loop_Condition__wchar_t_environment_03.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_03_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_00401284);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
iVar1 = func_0x00400ae0(puStack_18,&UNK_00401294,&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,732 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_03_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109268/CWE606_Unchecked_Loop_Condition__wchar_t_environment_03.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_03_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_03_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,733 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_04_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(STATIC_CONST_TRUE)
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109269/CWE606_Unchecked_Loop_Condition__wchar_t_environment_04.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_04_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_0040129c);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012ac,&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,734 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_04_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109269/CWE606_Unchecked_Loop_Condition__wchar_t_environment_04.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_04_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_04_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,735 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_05_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(staticTrue)
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109270/CWE606_Unchecked_Loop_Condition__wchar_t_environment_05.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_05_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_004012a4);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
}
if (staticTrue != 0) {
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012b4,&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,736 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_05_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109270/CWE606_Unchecked_Loop_Condition__wchar_t_environment_05.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_05_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_05_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,737 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_06_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(STATIC_CONST_FIVE==5)
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109271/CWE606_Unchecked_Loop_Condition__wchar_t_environment_06.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_06_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_004012a8);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012b8,&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,738 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_06_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109271/CWE606_Unchecked_Loop_Condition__wchar_t_environment_06.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_06_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_06_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,739 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_07_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109272/CWE606_Unchecked_Loop_Condition__wchar_t_environment_07.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_07_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_07_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,740 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_08_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(staticReturnsTrue())
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109273/CWE606_Unchecked_Loop_Condition__wchar_t_environment_08.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_08_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_004012b4);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
}
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012c4,&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,741 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_08_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109273/CWE606_Unchecked_Loop_Condition__wchar_t_environment_08.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_08_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_08_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,742 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_09_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(GLOBAL_CONST_TRUE)
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109274/CWE606_Unchecked_Loop_Condition__wchar_t_environment_09.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_09_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_004012a4);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
}
if (GLOBAL_CONST_TRUE != 0) {
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012b4,&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,743 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_09_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109274/CWE606_Unchecked_Loop_Condition__wchar_t_environment_09.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_09_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_09_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,744 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_10_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalTrue)
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109275/CWE606_Unchecked_Loop_Condition__wchar_t_environment_10.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_10_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_004012a4);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
}
if (globalTrue != 0) {
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012b4,&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,745 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_10_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109275/CWE606_Unchecked_Loop_Condition__wchar_t_environment_10.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_10_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_10_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,746 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_11_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalReturnsTrue())
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109276/CWE606_Unchecked_Loop_Condition__wchar_t_environment_11.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_11_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_004012a4);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
}
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012b4,&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,747 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_11_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109276/CWE606_Unchecked_Loop_Condition__wchar_t_environment_11.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_11_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_11_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,748 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_12_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalReturnsTrueOrFalse())
{
{
/* 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);
}
}
}
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);
}
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', '/* 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/109277/CWE606_Unchecked_Loop_Condition__wchar_t_environment_12.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_12_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400b20(puStack_20,&UNK_00401364);
}
else {
lStack_28 = func_0x00400ae0(puStack_20);
lStack_30 = func_0x00400a90(&UNK_00401354);
if (lStack_30 != 0) {
func_0x00400ab0(lStack_28 * 4 + (long)puStack_20,lStack_30,99 - lStack_28);
}
}
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
iVar1 = func_0x00400b10(puStack_20,&UNK_00401370,&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_0x00400b10(puStack_20,&UNK_00401370,&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,749 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_12_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109277/CWE606_Unchecked_Loop_Condition__wchar_t_environment_12.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_12_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_12_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,750 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_13_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(GLOBAL_CONST_FIVE==5)
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109278/CWE606_Unchecked_Loop_Condition__wchar_t_environment_13.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_13_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_004012a4);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
}
if (GLOBAL_CONST_FIVE == 5) {
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012b4,&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,751 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_13_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109278/CWE606_Unchecked_Loop_Condition__wchar_t_environment_13.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_13_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_13_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,752 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_14_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
if(globalFive==5)
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109279/CWE606_Unchecked_Loop_Condition__wchar_t_environment_14.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_14_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_004012a4);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
}
if (globalFive == 5) {
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012b4,&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,753 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_14_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109279/CWE606_Unchecked_Loop_Condition__wchar_t_environment_14.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_14_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_14_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,754 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_15_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
switch(6)
{
case 6:
{
/* 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);
}
}
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;
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', '/* 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/109280/CWE606_Unchecked_Loop_Condition__wchar_t_environment_15.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_15_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_00401284);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
iVar1 = func_0x00400ae0(puStack_18,&UNK_00401294,&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,755 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_15_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109280/CWE606_Unchecked_Loop_Condition__wchar_t_environment_15.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_15_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_15_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,756 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_16_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
while(1)
{
{
/* 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);
}
}
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;
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109281/CWE606_Unchecked_Loop_Condition__wchar_t_environment_16.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_16_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_00401284);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
iVar1 = func_0x00400ae0(puStack_18,&UNK_00401294,&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,757 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_16_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109281/CWE606_Unchecked_Loop_Condition__wchar_t_environment_16.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_16_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_16_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,758 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_17_bad()
{
int i,j;
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
for(i = 0; i < 1; i++)
{
{
/* 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);
}
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109282/CWE606_Unchecked_Loop_Condition__wchar_t_environment_17.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_17_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_20);
lStack_30 = func_0x00400a60(&UNK_004012b4);
if (lStack_30 != 0) {
func_0x00400a80(lStack_28 * 4 + (long)puStack_20,lStack_30,99 - lStack_28);
}
}
for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) {
iVar1 = func_0x00400ae0(puStack_20,&UNK_004012c4,&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,759 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_17_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109282/CWE606_Unchecked_Loop_Condition__wchar_t_environment_17.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_17_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_17_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,760 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_21_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);
}
}
badStatic = 1; /* true */
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 */', '/* true */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109284/CWE606_Unchecked_Loop_Condition__wchar_t_environment_21.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_21_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_10);
lStack_20 = func_0x00400a60(&UNK_004012c0);
if (lStack_20 != 0) {
func_0x00400a80(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18);
}
badStatic = 1;
badSink(puStack_10);
return;
}
| ['gcc'] |
5,761 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_21_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109284/CWE606_Unchecked_Loop_Condition__wchar_t_environment_21.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_21_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_21_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
5,762 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_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_22_badGlobal = 1; /* true */
CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_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 */', '/* true */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109285/CWE606_Unchecked_Loop_Condition__wchar_t_environment_22a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_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);
}
CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_badGlobal = 1;
CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_badSink(puStack_10);
return;
}
| ['gcc'] |
5,763 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109285/CWE606_Unchecked_Loop_Condition__wchar_t_environment_22a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
5,764 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_badSink(wchar_t * data)
{
if(CWE606_Unchecked_Loop_Condition__wchar_t_environment_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/109285/CWE606_Unchecked_Loop_Condition__wchar_t_environment_22b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_badGlobal != 0) {
iVar1 = func_0x00400ae0(param_1,&UNK_004012b4,&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,765 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodB2G1Sink(wchar_t * data)
{
if(CWE606_Unchecked_Loop_Condition__wchar_t_environment_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/109285/CWE606_Unchecked_Loop_Condition__wchar_t_environment_22b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodB2G1Sink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodB2G1Sink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodB2G1Global == 0) {
iVar1 = func_0x00400b10(param_1,&UNK_0040152c,&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_00401514);
}
return;
}
| ['gcc'] |
5,766 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodB2G2Sink(wchar_t * data)
{
if(CWE606_Unchecked_Loop_Condition__wchar_t_environment_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/109285/CWE606_Unchecked_Loop_Condition__wchar_t_environment_22b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodB2G2Sink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodB2G2Sink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodB2G2Global != 0) {
iVar1 = func_0x00400b10(param_1,&UNK_0040152c,&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,767 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodG2BSink(wchar_t * data)
{
if(CWE606_Unchecked_Loop_Condition__wchar_t_environment_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/109285/CWE606_Unchecked_Loop_Condition__wchar_t_environment_22b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__wchar_t_environment_22_goodG2BGlobal != 0) {
iVar1 = func_0x00400b10(param_1,&UNK_0040152c,&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,768 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_31_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);
}
}
{
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109286/CWE606_Unchecked_Loop_Condition__wchar_t_environment_31.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_31_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_00401294);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
puStack_30 = puStack_18;
puStack_38 = puStack_18;
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012a4,&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,769 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_31_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109286/CWE606_Unchecked_Loop_Condition__wchar_t_environment_31.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_31_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_31_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,770 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_32_bad()
{
wchar_t * data;
wchar_t * *dataPtr1 = &data;
wchar_t * *dataPtr2 = &data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
{
wchar_t * data = *dataPtr1;
{
/* 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);
}
}
*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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109287/CWE606_Unchecked_Loop_Condition__wchar_t_environment_32.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_32_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_28);
lStack_38 = func_0x00400a60(&UNK_004012b4);
if (lStack_38 != 0) {
func_0x00400a80(lStack_30 * 4 + (long)puStack_28,lStack_38,99 - lStack_30);
}
*ppuStack_18 = puStack_28;
puStack_40 = *ppuStack_20;
iVar1 = func_0x00400ae0(puStack_40,&UNK_004012c4,&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,771 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_32_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109287/CWE606_Unchecked_Loop_Condition__wchar_t_environment_32.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_32_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_32_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,772 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_34_bad()
{
wchar_t * data;
CWE606_Unchecked_Loop_Condition__wchar_t_environment_34_unionType myUnion;
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);
}
}
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);
}
}
}
} | ['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109289/CWE606_Unchecked_Loop_Condition__wchar_t_environment_34.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_34_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_18);
lStack_28 = func_0x00400a60(&UNK_00401294);
if (lStack_28 != 0) {
func_0x00400a80(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20);
}
puStack_38 = puStack_18;
puStack_30 = puStack_18;
iVar1 = func_0x00400ae0(puStack_18,&UNK_004012a4,&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,773 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_34_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109289/CWE606_Unchecked_Loop_Condition__wchar_t_environment_34.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_34_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_34_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,774 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_41_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);
}
}
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/109290/CWE606_Unchecked_Loop_Condition__wchar_t_environment_41.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_41_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_10);
lStack_20 = func_0x00400a60(&UNK_004012b0);
if (lStack_20 != 0) {
func_0x00400a80(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18);
}
badSink(puStack_10);
return;
}
| ['gcc'] |
5,775 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_41_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109290/CWE606_Unchecked_Loop_Condition__wchar_t_environment_41.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_41_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_41_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,776 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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/109291/CWE606_Unchecked_Loop_Condition__wchar_t_environment_42.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_42_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ae0(puStack_18,&UNK_004012b4,&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,777 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_42_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109291/CWE606_Unchecked_Loop_Condition__wchar_t_environment_42.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_42_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_42_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,778 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_51_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_51b_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/109295/CWE606_Unchecked_Loop_Condition__wchar_t_environment_51a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_51_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_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_0x00400ab0(puStack_10);
lStack_20 = func_0x00400a60(&UNK_004012a4);
if (lStack_20 != 0) {
func_0x00400a80(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18);
}
CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,779 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_51_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109295/CWE606_Unchecked_Loop_Condition__wchar_t_environment_51a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_51_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_51_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,780 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b_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/109295/CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400ae0(param_1,&UNK_004012a4,&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,781 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b_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/109295/CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b10(param_1,&UNK_004013c4,&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,782 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b_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/109295/CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_51b_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b10(param_1,&UNK_004013c4,&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,783 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52_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_52b_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/109296/CWE606_Unchecked_Loop_Condition__wchar_t_environment_52a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_52_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52_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_004012b4);
if (lStack_20 != 0) {
func_0x00400a80(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18);
}
CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,784 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109296/CWE606_Unchecked_Loop_Condition__wchar_t_environment_52a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_52_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,785 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b_badSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109296/CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_badSink(param_1);
return;
}
| ['gcc'] |
5,786 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b_goodG2BSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109296/CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,787 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b_goodB2GSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109296/CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52b_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,788 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_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/109296/CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400ae0(param_1,&UNK_004012b4,&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,789 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_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/109296/CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b10(param_1,&UNK_004013f4,&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,790 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_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/109296/CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_52c_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400b10(param_1,&UNK_004013f4,&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,791 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53_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_53b_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/109297/CWE606_Unchecked_Loop_Condition__wchar_t_environment_53a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53_bad |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53_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_004012d4);
if (lStack_20 != 0) {
func_0x00400a80(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18);
}
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,792 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53_good()
{
goodG2B();
goodB2G();
} | [] | 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_53a.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53_good |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,793 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b_badSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109297/CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_badSink(param_1);
return;
}
| ['gcc'] |
5,794 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b_goodG2BSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_goodG2BSink(data);
} | [] | 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_53b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,795 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b_goodB2GSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_goodB2GSink(data);
} | [] | 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_53b.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53b_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,796 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_badSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/109297/CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_badSink(param_1);
return;
}
| ['gcc'] |
5,797 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_goodG2BSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_goodG2BSink(data);
} | [] | 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_53c.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,798 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_goodB2GSink(wchar_t * data)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_goodB2GSink(data);
} | [] | 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_53c.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53c_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,799 | void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_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/109297/CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d.c | CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_badSink |
void CWE606_Unchecked_Loop_Condition__wchar_t_environment_53d_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400ae0(param_1,&UNK_004012d4,&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'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.