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
2,400
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_06_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; data = dataBuffer; if(STATIC_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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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'; } } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103149/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_06.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_06_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_06_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [122]; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 0xfaU - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,0xfa - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401328); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b10(puStack_10); return; }
['gcc']
2,401
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103149/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_06.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_06_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,402
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_07_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; data = dataBuffer; if(staticFive==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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'; } } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103150/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_07.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_07_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_07_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [122]; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (staticFive == 5) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 0xfaU - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,0xfa - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b10(puStack_10); return; }
['gcc']
2,403
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103150/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_07.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_07_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,404
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_08_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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'; } } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103151/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_08.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_08_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_08_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [122]; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar3 = auStack_3e8; for (lVar2 = 0x79; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_408; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 0xfaU - lStack_18) { lVar2 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,0xfa - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401334); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b10(puStack_10); return; }
['gcc']
2,405
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103151/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_08.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_08_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,406
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_09_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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'; } } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103152/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_09.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_09_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_09_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [122]; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (GLOBAL_CONST_TRUE != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 0xfaU - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,0xfa - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b10(puStack_10); return; }
['gcc']
2,407
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103152/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_09.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_09_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,408
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_10_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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'; } } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103153/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_10.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_10_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_10_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [122]; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (globalTrue != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 0xfaU - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,0xfa - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b10(puStack_10); return; }
['gcc']
2,409
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103153/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_10.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_10_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,410
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_11_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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'; } } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103154/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_11.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_11_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_11_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [122]; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar3 = auStack_3e8; for (lVar2 = 0x79; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_408; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 0xfaU - lStack_18) { lVar2 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,0xfa - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401324); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b10(puStack_10); return; }
['gcc']
2,411
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103154/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_11.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_11_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,412
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_12_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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 the path as the "system" path */ wcscat(data, NEW_PATH); } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* FIX: Set the path as the "system" path */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103155/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_12.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_12_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_12_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [122]; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar3 = auStack_3e8; for (lVar2 = 0x79; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_408; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { func_0x00400b10(puStack_10,&UNK_004013d4); } else { lStack_18 = func_0x00400b60(puStack_10); if (1 < 0xfaU - lStack_18) { lVar2 = func_0x00400b20(lStack_18 * 4 + (long)puStack_10,0xfa - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_004013c4); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b60(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400ba0(puStack_10); return; }
['gcc']
2,413
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103155/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_12.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_12_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_12_good(void) { goodG2B(); return; }
['gcc']
2,414
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_13_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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'; } } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103156/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_13.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_13_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_13_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [122]; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (GLOBAL_CONST_FIVE == 5) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 0xfaU - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,0xfa - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b10(puStack_10); return; }
['gcc']
2,415
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103156/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_13.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_13_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,416
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_14_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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'; } } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103157/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_14.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_14_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_14_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [122]; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (globalFive == 5) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 0xfaU - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,0xfa - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b10(puStack_10); return; }
['gcc']
2,417
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103157/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_14.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_14_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,418
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_15_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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; } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103158/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_15.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_15_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_15_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [122]; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 0xfaU - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,0xfa - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b10(puStack_10); return; }
['gcc']
2,419
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103158/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_15.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_15_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,420
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_17_bad() { int i; wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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'; } } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103160/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_17.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_17_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_17_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; undefined8 *puStack_18; int iStack_c; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_18 = &uStack_408; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { lStack_20 = func_0x00400ad0(puStack_18); if (1 < 0xfaU - lStack_20) { lVar1 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,0xfa - (int)lStack_20,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0; } else { lStack_20 = func_0x00400ad0(puStack_18); if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0; } } } } func_0x00400b10(puStack_18); return; }
['gcc']
2,421
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103160/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_17.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_17_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_17_good(void) { goodG2B(); return; }
['gcc']
2,422
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_21_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; data = dataBuffer; badStatic = 1; /* true */ data = badSource(data); /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* true */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103162/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_21.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_21_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_21_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 uStack_3e8; undefined8 uStack_3e0; undefined8 auStack_3d8 [121]; undefined8 *puStack_10; uStack_3f8 = 0x4100000050; uStack_3f0 = 0x4800000054; uStack_3e8 = 0x3d; uStack_3e0 = 0; puVar2 = auStack_3d8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_3f8; badStatic = 1; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400b10(puStack_10); return; }
['gcc']
2,423
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103162/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_21.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_21_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,424
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; data = dataBuffer; CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_badGlobal = 1; /* true */ data = CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_badSource(data); /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* true */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103163/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 uStack_3e8; undefined8 uStack_3e0; undefined8 auStack_3d8 [121]; undefined8 *puStack_10; uStack_3f8 = 0x4100000050; uStack_3f0 = 0x4800000054; uStack_3e8 = 0x3d; uStack_3e0 = 0; puVar2 = auStack_3d8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_3f8; CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_badGlobal = 1; puStack_10 = (undefined8 *) CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_badSource(puStack_10); func_0x00400b10(puStack_10); return; }
['gcc']
2,425
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103163/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,426
wchar_t * CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_badSource(wchar_t * data) { if(CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_badGlobal) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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 */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103163/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_badSource
long CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_badSource(long param_1) { long lVar1; long lVar2; if (CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_badGlobal != 0) { lVar1 = func_0x00400ad0(param_1); if (1 < 0xfaU - lVar1) { lVar2 = func_0x00400a90(lVar1 * 4 + param_1,0xfa - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401344); *(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']
2,427
wchar_t * CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_goodG2B1Source(wchar_t * data) { if(CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_goodG2B1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Set the path as the "system" path */ wcscat(data, NEW_PATH); } return data; }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Set the path as the "system" path */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103163/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_goodG2B1Source
undefined8 CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_goodG2B1Source(undefined8 param_1) { if (CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_goodG2B1Global == 0) { func_0x00400a20(param_1,&UNK_0040130c); } else { printLine(&UNK_004012f4); } return param_1; }
['gcc']
2,428
wchar_t * CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_goodG2B2Source(wchar_t * data) { if(CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_goodG2B2Global) { /* FIX: Set the path as the "system" path */ wcscat(data, NEW_PATH); } return data; }
['/* FIX: Set the path as the "system" path */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103163/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_goodG2B2Source
undefined8 CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_goodG2B2Source(undefined8 param_1) { if (CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_22_goodG2B2Global != 0) { func_0x00400a20(param_1,&UNK_0040130c); } return param_1; }
['gcc']
2,429
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_32_bad() { wchar_t * data; wchar_t * *dataPtr1 = &data; wchar_t * *dataPtr2 = &data; wchar_t dataBuffer[250] = L"PATH="; 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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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; /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103165/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_32.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_32_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_32_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_428; undefined8 uStack_420; undefined8 uStack_418; undefined8 uStack_410; undefined8 auStack_408 [122]; undefined8 *puStack_38; undefined8 *puStack_30; long lStack_28; undefined8 *puStack_20; undefined8 **ppuStack_18; undefined8 **ppuStack_10; ppuStack_10 = &puStack_38; ppuStack_18 = &puStack_38; uStack_428 = 0x4100000050; uStack_420 = 0x4800000054; uStack_418 = 0x3d; uStack_410 = 0; puVar2 = auStack_408; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_38 = &uStack_428; puStack_20 = *ppuStack_10; lStack_28 = func_0x00400ad0(puStack_20); if (1 < 0xfaU - lStack_28) { lVar1 = func_0x00400a90(lStack_28 * 4 + (long)puStack_20,0xfa - (int)lStack_28,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(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; } } } *ppuStack_10 = puStack_20; puStack_30 = *ppuStack_18; func_0x00400b10(puStack_30); return; }
['gcc']
2,430
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103165/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_32.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_32_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_32_good(void) { goodG2B(); return; }
['gcc']
2,431
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_42_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; data = dataBuffer; data = badSource(data); /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103169/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_42.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_42_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_42_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 uStack_3e8; undefined8 uStack_3e0; undefined8 auStack_3d8 [121]; undefined8 *puStack_10; uStack_3f8 = 0x4100000050; uStack_3f0 = 0x4800000054; uStack_3e8 = 0x3d; uStack_3e0 = 0; puVar2 = auStack_3d8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_3f8; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400b10(puStack_10); return; }
['gcc']
2,432
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_42_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103169/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_42.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_42_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_42_good(void) { goodG2B(); return; }
['gcc']
2,433
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; data = dataBuffer; data = CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61b_badSource(data); /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103177/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 uStack_3e8; undefined8 uStack_3e0; undefined8 auStack_3d8 [121]; undefined8 *puStack_10; uStack_3f8 = 0x4100000050; uStack_3f0 = 0x4800000054; uStack_3e8 = 0x3d; uStack_3e0 = 0; puVar2 = auStack_3d8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_3f8; puStack_10 = (undefined8 *) CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61b_badSource(puStack_10); func_0x00400b10(puStack_10); return; }
['gcc']
2,434
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103177/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61_good(void) { goodG2B(); return; }
['gcc']
2,435
wchar_t * CWE427_Uncontrolled_Search_Path_Element__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 (250-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(250-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 */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103177/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61b_badSource
long CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61b_badSource(long param_1) { long lVar1; long lVar2; lVar1 = func_0x00400ad0(param_1); if (1 < 0xfaU - lVar1) { lVar2 = func_0x00400a90(lVar1 * 4 + param_1,0xfa - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401334); *(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']
2,436
wchar_t * CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61b_goodG2BSource(wchar_t * data) { /* FIX: Set the path as the "system" path */ wcscat(data, NEW_PATH); return data; }
['/* FIX: Set the path as the "system" path */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103177/CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61b_goodG2BSource
undefined8 CWE427_Uncontrolled_Search_Path_Element__wchar_t_console_61b_goodG2BSource(undefined8 param_1) { func_0x00400a20(param_1,&UNK_00401204); return param_1; }
['gcc']
2,437
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_02_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103193/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_02.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_02_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_02_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012a4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } func_0x00400b20(puStack_10); return; }
['gcc']
2,438
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103193/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_02.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_02_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,439
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_03_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103194/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_03.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_03_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_03_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012a4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } func_0x00400b20(puStack_10); return; }
['gcc']
2,440
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103194/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_03.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_03_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,441
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_04_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103195/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_04.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_04_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_04_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012bc); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } func_0x00400b20(puStack_10); return; }
['gcc']
2,442
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103195/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_04.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_04_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,443
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_05_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103196/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_05.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_05_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_05_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (staticTrue != 0) { lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012b4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } } func_0x00400b20(puStack_10); return; }
['gcc']
2,444
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103196/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_05.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_05_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,445
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_06_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103197/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_06.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_06_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_06_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012b8); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } func_0x00400b20(puStack_10); return; }
['gcc']
2,446
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103197/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_06.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_06_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,447
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_07_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; data = dataBuffer; if(staticFive==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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103198/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_07.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_07_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_07_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (staticFive == 5) { lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012b4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } } func_0x00400b20(puStack_10); return; }
['gcc']
2,448
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103198/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_07.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_07_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,449
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_08_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103199/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_08.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_08_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_08_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar3 = auStack_3e8; for (lVar2 = 0x79; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_408; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012c4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } } func_0x00400b20(puStack_10); return; }
['gcc']
2,450
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103199/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_08.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_08_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,451
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_09_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103200/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_09.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_09_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_09_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (GLOBAL_CONST_TRUE != 0) { lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012b4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } } func_0x00400b20(puStack_10); return; }
['gcc']
2,452
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103200/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_09.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_09_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,453
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_10_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103201/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_10.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_10_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_10_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (globalTrue != 0) { lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012b4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } } func_0x00400b20(puStack_10); return; }
['gcc']
2,454
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103201/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_10.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_10_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,455
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_11_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103202/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_11.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_11_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_11_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar3 = auStack_3e8; for (lVar2 = 0x79; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_408; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012b4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } } func_0x00400b20(puStack_10); return; }
['gcc']
2,456
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103202/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_11.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_11_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,457
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_12_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } else { /* FIX: Set the path as the "system" path */ wcscat(data, NEW_PATH); } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* FIX: Set the path as the "system" path */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103203/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_12.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_12_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_12_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar3 = auStack_3e8; for (lVar2 = 0x79; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_408; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { func_0x00400b10(puStack_10,&UNK_00401364); } else { lStack_18 = func_0x00400b70(puStack_10); lStack_20 = func_0x00400b20(&UNK_00401354); if (lStack_20 != 0) { func_0x00400b40(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } } func_0x00400bb0(puStack_10); return; }
['gcc']
2,458
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103203/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_12.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_12_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_12_good(void) { goodG2B(); return; }
['gcc']
2,459
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_13_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103204/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_13.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_13_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_13_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (GLOBAL_CONST_FIVE == 5) { lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012b4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } } func_0x00400b20(puStack_10); return; }
['gcc']
2,460
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103204/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_13.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_13_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,461
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_14_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103205/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_14.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_14_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_14_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; if (globalFive == 5) { lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012b4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } } func_0x00400b20(puStack_10); return; }
['gcc']
2,462
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103205/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_14.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_14_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,463
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_15_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103206/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_15.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_15_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_15_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012a4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } func_0x00400b20(puStack_10); return; }
['gcc']
2,464
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103206/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_15.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_15_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,465
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_16_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } break; } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103207/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_16.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_16_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_16_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012a4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } func_0x00400b20(puStack_10); return; }
['gcc']
2,466
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103207/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_16.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_16_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_16_good(void) { goodG2B(); return; }
['gcc']
2,467
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_17_bad() { int i; wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } } /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103208/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_17.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_17_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_17_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_418; undefined8 uStack_410; undefined8 uStack_408; undefined8 uStack_400; undefined8 auStack_3f8 [122]; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_c; uStack_418 = 0x4100000050; uStack_410 = 0x4800000054; uStack_408 = 0x3d; uStack_400 = 0; puVar2 = auStack_3f8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_18 = &uStack_418; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { lStack_20 = func_0x00400ae0(puStack_18); lStack_28 = func_0x00400a90(&UNK_004012b4); if (lStack_28 != 0) { func_0x00400ab0(lStack_20 * 4 + (long)puStack_18,lStack_28,0xf9 - lStack_20); } } func_0x00400b20(puStack_18); return; }
['gcc']
2,468
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103208/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_17.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_17_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_17_good(void) { goodG2B(); return; }
['gcc']
2,469
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_21_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; data = dataBuffer; badStatic = 1; /* true */ data = badSource(data); /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* true */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103210/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_21.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_21_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_21_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 uStack_3e8; undefined8 uStack_3e0; undefined8 auStack_3d8 [121]; undefined8 *puStack_10; uStack_3f8 = 0x4100000050; uStack_3f0 = 0x4800000054; uStack_3e8 = 0x3d; uStack_3e0 = 0; puVar2 = auStack_3d8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_3f8; badStatic = 1; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400b20(puStack_10); return; }
['gcc']
2,470
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103210/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_21.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_21_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,471
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; data = dataBuffer; CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_badGlobal = 1; /* true */ data = CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_badSource(data); /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* true */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103211/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 uStack_3e8; undefined8 uStack_3e0; undefined8 auStack_3d8 [121]; undefined8 *puStack_10; uStack_3f8 = 0x4100000050; uStack_3f0 = 0x4800000054; uStack_3e8 = 0x3d; uStack_3e0 = 0; puVar2 = auStack_3d8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_3f8; CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_badGlobal = 1; puStack_10 = (undefined8 *) CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_badSource(puStack_10) ; func_0x00400b20(puStack_10); return; }
['gcc']
2,472
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103211/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
2,473
wchar_t * CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_badSource(wchar_t * data) { if(CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_badGlobal) { { /* 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, 250-dataLen-1); } } } return data; }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103211/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_badSource
long CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_badSource(long param_1) { long lVar1; long lVar2; if (CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_badGlobal != 0) { lVar1 = func_0x00400ae0(param_1); lVar2 = func_0x00400a90(&UNK_004012e4); if (lVar2 != 0) { func_0x00400ab0(lVar1 * 4 + param_1,lVar2,0xf9 - lVar1); } } return param_1; }
['gcc']
2,474
wchar_t * CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_goodG2B1Source(wchar_t * data) { if(CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_goodG2B1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Set the path as the "system" path */ wcscat(data, NEW_PATH); } return data; }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Set the path as the "system" path */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103211/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_goodG2B1Source
undefined8 CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_goodG2B1Source(undefined8 param_1) { if (CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_goodG2B1Global == 0) { func_0x00400a20(param_1,&UNK_0040130c); } else { printLine(&UNK_004012f4); } return param_1; }
['gcc']
2,475
wchar_t * CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_goodG2B2Source(wchar_t * data) { if(CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_goodG2B2Global) { /* FIX: Set the path as the "system" path */ wcscat(data, NEW_PATH); } return data; }
['/* FIX: Set the path as the "system" path */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103211/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_goodG2B2Source
undefined8 CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_goodG2B2Source(undefined8 param_1) { if (CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_22_goodG2B2Global != 0) { func_0x00400a20(param_1,&UNK_0040130c); } return param_1; }
['gcc']
2,476
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_31_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } { wchar_t * dataCopy = data; wchar_t * data = dataCopy; /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103212/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_31.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_31_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_31_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_418; undefined8 uStack_410; undefined8 uStack_408; undefined8 uStack_400; undefined8 auStack_3f8 [121]; undefined8 *puStack_30; undefined8 *puStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_418 = 0x4100000050; uStack_410 = 0x4800000054; uStack_408 = 0x3d; uStack_400 = 0; puVar2 = auStack_3f8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_418; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012b4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } puStack_28 = puStack_10; puStack_30 = puStack_10; func_0x00400b20(puStack_10); return; }
['gcc']
2,477
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_31_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103212/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_31.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_31_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_31_good(void) { goodG2B(); return; }
['gcc']
2,478
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_32_bad() { wchar_t * data; wchar_t * *dataPtr1 = &data; wchar_t * *dataPtr2 = &data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } *dataPtr1 = data; } { wchar_t * data = *dataPtr2; /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103213/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_32.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_32_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_32_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_428; undefined8 uStack_420; undefined8 uStack_418; undefined8 uStack_410; undefined8 auStack_408 [121]; undefined8 *puStack_40; undefined8 *puStack_38; long lStack_30; long lStack_28; undefined8 *puStack_20; undefined8 **ppuStack_18; undefined8 **ppuStack_10; ppuStack_10 = &puStack_40; ppuStack_18 = &puStack_40; uStack_428 = 0x4100000050; uStack_420 = 0x4800000054; uStack_418 = 0x3d; uStack_410 = 0; puVar2 = auStack_408; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_40 = &uStack_428; puStack_20 = *ppuStack_10; lStack_28 = func_0x00400ae0(puStack_20); lStack_30 = func_0x00400a90(&UNK_004012d4); if (lStack_30 != 0) { func_0x00400ab0(lStack_28 * 4 + (long)puStack_20,lStack_30,0xf9 - lStack_28); } *ppuStack_10 = puStack_20; puStack_38 = *ppuStack_18; func_0x00400b20(puStack_38); return; }
['gcc']
2,479
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103213/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_32.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_32_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_32_good(void) { goodG2B(); return; }
['gcc']
2,480
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_34_bad() { wchar_t * data; CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_34_unionType myUnion; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } myUnion.unionFirst = data; { wchar_t * data = myUnion.unionSecond; /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(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 */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103215/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_34.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_34_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_34_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_418; undefined8 uStack_410; undefined8 uStack_408; undefined8 uStack_400; undefined8 auStack_3f8 [121]; undefined8 *puStack_30; undefined8 *puStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_418 = 0x4100000050; uStack_410 = 0x4800000054; uStack_408 = 0x3d; uStack_400 = 0; puVar2 = auStack_3f8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_418; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012b4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } puStack_30 = puStack_10; puStack_28 = puStack_10; func_0x00400b20(puStack_10); return; }
['gcc']
2,481
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_34_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103215/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_34.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_34_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_34_good(void) { goodG2B(); return; }
['gcc']
2,482
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_badSink(wchar_t * data) { /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103216/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_badSink
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_badSink(undefined8 param_1) { func_0x00400b20(param_1); return; }
['gcc']
2,483
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_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 */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103216/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012c4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_badSink(puStack_10); return; }
['gcc']
2,484
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_goodG2BSink(wchar_t * data) { /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103216/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_goodG2BSink
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_goodG2BSink(undefined8 param_1) { func_0x00400a90(param_1); return; }
['gcc']
2,485
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103216/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_41_good(void) { goodG2B(); return; }
['gcc']
2,486
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_42_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; data = dataBuffer; data = badSource(data); /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103217/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_42.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_42_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_42_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 uStack_3e8; undefined8 uStack_3e0; undefined8 auStack_3d8 [121]; undefined8 *puStack_10; uStack_3f8 = 0x4100000050; uStack_3f0 = 0x4800000054; uStack_3e8 = 0x3d; uStack_3e0 = 0; puVar2 = auStack_3d8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_3f8; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400b20(puStack_10); return; }
['gcc']
2,487
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_42_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103217/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_42.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_42_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_42_good(void) { goodG2B(); return; }
['gcc']
2,488
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } CWE427_Uncontrolled_Search_Path_Element__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 */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103221/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012c4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51b_badSink(puStack_10); return; }
['gcc']
2,489
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103221/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51_good(void) { goodG2B(); return; }
['gcc']
2,490
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51b_badSink(wchar_t * data) { /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103221/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51b_badSink
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51b_badSink(undefined8 param_1) { func_0x00400b20(param_1); return; }
['gcc']
2,491
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51b_goodG2BSink(wchar_t * data) { /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103221/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51b_goodG2BSink
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_51b_goodG2BSink (undefined8 param_1) { func_0x00400a90(param_1); return; }
['gcc']
2,492
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } CWE427_Uncontrolled_Search_Path_Element__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 */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103222/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012e4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52b_badSink(puStack_10); return; }
['gcc']
2,493
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103222/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52_good(void) { goodG2B(); return; }
['gcc']
2,494
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52b_badSink(wchar_t * data) { CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c_badSink(data); }
[]
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103222/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52b_badSink
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52b_badSink(undefined8 param_1) { CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c_badSink(param_1); return; }
['gcc']
2,495
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52b_goodG2BSink(wchar_t * data) { CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103222/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52b.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52b_goodG2BSink
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52b_goodG2BSink (undefined8 param_1) { CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c_goodG2BSink(param_1); return; }
['gcc']
2,496
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c_badSink(wchar_t * data) { /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103222/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c_badSink
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c_badSink(undefined8 param_1) { func_0x00400b20(param_1); return; }
['gcc']
2,497
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c_goodG2BSink(wchar_t * data) { /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */ PUTENV(data); }
['/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103222/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c_goodG2BSink
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_52c_goodG2BSink (undefined8 param_1) { func_0x00400a90(param_1); return; }
['gcc']
2,498
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_53_bad() { wchar_t * data; wchar_t dataBuffer[250] = L"PATH="; 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, 250-dataLen-1); } } CWE427_Uncontrolled_Search_Path_Element__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 */']
['CWE427']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103223/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_53a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_53_bad
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_53_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_408; undefined8 uStack_400; undefined8 uStack_3f8; undefined8 uStack_3f0; undefined8 auStack_3e8 [121]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_408 = 0x4100000050; uStack_400 = 0x4800000054; uStack_3f8 = 0x3d; uStack_3f0 = 0; puVar2 = auStack_3e8; for (lVar1 = 0x79; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_408; lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012f4); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,0xf9 - lStack_18); } CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_53b_badSink(puStack_10); return; }
['gcc']
2,499
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_53_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/103223/CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_53a.c
CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_53_good
void CWE427_Uncontrolled_Search_Path_Element__wchar_t_environment_53_good(void) { goodG2B(); return; }
['gcc']