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
14,700
void CWE78_OS_Command_Injection__wchar_t_console_popen_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120926/CWE78_OS_Command_Injection__wchar_t_console_popen_08.c
CWE78_OS_Command_Injection__wchar_t_console_popen_08_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,701
void CWE78_OS_Command_Injection__wchar_t_console_popen_09_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(GLOBAL_CONST_TRUE) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120927/CWE78_OS_Command_Injection__wchar_t_console_popen_09.c
CWE78_OS_Command_Injection__wchar_t_console_popen_09_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_09_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [43]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; if (GLOBAL_CONST_TRUE != 0) { lStack_18 = func_0x00400b50(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401414); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b50(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_00401424); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']
14,702
void CWE78_OS_Command_Injection__wchar_t_console_popen_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120927/CWE78_OS_Command_Injection__wchar_t_console_popen_09.c
CWE78_OS_Command_Injection__wchar_t_console_popen_09_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,703
void CWE78_OS_Command_Injection__wchar_t_console_popen_10_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalTrue) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120928/CWE78_OS_Command_Injection__wchar_t_console_popen_10.c
CWE78_OS_Command_Injection__wchar_t_console_popen_10_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_10_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [43]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; if (globalTrue != 0) { lStack_18 = func_0x00400b50(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401414); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b50(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_00401424); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']
14,704
void CWE78_OS_Command_Injection__wchar_t_console_popen_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120928/CWE78_OS_Command_Injection__wchar_t_console_popen_10.c
CWE78_OS_Command_Injection__wchar_t_console_popen_10_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,705
void CWE78_OS_Command_Injection__wchar_t_console_popen_11_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalReturnsTrue()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120929/CWE78_OS_Command_Injection__wchar_t_console_popen_11.c
CWE78_OS_Command_Injection__wchar_t_console_popen_11_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_11_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [43]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar3 = auStack_178; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1b8; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400b50(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401414); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b50(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_00401424); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']
14,706
void CWE78_OS_Command_Injection__wchar_t_console_popen_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120929/CWE78_OS_Command_Injection__wchar_t_console_popen_11.c
CWE78_OS_Command_Injection__wchar_t_console_popen_11_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,707
void CWE78_OS_Command_Injection__wchar_t_console_popen_12_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalReturnsTrueOrFalse()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } else { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Append a fixed string to data (not user / external input) */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120930/CWE78_OS_Command_Injection__wchar_t_console_popen_12.c
CWE78_OS_Command_Injection__wchar_t_console_popen_12_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_12_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [43]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar3 = auStack_178; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1b8; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { func_0x00400b40(puStack_10,&UNK_00401474); } else { lStack_18 = func_0x00400b90(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b50(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401464); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b90(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } lStack_20 = func_0x00400c20(puStack_10,&UNK_00401484); if (lStack_20 != 0) { func_0x00400ba0(lStack_20); } return; }
['gcc']
14,708
void CWE78_OS_Command_Injection__wchar_t_console_popen_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120930/CWE78_OS_Command_Injection__wchar_t_console_popen_12.c
CWE78_OS_Command_Injection__wchar_t_console_popen_12_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_12_good(void) { goodG2B(); return; }
['gcc']
14,709
void CWE78_OS_Command_Injection__wchar_t_console_popen_13_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(GLOBAL_CONST_FIVE==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120931/CWE78_OS_Command_Injection__wchar_t_console_popen_13.c
CWE78_OS_Command_Injection__wchar_t_console_popen_13_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_13_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [43]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; if (GLOBAL_CONST_FIVE == 5) { lStack_18 = func_0x00400b50(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401414); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b50(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_00401424); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']
14,710
void CWE78_OS_Command_Injection__wchar_t_console_popen_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120931/CWE78_OS_Command_Injection__wchar_t_console_popen_13.c
CWE78_OS_Command_Injection__wchar_t_console_popen_13_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,711
void CWE78_OS_Command_Injection__wchar_t_console_popen_14_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalFive==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120932/CWE78_OS_Command_Injection__wchar_t_console_popen_14.c
CWE78_OS_Command_Injection__wchar_t_console_popen_14_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_14_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [43]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; if (globalFive == 5) { lStack_18 = func_0x00400b50(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401414); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b50(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_00401424); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']
14,712
void CWE78_OS_Command_Injection__wchar_t_console_popen_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120932/CWE78_OS_Command_Injection__wchar_t_console_popen_14.c
CWE78_OS_Command_Injection__wchar_t_console_popen_14_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,713
void CWE78_OS_Command_Injection__wchar_t_console_popen_15_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; switch(6) { case 6: { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120933/CWE78_OS_Command_Injection__wchar_t_console_popen_15.c
CWE78_OS_Command_Injection__wchar_t_console_popen_15_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_15_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [43]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; lStack_18 = func_0x00400b50(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401404); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b50(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_00401414); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']
14,714
void CWE78_OS_Command_Injection__wchar_t_console_popen_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120933/CWE78_OS_Command_Injection__wchar_t_console_popen_15.c
CWE78_OS_Command_Injection__wchar_t_console_popen_15_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,715
void CWE78_OS_Command_Injection__wchar_t_console_popen_16_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; while(1) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } break; } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120934/CWE78_OS_Command_Injection__wchar_t_console_popen_16.c
CWE78_OS_Command_Injection__wchar_t_console_popen_16_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_16_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [43]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; lStack_18 = func_0x00400b50(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401404); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b50(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_00401414); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']
14,716
void CWE78_OS_Command_Injection__wchar_t_console_popen_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120934/CWE78_OS_Command_Injection__wchar_t_console_popen_16.c
CWE78_OS_Command_Injection__wchar_t_console_popen_16_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_16_good(void) { goodG2B(); return; }
['gcc']
14,717
void CWE78_OS_Command_Injection__wchar_t_console_popen_17_bad() { int i; wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; for(i = 0; i < 1; i++) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120935/CWE78_OS_Command_Injection__wchar_t_console_popen_17.c
CWE78_OS_Command_Injection__wchar_t_console_popen_17_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_17_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_c; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_18 = &uStack_1b8; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { lStack_28 = func_0x00400b50(puStack_18); if (1 < 100U - lStack_28) { lVar1 = func_0x00400b10(lStack_28 * 4 + (long)puStack_18,100 - (int)lStack_28,stdin); if (lVar1 == 0) { printLine(&UNK_00401424); *(undefined4 *)((long)puStack_18 + lStack_28 * 4) = 0; } else { lStack_28 = func_0x00400b50(puStack_18); if ((lStack_28 != 0) && (*(int *)((long)puStack_18 + lStack_28 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_18 + lStack_28 * 4 + -4) = 0; } } } } lStack_20 = func_0x00400be0(puStack_18,&UNK_00401434); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']
14,718
void CWE78_OS_Command_Injection__wchar_t_console_popen_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120935/CWE78_OS_Command_Injection__wchar_t_console_popen_17.c
CWE78_OS_Command_Injection__wchar_t_console_popen_17_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_17_good(void) { goodG2B(); return; }
['gcc']
14,719
void CWE78_OS_Command_Injection__wchar_t_console_popen_21_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; badStatic = 1; /* true */ data = badSource(data); { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* true */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120937/CWE78_OS_Command_Injection__wchar_t_console_popen_21.c
CWE78_OS_Command_Injection__wchar_t_console_popen_21_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_21_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar2 = auStack_168; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; badStatic = 1; puStack_10 = (undefined8 *)badSource(puStack_10); lStack_18 = func_0x00400be0(puStack_10,&UNK_00401454); if (lStack_18 != 0) { func_0x00400b60(lStack_18); } return; }
['gcc']
14,720
void CWE78_OS_Command_Injection__wchar_t_console_popen_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120937/CWE78_OS_Command_Injection__wchar_t_console_popen_21.c
CWE78_OS_Command_Injection__wchar_t_console_popen_21_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,721
void CWE78_OS_Command_Injection__wchar_t_console_popen_22_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; CWE78_OS_Command_Injection__wchar_t_console_popen_22_badGlobal = 1; /* true */ data = CWE78_OS_Command_Injection__wchar_t_console_popen_22_badSource(data); { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* true */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120938/CWE78_OS_Command_Injection__wchar_t_console_popen_22a.c
CWE78_OS_Command_Injection__wchar_t_console_popen_22_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_22_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar2 = auStack_168; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; CWE78_OS_Command_Injection__wchar_t_console_popen_22_badGlobal = 1; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__wchar_t_console_popen_22_badSource(puStack_10); lStack_18 = func_0x00400be0(puStack_10,&UNK_00401444); if (lStack_18 != 0) { func_0x00400b60(lStack_18); } return; }
['gcc']
14,722
void CWE78_OS_Command_Injection__wchar_t_console_popen_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120938/CWE78_OS_Command_Injection__wchar_t_console_popen_22a.c
CWE78_OS_Command_Injection__wchar_t_console_popen_22_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,723
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_popen_22_badSource(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_console_popen_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 (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } return data; }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* Restore NUL terminator if fgetws fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120938/CWE78_OS_Command_Injection__wchar_t_console_popen_22b.c
CWE78_OS_Command_Injection__wchar_t_console_popen_22_badSource
long CWE78_OS_Command_Injection__wchar_t_console_popen_22_badSource(long param_1) { long lVar1; long lVar2; if (CWE78_OS_Command_Injection__wchar_t_console_popen_22_badGlobal != 0) { lVar1 = func_0x00400b50(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400b10(lVar1 * 4 + param_1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401444); *(undefined4 *)(param_1 + lVar1 * 4) = 0; } else { lVar1 = func_0x00400b50(param_1); if ((lVar1 != 0) && (*(int *)(param_1 + lVar1 * 4 + -4) == 10)) { *(undefined4 *)(param_1 + lVar1 * 4 + -4) = 0; } } } } return param_1; }
['gcc']
14,724
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_popen_22_goodG2B1Source(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_console_popen_22_goodG2B1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } return data; }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120938/CWE78_OS_Command_Injection__wchar_t_console_popen_22b.c
CWE78_OS_Command_Injection__wchar_t_console_popen_22_goodG2B1Source
undefined8 CWE78_OS_Command_Injection__wchar_t_console_popen_22_goodG2B1Source(undefined8 param_1) { if (CWE78_OS_Command_Injection__wchar_t_console_popen_22_goodG2B1Global == 0) { func_0x00400a60(param_1,&UNK_0040141c); } else { printLine(&UNK_00401404); } return param_1; }
['gcc']
14,725
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_popen_22_goodG2B2Source(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_console_popen_22_goodG2B2Global) { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } return data; }
['/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120938/CWE78_OS_Command_Injection__wchar_t_console_popen_22b.c
CWE78_OS_Command_Injection__wchar_t_console_popen_22_goodG2B2Source
undefined8 CWE78_OS_Command_Injection__wchar_t_console_popen_22_goodG2B2Source(undefined8 param_1) { if (CWE78_OS_Command_Injection__wchar_t_console_popen_22_goodG2B2Global != 0) { func_0x00400a60(param_1,&UNK_0040141c); } return param_1; }
['gcc']
14,726
void CWE78_OS_Command_Injection__wchar_t_console_popen_32_bad() { wchar_t * data; wchar_t * *dataPtr1 = &data; wchar_t * *dataPtr2 = &data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; { wchar_t * data = *dataPtr1; { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } *dataPtr1 = data; } { wchar_t * data = *dataPtr2; { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120940/CWE78_OS_Command_Injection__wchar_t_console_popen_32.c
CWE78_OS_Command_Injection__wchar_t_console_popen_32_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_32_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1d8; undefined8 uStack_1d0; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [43]; undefined8 *puStack_40; long lStack_38; undefined8 *puStack_30; long lStack_28; undefined8 *puStack_20; undefined8 **ppuStack_18; undefined8 **ppuStack_10; ppuStack_10 = &puStack_40; ppuStack_18 = &puStack_40; uStack_1d8 = 0x620000002f; uStack_1d0 = 0x6e00000069; uStack_1c8 = 0x730000002f; uStack_1c0 = 0x2000000068; uStack_1b8 = 0x730000006c; uStack_1b0 = 0x2d00000020; uStack_1a8 = 0x610000006c; uStack_1a0 = 0x20; puVar2 = auStack_198; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_40 = &uStack_1d8; puStack_20 = *ppuStack_10; lStack_28 = func_0x00400b50(puStack_20); if (1 < 100U - lStack_28) { lVar1 = func_0x00400b10(lStack_28 * 4 + (long)puStack_20,100 - (int)lStack_28,stdin); if (lVar1 == 0) { printLine(&UNK_00401434); *(undefined4 *)((long)puStack_20 + lStack_28 * 4) = 0; } else { lStack_28 = func_0x00400b50(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; lStack_38 = func_0x00400be0(puStack_30,&UNK_00401444); if (lStack_38 != 0) { func_0x00400b60(lStack_38); } return; }
['gcc']
14,727
void CWE78_OS_Command_Injection__wchar_t_console_popen_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120940/CWE78_OS_Command_Injection__wchar_t_console_popen_32.c
CWE78_OS_Command_Injection__wchar_t_console_popen_32_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_32_good(void) { goodG2B(); return; }
['gcc']
14,728
void CWE78_OS_Command_Injection__wchar_t_console_popen_42_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; data = badSource(data); { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120944/CWE78_OS_Command_Injection__wchar_t_console_popen_42.c
CWE78_OS_Command_Injection__wchar_t_console_popen_42_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_42_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar2 = auStack_168; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; puStack_10 = (undefined8 *)badSource(puStack_10); lStack_18 = func_0x00400be0(puStack_10,&UNK_00401434); if (lStack_18 != 0) { func_0x00400b60(lStack_18); } return; }
['gcc']
14,729
void CWE78_OS_Command_Injection__wchar_t_console_popen_42_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120944/CWE78_OS_Command_Injection__wchar_t_console_popen_42.c
CWE78_OS_Command_Injection__wchar_t_console_popen_42_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_42_good(void) { goodG2B(); return; }
['gcc']
14,730
void CWE78_OS_Command_Injection__wchar_t_console_popen_61_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; data = CWE78_OS_Command_Injection__wchar_t_console_popen_61b_badSource(data); { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120952/CWE78_OS_Command_Injection__wchar_t_console_popen_61a.c
CWE78_OS_Command_Injection__wchar_t_console_popen_61_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_61_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar2 = auStack_168; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__wchar_t_console_popen_61b_badSource(puStack_10); lStack_18 = func_0x00400be0(puStack_10,&UNK_00401424); if (lStack_18 != 0) { func_0x00400b60(lStack_18); } return; }
['gcc']
14,731
void CWE78_OS_Command_Injection__wchar_t_console_popen_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120952/CWE78_OS_Command_Injection__wchar_t_console_popen_61a.c
CWE78_OS_Command_Injection__wchar_t_console_popen_61_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_61_good(void) { goodG2B(); return; }
['gcc']
14,732
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_popen_61b_badSource(wchar_t * data) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } return data; }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* Restore NUL terminator if fgetws fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120952/CWE78_OS_Command_Injection__wchar_t_console_popen_61b.c
CWE78_OS_Command_Injection__wchar_t_console_popen_61b_badSource
long CWE78_OS_Command_Injection__wchar_t_console_popen_61b_badSource(long param_1) { long lVar1; long lVar2; lVar1 = func_0x00400b50(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400b10(lVar1 * 4 + param_1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401424); *(undefined4 *)(param_1 + lVar1 * 4) = 0; } else { lVar1 = func_0x00400b50(param_1); if ((lVar1 != 0) && (*(int *)(param_1 + lVar1 * 4 + -4) == 10)) { *(undefined4 *)(param_1 + lVar1 * 4 + -4) = 0; } } } return param_1; }
['gcc']
14,733
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_popen_61b_goodG2BSource(wchar_t * data) { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); return data; }
['/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120952/CWE78_OS_Command_Injection__wchar_t_console_popen_61b.c
CWE78_OS_Command_Injection__wchar_t_console_popen_61b_goodG2BSource
undefined8 CWE78_OS_Command_Injection__wchar_t_console_popen_61b_goodG2BSource(undefined8 param_1) { func_0x00400a60(param_1,&UNK_004012c4); return param_1; }
['gcc']
14,734
void CWE78_OS_Command_Injection__wchar_t_console_system_02_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(1) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120968/CWE78_OS_Command_Injection__wchar_t_console_system_02.c
CWE78_OS_Command_Injection__wchar_t_console_system_02_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_02_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401404); *(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; } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401414); func_0x00400be0(1); } return; }
['gcc']
14,735
void CWE78_OS_Command_Injection__wchar_t_console_system_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120968/CWE78_OS_Command_Injection__wchar_t_console_system_02.c
CWE78_OS_Command_Injection__wchar_t_console_system_02_good
void CWE78_OS_Command_Injection__wchar_t_console_system_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,736
void CWE78_OS_Command_Injection__wchar_t_console_system_03_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(5==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120969/CWE78_OS_Command_Injection__wchar_t_console_system_03.c
CWE78_OS_Command_Injection__wchar_t_console_system_03_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_03_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401404); *(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; } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401414); func_0x00400be0(1); } return; }
['gcc']
14,737
void CWE78_OS_Command_Injection__wchar_t_console_system_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120969/CWE78_OS_Command_Injection__wchar_t_console_system_03.c
CWE78_OS_Command_Injection__wchar_t_console_system_03_good
void CWE78_OS_Command_Injection__wchar_t_console_system_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,738
void CWE78_OS_Command_Injection__wchar_t_console_system_04_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(STATIC_CONST_TRUE) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120970/CWE78_OS_Command_Injection__wchar_t_console_system_04.c
CWE78_OS_Command_Injection__wchar_t_console_system_04_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_04_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_0040141c); *(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; } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_0040142c); func_0x00400be0(1); } return; }
['gcc']
14,739
void CWE78_OS_Command_Injection__wchar_t_console_system_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120970/CWE78_OS_Command_Injection__wchar_t_console_system_04.c
CWE78_OS_Command_Injection__wchar_t_console_system_04_good
void CWE78_OS_Command_Injection__wchar_t_console_system_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,740
void CWE78_OS_Command_Injection__wchar_t_console_system_05_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(staticTrue) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120971/CWE78_OS_Command_Injection__wchar_t_console_system_05.c
CWE78_OS_Command_Injection__wchar_t_console_system_05_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_05_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; if (staticTrue != 0) { lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401414); *(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; } } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401424); func_0x00400be0(1); } return; }
['gcc']
14,741
void CWE78_OS_Command_Injection__wchar_t_console_system_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120971/CWE78_OS_Command_Injection__wchar_t_console_system_05.c
CWE78_OS_Command_Injection__wchar_t_console_system_05_good
void CWE78_OS_Command_Injection__wchar_t_console_system_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,742
void CWE78_OS_Command_Injection__wchar_t_console_system_06_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; 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 (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120972/CWE78_OS_Command_Injection__wchar_t_console_system_06.c
CWE78_OS_Command_Injection__wchar_t_console_system_06_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_06_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401418); *(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; } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401428); func_0x00400be0(1); } return; }
['gcc']
14,743
void CWE78_OS_Command_Injection__wchar_t_console_system_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120972/CWE78_OS_Command_Injection__wchar_t_console_system_06.c
CWE78_OS_Command_Injection__wchar_t_console_system_06_good
void CWE78_OS_Command_Injection__wchar_t_console_system_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,744
void CWE78_OS_Command_Injection__wchar_t_console_system_07_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; 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 (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120973/CWE78_OS_Command_Injection__wchar_t_console_system_07.c
CWE78_OS_Command_Injection__wchar_t_console_system_07_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_07_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; if (staticFive == 5) { lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401414); *(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; } } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401424); func_0x00400be0(1); } return; }
['gcc']
14,745
void CWE78_OS_Command_Injection__wchar_t_console_system_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120973/CWE78_OS_Command_Injection__wchar_t_console_system_07.c
CWE78_OS_Command_Injection__wchar_t_console_system_07_good
void CWE78_OS_Command_Injection__wchar_t_console_system_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,746
void CWE78_OS_Command_Injection__wchar_t_console_system_08_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(staticReturnsTrue()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120974/CWE78_OS_Command_Injection__wchar_t_console_system_08.c
CWE78_OS_Command_Injection__wchar_t_console_system_08_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_08_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401424); *(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; } } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401434); func_0x00400be0(1); } return; }
['gcc']
14,747
void CWE78_OS_Command_Injection__wchar_t_console_system_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120974/CWE78_OS_Command_Injection__wchar_t_console_system_08.c
CWE78_OS_Command_Injection__wchar_t_console_system_08_good
void CWE78_OS_Command_Injection__wchar_t_console_system_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,748
void CWE78_OS_Command_Injection__wchar_t_console_system_09_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(GLOBAL_CONST_TRUE) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120975/CWE78_OS_Command_Injection__wchar_t_console_system_09.c
CWE78_OS_Command_Injection__wchar_t_console_system_09_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_09_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; if (GLOBAL_CONST_TRUE != 0) { lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401414); *(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; } } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401424); func_0x00400be0(1); } return; }
['gcc']
14,749
void CWE78_OS_Command_Injection__wchar_t_console_system_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120975/CWE78_OS_Command_Injection__wchar_t_console_system_09.c
CWE78_OS_Command_Injection__wchar_t_console_system_09_good
void CWE78_OS_Command_Injection__wchar_t_console_system_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,750
void CWE78_OS_Command_Injection__wchar_t_console_system_10_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalTrue) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120976/CWE78_OS_Command_Injection__wchar_t_console_system_10.c
CWE78_OS_Command_Injection__wchar_t_console_system_10_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_10_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; if (globalTrue != 0) { lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401414); *(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; } } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401424); func_0x00400be0(1); } return; }
['gcc']
14,751
void CWE78_OS_Command_Injection__wchar_t_console_system_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120976/CWE78_OS_Command_Injection__wchar_t_console_system_10.c
CWE78_OS_Command_Injection__wchar_t_console_system_10_good
void CWE78_OS_Command_Injection__wchar_t_console_system_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,752
void CWE78_OS_Command_Injection__wchar_t_console_system_11_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalReturnsTrue()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120977/CWE78_OS_Command_Injection__wchar_t_console_system_11.c
CWE78_OS_Command_Injection__wchar_t_console_system_11_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_11_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401414); *(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; } } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401424); func_0x00400be0(1); } return; }
['gcc']
14,753
void CWE78_OS_Command_Injection__wchar_t_console_system_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120977/CWE78_OS_Command_Injection__wchar_t_console_system_11.c
CWE78_OS_Command_Injection__wchar_t_console_system_11_good
void CWE78_OS_Command_Injection__wchar_t_console_system_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,754
void CWE78_OS_Command_Injection__wchar_t_console_system_12_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalReturnsTrueOrFalse()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } else { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Append a fixed string to data (not user / external input) */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120978/CWE78_OS_Command_Injection__wchar_t_console_system_12.c
CWE78_OS_Command_Injection__wchar_t_console_system_12_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_12_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { func_0x00400b40(puStack_10,&UNK_00401474); } else { lStack_18 = func_0x00400ba0(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b50(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401464); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ba0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } iVar1 = func_0x00400b80(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401484); func_0x00400c20(1); } return; }
['gcc']
14,755
void CWE78_OS_Command_Injection__wchar_t_console_system_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120978/CWE78_OS_Command_Injection__wchar_t_console_system_12.c
CWE78_OS_Command_Injection__wchar_t_console_system_12_good
void CWE78_OS_Command_Injection__wchar_t_console_system_12_good(void) { goodG2B(); return; }
['gcc']
14,756
void CWE78_OS_Command_Injection__wchar_t_console_system_13_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(GLOBAL_CONST_FIVE==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120979/CWE78_OS_Command_Injection__wchar_t_console_system_13.c
CWE78_OS_Command_Injection__wchar_t_console_system_13_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_13_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; if (GLOBAL_CONST_FIVE == 5) { lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401414); *(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; } } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401424); func_0x00400be0(1); } return; }
['gcc']
14,757
void CWE78_OS_Command_Injection__wchar_t_console_system_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120979/CWE78_OS_Command_Injection__wchar_t_console_system_13.c
CWE78_OS_Command_Injection__wchar_t_console_system_13_good
void CWE78_OS_Command_Injection__wchar_t_console_system_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,758
void CWE78_OS_Command_Injection__wchar_t_console_system_14_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalFive==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120980/CWE78_OS_Command_Injection__wchar_t_console_system_14.c
CWE78_OS_Command_Injection__wchar_t_console_system_14_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_14_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; if (globalFive == 5) { lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401414); *(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; } } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401424); func_0x00400be0(1); } return; }
['gcc']
14,759
void CWE78_OS_Command_Injection__wchar_t_console_system_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120980/CWE78_OS_Command_Injection__wchar_t_console_system_14.c
CWE78_OS_Command_Injection__wchar_t_console_system_14_good
void CWE78_OS_Command_Injection__wchar_t_console_system_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,760
void CWE78_OS_Command_Injection__wchar_t_console_system_15_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; switch(6) { case 6: { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120981/CWE78_OS_Command_Injection__wchar_t_console_system_15.c
CWE78_OS_Command_Injection__wchar_t_console_system_15_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_15_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401404); *(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; } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401414); func_0x00400be0(1); } return; }
['gcc']
14,761
void CWE78_OS_Command_Injection__wchar_t_console_system_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120981/CWE78_OS_Command_Injection__wchar_t_console_system_15.c
CWE78_OS_Command_Injection__wchar_t_console_system_15_good
void CWE78_OS_Command_Injection__wchar_t_console_system_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,762
void CWE78_OS_Command_Injection__wchar_t_console_system_16_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; while(1) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } break; } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120982/CWE78_OS_Command_Injection__wchar_t_console_system_16.c
CWE78_OS_Command_Injection__wchar_t_console_system_16_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_16_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [42]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401404); *(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; } } } iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401414); func_0x00400be0(1); } return; }
['gcc']
14,763
void CWE78_OS_Command_Injection__wchar_t_console_system_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120982/CWE78_OS_Command_Injection__wchar_t_console_system_16.c
CWE78_OS_Command_Injection__wchar_t_console_system_16_good
void CWE78_OS_Command_Injection__wchar_t_console_system_16_good(void) { goodG2B(); return; }
['gcc']
14,764
void CWE78_OS_Command_Injection__wchar_t_console_system_17_bad() { int i; wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; for(i = 0; i < 1; i++) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120983/CWE78_OS_Command_Injection__wchar_t_console_system_17.c
CWE78_OS_Command_Injection__wchar_t_console_system_17_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_17_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [43]; long lStack_20; undefined8 *puStack_18; int iStack_c; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar3 = auStack_178; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1b8; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { lStack_20 = func_0x00400b60(puStack_18); if (1 < 100U - lStack_20) { lVar2 = func_0x00400b10(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin); if (lVar2 == 0) { printLine(&UNK_00401424); *(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0; } else { lStack_20 = func_0x00400b60(puStack_18); if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0; } } } } iVar1 = func_0x00400b40(puStack_18); if (iVar1 < 1) { printLine(&UNK_00401434); func_0x00400be0(1); } return; }
['gcc']
14,765
void CWE78_OS_Command_Injection__wchar_t_console_system_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120983/CWE78_OS_Command_Injection__wchar_t_console_system_17.c
CWE78_OS_Command_Injection__wchar_t_console_system_17_good
void CWE78_OS_Command_Injection__wchar_t_console_system_17_good(void) { goodG2B(); return; }
['gcc']
14,766
void CWE78_OS_Command_Injection__wchar_t_console_system_21_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; badStatic = 1; /* true */ data = badSource(data); /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* true */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120985/CWE78_OS_Command_Injection__wchar_t_console_system_21.c
CWE78_OS_Command_Injection__wchar_t_console_system_21_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_21_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [43]; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; badStatic = 1; puStack_10 = (undefined8 *)badSource(puStack_10); iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401454); func_0x00400be0(1); } return; }
['gcc']
14,767
void CWE78_OS_Command_Injection__wchar_t_console_system_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120985/CWE78_OS_Command_Injection__wchar_t_console_system_21.c
CWE78_OS_Command_Injection__wchar_t_console_system_21_good
void CWE78_OS_Command_Injection__wchar_t_console_system_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,768
void CWE78_OS_Command_Injection__wchar_t_console_system_22_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; CWE78_OS_Command_Injection__wchar_t_console_system_22_badGlobal = 1; /* true */ data = CWE78_OS_Command_Injection__wchar_t_console_system_22_badSource(data); /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* true */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120986/CWE78_OS_Command_Injection__wchar_t_console_system_22a.c
CWE78_OS_Command_Injection__wchar_t_console_system_22_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_22_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [43]; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; CWE78_OS_Command_Injection__wchar_t_console_system_22_badGlobal = 1; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__wchar_t_console_system_22_badSource(puStack_10); iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401444); func_0x00400be0(1); } return; }
['gcc']
14,769
void CWE78_OS_Command_Injection__wchar_t_console_system_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120986/CWE78_OS_Command_Injection__wchar_t_console_system_22a.c
CWE78_OS_Command_Injection__wchar_t_console_system_22_good
void CWE78_OS_Command_Injection__wchar_t_console_system_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,770
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_system_22_badSource(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_console_system_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 (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } return data; }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* Restore NUL terminator if fgetws fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120986/CWE78_OS_Command_Injection__wchar_t_console_system_22b.c
CWE78_OS_Command_Injection__wchar_t_console_system_22_badSource
long CWE78_OS_Command_Injection__wchar_t_console_system_22_badSource(long param_1) { long lVar1; long lVar2; if (CWE78_OS_Command_Injection__wchar_t_console_system_22_badGlobal != 0) { lVar1 = func_0x00400b60(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400b10(lVar1 * 4 + param_1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401444); *(undefined4 *)(param_1 + lVar1 * 4) = 0; } else { lVar1 = func_0x00400b60(param_1); if ((lVar1 != 0) && (*(int *)(param_1 + lVar1 * 4 + -4) == 10)) { *(undefined4 *)(param_1 + lVar1 * 4 + -4) = 0; } } } } return param_1; }
['gcc']
14,771
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_system_22_goodG2B1Source(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_console_system_22_goodG2B1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } return data; }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120986/CWE78_OS_Command_Injection__wchar_t_console_system_22b.c
CWE78_OS_Command_Injection__wchar_t_console_system_22_goodG2B1Source
undefined8 CWE78_OS_Command_Injection__wchar_t_console_system_22_goodG2B1Source(undefined8 param_1) { if (CWE78_OS_Command_Injection__wchar_t_console_system_22_goodG2B1Global == 0) { func_0x00400a60(param_1,&UNK_0040141c); } else { printLine(&UNK_00401404); } return param_1; }
['gcc']
14,772
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_system_22_goodG2B2Source(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_console_system_22_goodG2B2Global) { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } return data; }
['/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120986/CWE78_OS_Command_Injection__wchar_t_console_system_22b.c
CWE78_OS_Command_Injection__wchar_t_console_system_22_goodG2B2Source
undefined8 CWE78_OS_Command_Injection__wchar_t_console_system_22_goodG2B2Source(undefined8 param_1) { if (CWE78_OS_Command_Injection__wchar_t_console_system_22_goodG2B2Global != 0) { func_0x00400a60(param_1,&UNK_0040141c); } return param_1; }
['gcc']
14,773
void CWE78_OS_Command_Injection__wchar_t_console_system_32_bad() { wchar_t * data; wchar_t * *dataPtr1 = &data; wchar_t * *dataPtr2 = &data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; { wchar_t * data = *dataPtr1; { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } *dataPtr1 = data; } { wchar_t * data = *dataPtr2; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120988/CWE78_OS_Command_Injection__wchar_t_console_system_32.c
CWE78_OS_Command_Injection__wchar_t_console_system_32_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_32_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 auStack_188 [42]; 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_1c8 = 0x620000002f; uStack_1c0 = 0x6e00000069; uStack_1b8 = 0x730000002f; uStack_1b0 = 0x2000000068; uStack_1a8 = 0x730000006c; uStack_1a0 = 0x2d00000020; uStack_198 = 0x610000006c; uStack_190 = 0x20; puVar3 = auStack_188; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_38 = &uStack_1c8; puStack_20 = *ppuStack_10; lStack_28 = func_0x00400b60(puStack_20); if (1 < 100U - lStack_28) { lVar2 = func_0x00400b10(lStack_28 * 4 + (long)puStack_20,100 - (int)lStack_28,stdin); if (lVar2 == 0) { printLine(&UNK_00401434); *(undefined4 *)((long)puStack_20 + lStack_28 * 4) = 0; } else { lStack_28 = func_0x00400b60(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; iVar1 = func_0x00400b40(puStack_30); if (iVar1 < 1) { printLine(&UNK_00401444); func_0x00400be0(1); } return; }
['gcc']
14,774
void CWE78_OS_Command_Injection__wchar_t_console_system_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120988/CWE78_OS_Command_Injection__wchar_t_console_system_32.c
CWE78_OS_Command_Injection__wchar_t_console_system_32_good
void CWE78_OS_Command_Injection__wchar_t_console_system_32_good(void) { goodG2B(); return; }
['gcc']
14,775
void CWE78_OS_Command_Injection__wchar_t_console_system_42_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; data = badSource(data); /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120992/CWE78_OS_Command_Injection__wchar_t_console_system_42.c
CWE78_OS_Command_Injection__wchar_t_console_system_42_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_42_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [43]; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; puStack_10 = (undefined8 *)badSource(puStack_10); iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401434); func_0x00400be0(1); } return; }
['gcc']
14,776
void CWE78_OS_Command_Injection__wchar_t_console_system_42_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120992/CWE78_OS_Command_Injection__wchar_t_console_system_42.c
CWE78_OS_Command_Injection__wchar_t_console_system_42_good
void CWE78_OS_Command_Injection__wchar_t_console_system_42_good(void) { goodG2B(); return; }
['gcc']
14,777
void CWE78_OS_Command_Injection__wchar_t_console_system_61_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; data = CWE78_OS_Command_Injection__wchar_t_console_system_61b_badSource(data); /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ if (SYSTEM(data) <= 0) { printLine("command execution failed!"); exit(1); } }
['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121000/CWE78_OS_Command_Injection__wchar_t_console_system_61a.c
CWE78_OS_Command_Injection__wchar_t_console_system_61_bad
void CWE78_OS_Command_Injection__wchar_t_console_system_61_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 uStack_178; undefined8 uStack_170; undefined8 auStack_168 [43]; undefined8 *puStack_10; uStack_1a8 = 0x620000002f; uStack_1a0 = 0x6e00000069; uStack_198 = 0x730000002f; uStack_190 = 0x2000000068; uStack_188 = 0x730000006c; uStack_180 = 0x2d00000020; uStack_178 = 0x610000006c; uStack_170 = 0x20; puVar3 = auStack_168; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__wchar_t_console_system_61b_badSource(puStack_10); iVar1 = func_0x00400b40(puStack_10); if (iVar1 < 1) { printLine(&UNK_00401424); func_0x00400be0(1); } return; }
['gcc']
14,778
void CWE78_OS_Command_Injection__wchar_t_console_system_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121000/CWE78_OS_Command_Injection__wchar_t_console_system_61a.c
CWE78_OS_Command_Injection__wchar_t_console_system_61_good
void CWE78_OS_Command_Injection__wchar_t_console_system_61_good(void) { goodG2B(); return; }
['gcc']
14,779
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_system_61b_badSource(wchar_t * data) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } return data; }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgetws() */', '/* Restore NUL terminator if fgetws fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121000/CWE78_OS_Command_Injection__wchar_t_console_system_61b.c
CWE78_OS_Command_Injection__wchar_t_console_system_61b_badSource
long CWE78_OS_Command_Injection__wchar_t_console_system_61b_badSource(long param_1) { long lVar1; long lVar2; lVar1 = func_0x00400b60(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400b10(lVar1 * 4 + param_1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401424); *(undefined4 *)(param_1 + lVar1 * 4) = 0; } else { lVar1 = func_0x00400b60(param_1); if ((lVar1 != 0) && (*(int *)(param_1 + lVar1 * 4 + -4) == 10)) { *(undefined4 *)(param_1 + lVar1 * 4 + -4) = 0; } } } return param_1; }
['gcc']
14,780
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_system_61b_goodG2BSource(wchar_t * data) { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); return data; }
['/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121000/CWE78_OS_Command_Injection__wchar_t_console_system_61b.c
CWE78_OS_Command_Injection__wchar_t_console_system_61b_goodG2BSource
undefined8 CWE78_OS_Command_Injection__wchar_t_console_system_61b_goodG2BSource(undefined8 param_1) { func_0x00400a60(param_1,&UNK_004012b4); return param_1; }
['gcc']
14,781
void CWE78_OS_Command_Injection__wchar_t_environment_execl_08_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(staticReturnsTrue()) { { /* Append input from an environment variable to data */ size_t dataLen = wcslen(data); wchar_t * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ wcsncat(data+dataLen, environment, 100-dataLen-1); } } } /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', '/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121310/CWE78_OS_Command_Injection__wchar_t_environment_execl_08.c
CWE78_OS_Command_Injection__wchar_t_environment_execl_08_bad
void CWE78_OS_Command_Injection__wchar_t_environment_execl_08_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 auStack_1a8 [49]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0; uStack_1b0 = 0; puVar3 = auStack_1a8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1b8; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400ae0(puStack_10); lStack_20 = func_0x00400a90(&UNK_004012c8); if (lStack_20 != 0) { func_0x00400ab0(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18); } } func_0x00400b60(&UNK_004012f8,&UNK_004012f8,&UNK_004012e8,&UNK_004012d8,puStack_10,0); return; }
['gcc']
14,782
void CWE78_OS_Command_Injection__wchar_t_environment_execl_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121310/CWE78_OS_Command_Injection__wchar_t_environment_execl_08.c
CWE78_OS_Command_Injection__wchar_t_environment_execl_08_good
void CWE78_OS_Command_Injection__wchar_t_environment_execl_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,783
void CWE78_OS_Command_Injection__wchar_t_environment_execl_11_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalReturnsTrue()) { { /* Append input from an environment variable to data */ size_t dataLen = wcslen(data); wchar_t * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ wcsncat(data+dataLen, environment, 100-dataLen-1); } } } /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', '/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121313/CWE78_OS_Command_Injection__wchar_t_environment_execl_11.c
CWE78_OS_Command_Injection__wchar_t_environment_execl_11_bad
void CWE78_OS_Command_Injection__wchar_t_environment_execl_11_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 auStack_1a8 [49]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0; uStack_1b0 = 0; puVar3 = auStack_1a8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1b8; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { 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,99 - lStack_18); } } func_0x00400b60(&UNK_004012e8,&UNK_004012e8,&UNK_004012d8,&UNK_004012c8,puStack_10,0); return; }
['gcc']
14,784
void CWE78_OS_Command_Injection__wchar_t_environment_execl_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121313/CWE78_OS_Command_Injection__wchar_t_environment_execl_11.c
CWE78_OS_Command_Injection__wchar_t_environment_execl_11_good
void CWE78_OS_Command_Injection__wchar_t_environment_execl_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,785
void CWE78_OS_Command_Injection__wchar_t_environment_execl_12_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalReturnsTrueOrFalse()) { { /* Append input from an environment variable to data */ size_t dataLen = wcslen(data); wchar_t * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ wcsncat(data+dataLen, environment, 100-dataLen-1); } } } else { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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: Append a fixed string to data (not user / external input) */', '/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121314/CWE78_OS_Command_Injection__wchar_t_environment_execl_12.c
CWE78_OS_Command_Injection__wchar_t_environment_execl_12_bad
void CWE78_OS_Command_Injection__wchar_t_environment_execl_12_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 auStack_1a8 [49]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0; uStack_1b0 = 0; puVar3 = auStack_1a8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1b8; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { func_0x00400b10(puStack_10,&UNK_00401368); } else { lStack_18 = func_0x00400b70(puStack_10); lStack_20 = func_0x00400b20(&UNK_00401358); if (lStack_20 != 0) { func_0x00400b40(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18); } } func_0x00400bf0(&UNK_00401398,&UNK_00401398,&UNK_00401388,&UNK_00401378,puStack_10,0); return; }
['gcc']
14,786
void CWE78_OS_Command_Injection__wchar_t_environment_execl_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121314/CWE78_OS_Command_Injection__wchar_t_environment_execl_12.c
CWE78_OS_Command_Injection__wchar_t_environment_execl_12_good
void CWE78_OS_Command_Injection__wchar_t_environment_execl_12_good(void) { goodG2B(); return; }
['gcc']
14,787
void CWE78_OS_Command_Injection__wchar_t_environment_execl_17_bad() { int i; wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; for(i = 0; i < 1; i++) { { /* Append input from an environment variable to data */ size_t dataLen = wcslen(data); wchar_t * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ wcsncat(data+dataLen, environment, 100-dataLen-1); } } } /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Append input from an environment variable to data */', '/* If there is data in the environment variable */', '/* POTENTIAL FLAW: Read data from an environment variable */', '/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121319/CWE78_OS_Command_Injection__wchar_t_environment_execl_17.c
CWE78_OS_Command_Injection__wchar_t_environment_execl_17_bad
void CWE78_OS_Command_Injection__wchar_t_environment_execl_17_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 auStack_1a8 [48]; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_c; uStack_1b8 = 0; uStack_1b0 = 0; puVar2 = auStack_1a8; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_18 = &uStack_1b8; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { lStack_20 = func_0x00400ae0(puStack_18); lStack_28 = func_0x00400a90(&UNK_004012b8); if (lStack_28 != 0) { func_0x00400ab0(lStack_20 * 4 + (long)puStack_18,lStack_28,99 - lStack_20); } } func_0x00400b60(&UNK_004012e8,&UNK_004012e8,&UNK_004012d8,&UNK_004012c8,puStack_18,0); return; }
['gcc']
14,788
void CWE78_OS_Command_Injection__wchar_t_environment_execl_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121319/CWE78_OS_Command_Injection__wchar_t_environment_execl_17.c
CWE78_OS_Command_Injection__wchar_t_environment_execl_17_good
void CWE78_OS_Command_Injection__wchar_t_environment_execl_17_good(void) { goodG2B(); return; }
['gcc']
14,789
void CWE78_OS_Command_Injection__wchar_t_environment_popen_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121410/CWE78_OS_Command_Injection__wchar_t_environment_popen_12.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_12_good
void CWE78_OS_Command_Injection__wchar_t_environment_popen_12_good(void) { goodG2B(); return; }
['gcc']
14,790
void CWE78_OS_Command_Injection__wchar_t_environment_popen_13_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(GLOBAL_CONST_FIVE==5) { { /* Append input from an environment variable to data */ size_t dataLen = wcslen(data); wchar_t * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ wcsncat(data+dataLen, environment, 100-dataLen-1); } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121411/CWE78_OS_Command_Injection__wchar_t_environment_popen_13.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_13_bad
void CWE78_OS_Command_Injection__wchar_t_environment_popen_13_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; if (GLOBAL_CONST_FIVE == 5) { lStack_18 = func_0x00400b60(puStack_10); lStack_20 = func_0x00400b10(&UNK_004013a4); if (lStack_20 != 0) { func_0x00400b30(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18); } } lStack_28 = func_0x00400bf0(puStack_10,&UNK_004013b4); if (lStack_28 != 0) { func_0x00400b70(lStack_28); } return; }
['gcc']
14,791
void CWE78_OS_Command_Injection__wchar_t_environment_popen_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121411/CWE78_OS_Command_Injection__wchar_t_environment_popen_13.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_13_good
void CWE78_OS_Command_Injection__wchar_t_environment_popen_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,792
void CWE78_OS_Command_Injection__wchar_t_environment_popen_14_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalFive==5) { { /* Append input from an environment variable to data */ size_t dataLen = wcslen(data); wchar_t * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ wcsncat(data+dataLen, environment, 100-dataLen-1); } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121412/CWE78_OS_Command_Injection__wchar_t_environment_popen_14.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_14_bad
void CWE78_OS_Command_Injection__wchar_t_environment_popen_14_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; if (globalFive == 5) { lStack_18 = func_0x00400b60(puStack_10); lStack_20 = func_0x00400b10(&UNK_004013a4); if (lStack_20 != 0) { func_0x00400b30(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18); } } lStack_28 = func_0x00400bf0(puStack_10,&UNK_004013b4); if (lStack_28 != 0) { func_0x00400b70(lStack_28); } return; }
['gcc']
14,793
void CWE78_OS_Command_Injection__wchar_t_environment_popen_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121412/CWE78_OS_Command_Injection__wchar_t_environment_popen_14.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_14_good
void CWE78_OS_Command_Injection__wchar_t_environment_popen_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,794
void CWE78_OS_Command_Injection__wchar_t_environment_popen_15_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; switch(6) { case 6: { /* Append input from an environment variable to data */ size_t dataLen = wcslen(data); wchar_t * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ wcsncat(data+dataLen, environment, 100-dataLen-1); } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121413/CWE78_OS_Command_Injection__wchar_t_environment_popen_15.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_15_bad
void CWE78_OS_Command_Injection__wchar_t_environment_popen_15_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; lStack_18 = func_0x00400b60(puStack_10); lStack_20 = func_0x00400b10(&UNK_004013a4); if (lStack_20 != 0) { func_0x00400b30(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18); } lStack_28 = func_0x00400bf0(puStack_10,&UNK_004013b4); if (lStack_28 != 0) { func_0x00400b70(lStack_28); } return; }
['gcc']
14,795
void CWE78_OS_Command_Injection__wchar_t_environment_popen_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121413/CWE78_OS_Command_Injection__wchar_t_environment_popen_15.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_15_good
void CWE78_OS_Command_Injection__wchar_t_environment_popen_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,796
void CWE78_OS_Command_Injection__wchar_t_environment_popen_16_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; while(1) { { /* Append input from an environment variable to data */ size_t dataLen = wcslen(data); wchar_t * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ wcsncat(data+dataLen, environment, 100-dataLen-1); } } break; } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121414/CWE78_OS_Command_Injection__wchar_t_environment_popen_16.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_16_bad
void CWE78_OS_Command_Injection__wchar_t_environment_popen_16_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; lStack_18 = func_0x00400b60(puStack_10); lStack_20 = func_0x00400b10(&UNK_004013a4); if (lStack_20 != 0) { func_0x00400b30(lStack_18 * 4 + (long)puStack_10,lStack_20,99 - lStack_18); } lStack_28 = func_0x00400bf0(puStack_10,&UNK_004013b4); if (lStack_28 != 0) { func_0x00400b70(lStack_28); } return; }
['gcc']
14,797
void CWE78_OS_Command_Injection__wchar_t_environment_popen_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121414/CWE78_OS_Command_Injection__wchar_t_environment_popen_16.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_16_good
void CWE78_OS_Command_Injection__wchar_t_environment_popen_16_good(void) { goodG2B(); return; }
['gcc']
14,798
void CWE78_OS_Command_Injection__wchar_t_environment_popen_17_bad() { int i; wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; for(i = 0; i < 1; i++) { { /* Append input from an environment variable to data */ size_t dataLen = wcslen(data); wchar_t * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ wcsncat(data+dataLen, environment, 100-dataLen-1); } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* 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: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121415/CWE78_OS_Command_Injection__wchar_t_environment_popen_17.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_17_bad
void CWE78_OS_Command_Injection__wchar_t_environment_popen_17_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 auStack_188 [43]; long lStack_30; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0x620000002f; uStack_1c0 = 0x6e00000069; uStack_1b8 = 0x730000002f; uStack_1b0 = 0x2000000068; uStack_1a8 = 0x730000006c; uStack_1a0 = 0x2d00000020; uStack_198 = 0x610000006c; uStack_190 = 0x20; puVar2 = auStack_188; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_18 = &uStack_1c8; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { lStack_28 = func_0x00400b60(puStack_18); lStack_30 = func_0x00400b10(&UNK_004013b4); if (lStack_30 != 0) { func_0x00400b30(lStack_28 * 4 + (long)puStack_18,lStack_30,99 - lStack_28); } } lStack_20 = func_0x00400bf0(puStack_18,&UNK_004013c4); if (lStack_20 != 0) { func_0x00400b70(lStack_20); } return; }
['gcc']
14,799
void CWE78_OS_Command_Injection__wchar_t_environment_popen_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121415/CWE78_OS_Command_Injection__wchar_t_environment_popen_17.c
CWE78_OS_Command_Injection__wchar_t_environment_popen_17_good
void CWE78_OS_Command_Injection__wchar_t_environment_popen_17_good(void) { goodG2B(); return; }
['gcc']