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,600
void CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET connectSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ /* Abort on error or the connection was closed */ recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_badData = data; CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68b_badSink(); }
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120527/CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; 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]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; 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_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400ce0(puStack_10); iStack_14 = func_0x00400de0(2,1,6); if (iStack_14 != -1) { func_0x00400cf0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400d40(&UNK_004016b4); uStack_1d6 = func_0x00400cc0(0x6987); iVar1 = func_0x00400db0(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c80(iStack_14,lStack_20 * 4 + (long)puStack_10,(99 - lStack_20) * 4 ,0), iStack_24 != -1)) && (iStack_24 != 0)) { *(undefined4 *)((long)puStack_10 + (lStack_20 + ((ulong)(long)iStack_24 >> 2)) * 4) = 0; puStack_30 = (undefined4 *)func_0x00400d90(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d90(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400d00(iStack_14); } CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_badData = puStack_10; CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68b_badSink(); return; }
['gcc']
14,601
void CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120527/CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_good(void) { goodG2B(); return; }
['gcc']
14,602
void CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68b_badSink() { wchar_t * data = CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_badData; /* 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/120527/CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68b_badSink(void) { int iVar1; iVar1 = func_0x00400cb0(CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_badData); if (iVar1 < 1) { printLine(&UNK_004016b4); func_0x00400da0(1); } return; }
['gcc']
14,603
void CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68b_goodG2BSink() { wchar_t * data = CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_goodG2BData; /* 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120527/CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68b_goodG2BSink(void) { int iVar1; iVar1 = func_0x00400a90(CWE78_OS_Command_Injection__wchar_t_connect_socket_system_68_goodG2BData); if (iVar1 < 1) { printLine(&UNK_004012c4); func_0x00400b20(1); } return; }
['gcc']
14,604
void CWE78_OS_Command_Injection__wchar_t_console_execl_02_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; 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'; } } } } /* 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); }
['/* 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 */', '/* 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/120824/CWE78_OS_Command_Injection__wchar_t_console_execl_02.c
CWE78_OS_Command_Injection__wchar_t_console_execl_02_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_02_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,605
void CWE78_OS_Command_Injection__wchar_t_console_execl_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120824/CWE78_OS_Command_Injection__wchar_t_console_execl_02.c
CWE78_OS_Command_Injection__wchar_t_console_execl_02_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,606
void CWE78_OS_Command_Injection__wchar_t_console_execl_03_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; 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'; } } } } /* 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); }
['/* 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 */', '/* 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/120825/CWE78_OS_Command_Injection__wchar_t_console_execl_03.c
CWE78_OS_Command_Injection__wchar_t_console_execl_03_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_03_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,607
void CWE78_OS_Command_Injection__wchar_t_console_execl_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120825/CWE78_OS_Command_Injection__wchar_t_console_execl_03.c
CWE78_OS_Command_Injection__wchar_t_console_execl_03_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,608
void CWE78_OS_Command_Injection__wchar_t_console_execl_04_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; 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'; } } } } /* 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); }
['/* 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 */', '/* 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/120826/CWE78_OS_Command_Injection__wchar_t_console_execl_04.c
CWE78_OS_Command_Injection__wchar_t_console_execl_04_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_04_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401320); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401350,&UNK_00401350,&UNK_00401340,&UNK_00401330,puStack_10,0); return; }
['gcc']
14,609
void CWE78_OS_Command_Injection__wchar_t_console_execl_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120826/CWE78_OS_Command_Injection__wchar_t_console_execl_04.c
CWE78_OS_Command_Injection__wchar_t_console_execl_04_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,610
void CWE78_OS_Command_Injection__wchar_t_console_execl_05_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; 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'; } } } } /* 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); }
['/* 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 */', '/* 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/120827/CWE78_OS_Command_Injection__wchar_t_console_execl_05.c
CWE78_OS_Command_Injection__wchar_t_console_execl_05_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_05_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (staticTrue != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,611
void CWE78_OS_Command_Injection__wchar_t_console_execl_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120827/CWE78_OS_Command_Injection__wchar_t_console_execl_05.c
CWE78_OS_Command_Injection__wchar_t_console_execl_05_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,612
void CWE78_OS_Command_Injection__wchar_t_console_execl_06_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(STATIC_CONST_FIVE==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (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'; } } } } /* 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); }
['/* 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 */', '/* 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/120828/CWE78_OS_Command_Injection__wchar_t_console_execl_06.c
CWE78_OS_Command_Injection__wchar_t_console_execl_06_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_06_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_0040131c); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_0040133c,&UNK_0040132c,puStack_10,0); return; }
['gcc']
14,613
void CWE78_OS_Command_Injection__wchar_t_console_execl_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120828/CWE78_OS_Command_Injection__wchar_t_console_execl_06.c
CWE78_OS_Command_Injection__wchar_t_console_execl_06_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,614
void CWE78_OS_Command_Injection__wchar_t_console_execl_07_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(staticFive==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (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'; } } } } /* 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); }
['/* 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 */', '/* 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/120829/CWE78_OS_Command_Injection__wchar_t_console_execl_07.c
CWE78_OS_Command_Injection__wchar_t_console_execl_07_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_07_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (staticFive == 5) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,615
void CWE78_OS_Command_Injection__wchar_t_console_execl_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120829/CWE78_OS_Command_Injection__wchar_t_console_execl_07.c
CWE78_OS_Command_Injection__wchar_t_console_execl_07_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,616
void CWE78_OS_Command_Injection__wchar_t_console_execl_08_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(staticReturnsTrue()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* 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); }
['/* 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 */', '/* 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/120830/CWE78_OS_Command_Injection__wchar_t_console_execl_08.c
CWE78_OS_Command_Injection__wchar_t_console_execl_08_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_08_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar3 = auStack_198; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401338); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401368,&UNK_00401368,&UNK_00401358,&UNK_00401348,puStack_10,0); return; }
['gcc']
14,617
void CWE78_OS_Command_Injection__wchar_t_console_execl_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120830/CWE78_OS_Command_Injection__wchar_t_console_execl_08.c
CWE78_OS_Command_Injection__wchar_t_console_execl_08_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,618
void CWE78_OS_Command_Injection__wchar_t_console_execl_09_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(GLOBAL_CONST_TRUE) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* 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); }
['/* 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 */', '/* 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/120831/CWE78_OS_Command_Injection__wchar_t_console_execl_09.c
CWE78_OS_Command_Injection__wchar_t_console_execl_09_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_09_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (GLOBAL_CONST_TRUE != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,619
void CWE78_OS_Command_Injection__wchar_t_console_execl_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120831/CWE78_OS_Command_Injection__wchar_t_console_execl_09.c
CWE78_OS_Command_Injection__wchar_t_console_execl_09_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,620
void CWE78_OS_Command_Injection__wchar_t_console_execl_10_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalTrue) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* 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); }
['/* 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 */', '/* 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/120832/CWE78_OS_Command_Injection__wchar_t_console_execl_10.c
CWE78_OS_Command_Injection__wchar_t_console_execl_10_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_10_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (globalTrue != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,621
void CWE78_OS_Command_Injection__wchar_t_console_execl_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120832/CWE78_OS_Command_Injection__wchar_t_console_execl_10.c
CWE78_OS_Command_Injection__wchar_t_console_execl_10_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,622
void CWE78_OS_Command_Injection__wchar_t_console_execl_11_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalReturnsTrue()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* 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); }
['/* 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 */', '/* 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/120833/CWE78_OS_Command_Injection__wchar_t_console_execl_11.c
CWE78_OS_Command_Injection__wchar_t_console_execl_11_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_11_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar3 = auStack_198; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401328); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401358,&UNK_00401358,&UNK_00401348,&UNK_00401338,puStack_10,0); return; }
['gcc']
14,623
void CWE78_OS_Command_Injection__wchar_t_console_execl_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120833/CWE78_OS_Command_Injection__wchar_t_console_execl_11.c
CWE78_OS_Command_Injection__wchar_t_console_execl_11_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,624
void CWE78_OS_Command_Injection__wchar_t_console_execl_12_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalReturnsTrueOrFalse()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } else { /* FIX: 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); }
['/* 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) */', '/* 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/120834/CWE78_OS_Command_Injection__wchar_t_console_execl_12.c
CWE78_OS_Command_Injection__wchar_t_console_execl_12_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_12_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar3 = auStack_198; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { func_0x00400b10(puStack_10,&UNK_004013d8); } else { lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b20(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_004013c8); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b60(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400be0(&UNK_00401408,&UNK_00401408,&UNK_004013f8,&UNK_004013e8,puStack_10,0); return; }
['gcc']
14,625
void CWE78_OS_Command_Injection__wchar_t_console_execl_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120834/CWE78_OS_Command_Injection__wchar_t_console_execl_12.c
CWE78_OS_Command_Injection__wchar_t_console_execl_12_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_12_good(void) { goodG2B(); return; }
['gcc']
14,626
void CWE78_OS_Command_Injection__wchar_t_console_execl_13_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(GLOBAL_CONST_FIVE==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* 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); }
['/* 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 */', '/* 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/120835/CWE78_OS_Command_Injection__wchar_t_console_execl_13.c
CWE78_OS_Command_Injection__wchar_t_console_execl_13_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_13_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (GLOBAL_CONST_FIVE == 5) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,627
void CWE78_OS_Command_Injection__wchar_t_console_execl_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120835/CWE78_OS_Command_Injection__wchar_t_console_execl_13.c
CWE78_OS_Command_Injection__wchar_t_console_execl_13_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,628
void CWE78_OS_Command_Injection__wchar_t_console_execl_14_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalFive==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* 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); }
['/* 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 */', '/* 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/120836/CWE78_OS_Command_Injection__wchar_t_console_execl_14.c
CWE78_OS_Command_Injection__wchar_t_console_execl_14_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_14_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (globalFive == 5) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,629
void CWE78_OS_Command_Injection__wchar_t_console_execl_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120836/CWE78_OS_Command_Injection__wchar_t_console_execl_14.c
CWE78_OS_Command_Injection__wchar_t_console_execl_14_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,630
void CWE78_OS_Command_Injection__wchar_t_console_execl_15_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; switch(6) { case 6: { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } /* 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); }
['/* 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 */', '/* 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/120837/CWE78_OS_Command_Injection__wchar_t_console_execl_15.c
CWE78_OS_Command_Injection__wchar_t_console_execl_15_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_15_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,631
void CWE78_OS_Command_Injection__wchar_t_console_execl_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120837/CWE78_OS_Command_Injection__wchar_t_console_execl_15.c
CWE78_OS_Command_Injection__wchar_t_console_execl_15_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,632
void CWE78_OS_Command_Injection__wchar_t_console_execl_16_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; while(1) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } break; } /* 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); }
['/* 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 */', '/* 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/120838/CWE78_OS_Command_Injection__wchar_t_console_execl_16.c
CWE78_OS_Command_Injection__wchar_t_console_execl_16_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_16_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,633
void CWE78_OS_Command_Injection__wchar_t_console_execl_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120838/CWE78_OS_Command_Injection__wchar_t_console_execl_16.c
CWE78_OS_Command_Injection__wchar_t_console_execl_16_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_16_good(void) { goodG2B(); return; }
['gcc']
14,634
void CWE78_OS_Command_Injection__wchar_t_console_execl_17_bad() { int i; wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; for(i = 0; i < 1; i++) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* 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); }
['/* 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 */', '/* 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/120839/CWE78_OS_Command_Injection__wchar_t_console_execl_17.c
CWE78_OS_Command_Injection__wchar_t_console_execl_17_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_17_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 auStack_1a8 [49]; 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_0x00400ad0(puStack_18); if (1 < 100U - lStack_20) { lVar1 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin); if (lVar1 == 0) { printLine(&UNK_00401328); *(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0; } else { lStack_20 = func_0x00400ad0(puStack_18); if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401358,&UNK_00401358,&UNK_00401348,&UNK_00401338,puStack_18,0); return; }
['gcc']
14,635
void CWE78_OS_Command_Injection__wchar_t_console_execl_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120839/CWE78_OS_Command_Injection__wchar_t_console_execl_17.c
CWE78_OS_Command_Injection__wchar_t_console_execl_17_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_17_good(void) { goodG2B(); return; }
['gcc']
14,636
void CWE78_OS_Command_Injection__wchar_t_console_execl_61_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; data = CWE78_OS_Command_Injection__wchar_t_console_execl_61b_badSource(data); /* 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); }
['/* 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/120856/CWE78_OS_Command_Injection__wchar_t_console_execl_61a.c
CWE78_OS_Command_Injection__wchar_t_console_execl_61_bad
void CWE78_OS_Command_Injection__wchar_t_console_execl_61_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [49]; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__wchar_t_console_execl_61b_badSource(puStack_10); func_0x00400b50(&UNK_00401358,&UNK_00401358,&UNK_00401348,&UNK_00401338,puStack_10,0); return; }
['gcc']
14,637
void CWE78_OS_Command_Injection__wchar_t_console_execl_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120856/CWE78_OS_Command_Injection__wchar_t_console_execl_61a.c
CWE78_OS_Command_Injection__wchar_t_console_execl_61_good
void CWE78_OS_Command_Injection__wchar_t_console_execl_61_good(void) { goodG2B(); return; }
['gcc']
14,638
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_execl_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/120856/CWE78_OS_Command_Injection__wchar_t_console_execl_61b.c
CWE78_OS_Command_Injection__wchar_t_console_execl_61b_badSource
long CWE78_OS_Command_Injection__wchar_t_console_execl_61b_badSource(long param_1) { long lVar1; long lVar2; lVar1 = func_0x00400ad0(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400a90(lVar1 * 4 + param_1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401334); *(undefined4 *)(param_1 + lVar1 * 4) = 0; } else { lVar1 = func_0x00400ad0(param_1); if ((lVar1 != 0) && (*(int *)(param_1 + lVar1 * 4 + -4) == 10)) { *(undefined4 *)(param_1 + lVar1 * 4 + -4) = 0; } } } return param_1; }
['gcc']
14,639
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_execl_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/120856/CWE78_OS_Command_Injection__wchar_t_console_execl_61b.c
CWE78_OS_Command_Injection__wchar_t_console_execl_61b_goodG2BSource
undefined8 CWE78_OS_Command_Injection__wchar_t_console_execl_61b_goodG2BSource(undefined8 param_1) { func_0x00400a20(param_1,&UNK_00401204); return param_1; }
['gcc']
14,640
void CWE78_OS_Command_Injection__wchar_t_console_execlp_02_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; 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'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120872/CWE78_OS_Command_Injection__wchar_t_console_execlp_02.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_02_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_02_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401340,&UNK_00401340,&UNK_00401334,&UNK_00401324,puStack_10,0); return; }
['gcc']
14,641
void CWE78_OS_Command_Injection__wchar_t_console_execlp_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120872/CWE78_OS_Command_Injection__wchar_t_console_execlp_02.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_02_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,642
void CWE78_OS_Command_Injection__wchar_t_console_execlp_03_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; 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'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120873/CWE78_OS_Command_Injection__wchar_t_console_execlp_03.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_03_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_03_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401340,&UNK_00401340,&UNK_00401334,&UNK_00401324,puStack_10,0); return; }
['gcc']
14,643
void CWE78_OS_Command_Injection__wchar_t_console_execlp_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120873/CWE78_OS_Command_Injection__wchar_t_console_execlp_03.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_03_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,644
void CWE78_OS_Command_Injection__wchar_t_console_execlp_04_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; 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'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120874/CWE78_OS_Command_Injection__wchar_t_console_execlp_04.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_04_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_04_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_0040131c); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401348,&UNK_00401348,&UNK_0040133c,&UNK_0040132c,puStack_10,0); return; }
['gcc']
14,645
void CWE78_OS_Command_Injection__wchar_t_console_execlp_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120874/CWE78_OS_Command_Injection__wchar_t_console_execlp_04.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_04_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,646
void CWE78_OS_Command_Injection__wchar_t_console_execlp_05_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; 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'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120875/CWE78_OS_Command_Injection__wchar_t_console_execlp_05.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_05_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_05_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (staticTrue != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401340,&UNK_00401340,&UNK_00401334,&UNK_00401324,puStack_10,0); return; }
['gcc']
14,647
void CWE78_OS_Command_Injection__wchar_t_console_execlp_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120875/CWE78_OS_Command_Injection__wchar_t_console_execlp_05.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_05_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,648
void CWE78_OS_Command_Injection__wchar_t_console_execlp_06_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(STATIC_CONST_FIVE==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (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'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120876/CWE78_OS_Command_Injection__wchar_t_console_execlp_06.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_06_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_06_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401318); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401344,&UNK_00401344,&UNK_00401338,&UNK_00401328,puStack_10,0); return; }
['gcc']
14,649
void CWE78_OS_Command_Injection__wchar_t_console_execlp_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120876/CWE78_OS_Command_Injection__wchar_t_console_execlp_06.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_06_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,650
void CWE78_OS_Command_Injection__wchar_t_console_execlp_07_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(staticFive==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (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'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120877/CWE78_OS_Command_Injection__wchar_t_console_execlp_07.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_07_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_07_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (staticFive == 5) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401340,&UNK_00401340,&UNK_00401334,&UNK_00401324,puStack_10,0); return; }
['gcc']
14,651
void CWE78_OS_Command_Injection__wchar_t_console_execlp_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120877/CWE78_OS_Command_Injection__wchar_t_console_execlp_07.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_07_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,652
void CWE78_OS_Command_Injection__wchar_t_console_execlp_08_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(staticReturnsTrue()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120878/CWE78_OS_Command_Injection__wchar_t_console_execlp_08.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_08_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_08_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar3 = auStack_198; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401334); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401360,&UNK_00401360,&UNK_00401354,&UNK_00401344,puStack_10,0); return; }
['gcc']
14,653
void CWE78_OS_Command_Injection__wchar_t_console_execlp_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120878/CWE78_OS_Command_Injection__wchar_t_console_execlp_08.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_08_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,654
void CWE78_OS_Command_Injection__wchar_t_console_execlp_09_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(GLOBAL_CONST_TRUE) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120879/CWE78_OS_Command_Injection__wchar_t_console_execlp_09.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_09_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_09_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (GLOBAL_CONST_TRUE != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401340,&UNK_00401340,&UNK_00401334,&UNK_00401324,puStack_10,0); return; }
['gcc']
14,655
void CWE78_OS_Command_Injection__wchar_t_console_execlp_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120879/CWE78_OS_Command_Injection__wchar_t_console_execlp_09.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_09_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,656
void CWE78_OS_Command_Injection__wchar_t_console_execlp_10_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalTrue) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120880/CWE78_OS_Command_Injection__wchar_t_console_execlp_10.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_10_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_10_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (globalTrue != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401340,&UNK_00401340,&UNK_00401334,&UNK_00401324,puStack_10,0); return; }
['gcc']
14,657
void CWE78_OS_Command_Injection__wchar_t_console_execlp_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120880/CWE78_OS_Command_Injection__wchar_t_console_execlp_10.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_10_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,658
void CWE78_OS_Command_Injection__wchar_t_console_execlp_11_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalReturnsTrue()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120881/CWE78_OS_Command_Injection__wchar_t_console_execlp_11.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_11_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_11_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar3 = auStack_198; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401324); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401350,&UNK_00401350,&UNK_00401344,&UNK_00401334,puStack_10,0); return; }
['gcc']
14,659
void CWE78_OS_Command_Injection__wchar_t_console_execlp_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120881/CWE78_OS_Command_Injection__wchar_t_console_execlp_11.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_11_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,660
void CWE78_OS_Command_Injection__wchar_t_console_execlp_12_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalReturnsTrueOrFalse()) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } else { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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) */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120882/CWE78_OS_Command_Injection__wchar_t_console_execlp_12.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_12_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_12_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar3 = auStack_198; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1a8; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { func_0x00400b10(puStack_10,&UNK_004013d4); } else { lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400b20(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_004013c4); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400b60(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400be0(&UNK_00401400,&UNK_00401400,&UNK_004013f4,&UNK_004013e4,puStack_10,0); return; }
['gcc']
14,661
void CWE78_OS_Command_Injection__wchar_t_console_execlp_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120882/CWE78_OS_Command_Injection__wchar_t_console_execlp_12.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_12_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_12_good(void) { goodG2B(); return; }
['gcc']
14,662
void CWE78_OS_Command_Injection__wchar_t_console_execlp_13_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(GLOBAL_CONST_FIVE==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120883/CWE78_OS_Command_Injection__wchar_t_console_execlp_13.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_13_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_13_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (GLOBAL_CONST_FIVE == 5) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401340,&UNK_00401340,&UNK_00401334,&UNK_00401324,puStack_10,0); return; }
['gcc']
14,663
void CWE78_OS_Command_Injection__wchar_t_console_execlp_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120883/CWE78_OS_Command_Injection__wchar_t_console_execlp_13.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_13_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,664
void CWE78_OS_Command_Injection__wchar_t_console_execlp_14_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalFive==5) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120884/CWE78_OS_Command_Injection__wchar_t_console_execlp_14.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_14_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_14_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; if (globalFive == 5) { lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401340,&UNK_00401340,&UNK_00401334,&UNK_00401324,puStack_10,0); return; }
['gcc']
14,665
void CWE78_OS_Command_Injection__wchar_t_console_execlp_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120884/CWE78_OS_Command_Injection__wchar_t_console_execlp_14.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_14_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,666
void CWE78_OS_Command_Injection__wchar_t_console_execlp_15_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; switch(6) { case 6: { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120885/CWE78_OS_Command_Injection__wchar_t_console_execlp_15.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_15_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_15_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401340,&UNK_00401340,&UNK_00401334,&UNK_00401324,puStack_10,0); return; }
['gcc']
14,667
void CWE78_OS_Command_Injection__wchar_t_console_execlp_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120885/CWE78_OS_Command_Injection__wchar_t_console_execlp_15.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_15_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,668
void CWE78_OS_Command_Injection__wchar_t_console_execlp_16_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; while(1) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } break; } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120886/CWE78_OS_Command_Injection__wchar_t_console_execlp_16.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_16_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_16_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [48]; long lStack_18; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; lStack_18 = func_0x00400ad0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400a90(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401314); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } else { lStack_18 = func_0x00400ad0(puStack_10); if ((lStack_18 != 0) && (*(int *)((long)puStack_10 + lStack_18 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_10 + lStack_18 * 4 + -4) = 0; } } } func_0x00400b50(&UNK_00401340,&UNK_00401340,&UNK_00401334,&UNK_00401324,puStack_10,0); return; }
['gcc']
14,669
void CWE78_OS_Command_Injection__wchar_t_console_execlp_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120886/CWE78_OS_Command_Injection__wchar_t_console_execlp_16.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_16_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_16_good(void) { goodG2B(); return; }
['gcc']
14,670
void CWE78_OS_Command_Injection__wchar_t_console_execlp_17_bad() { int i; wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; for(i = 0; i < 1; i++) { { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120887/CWE78_OS_Command_Injection__wchar_t_console_execlp_17.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_17_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_17_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 auStack_1a8 [49]; 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_0x00400ad0(puStack_18); if (1 < 100U - lStack_20) { lVar1 = func_0x00400a90(lStack_20 * 4 + (long)puStack_18,100 - (int)lStack_20,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined4 *)((long)puStack_18 + lStack_20 * 4) = 0; } else { lStack_20 = func_0x00400ad0(puStack_18); if ((lStack_20 != 0) && (*(int *)((long)puStack_18 + lStack_20 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_18 + lStack_20 * 4 + -4) = 0; } } } } func_0x00400b50(&UNK_00401350,&UNK_00401350,&UNK_00401344,&UNK_00401334,puStack_18,0); return; }
['gcc']
14,671
void CWE78_OS_Command_Injection__wchar_t_console_execlp_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120887/CWE78_OS_Command_Injection__wchar_t_console_execlp_17.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_17_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_17_good(void) { goodG2B(); return; }
['gcc']
14,672
void CWE78_OS_Command_Injection__wchar_t_console_execlp_21_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; badStatic = 1; /* true */ data = badSource(data); /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* true */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120889/CWE78_OS_Command_Injection__wchar_t_console_execlp_21.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_21_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_21_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [49]; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; badStatic = 1; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400b50(&UNK_00401370,&UNK_00401370,&UNK_00401364,&UNK_00401354,puStack_10,0); return; }
['gcc']
14,673
void CWE78_OS_Command_Injection__wchar_t_console_execlp_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120889/CWE78_OS_Command_Injection__wchar_t_console_execlp_21.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_21_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,674
void CWE78_OS_Command_Injection__wchar_t_console_execlp_22_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; CWE78_OS_Command_Injection__wchar_t_console_execlp_22_badGlobal = 1; /* true */ data = CWE78_OS_Command_Injection__wchar_t_console_execlp_22_badSource(data); /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* true */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120890/CWE78_OS_Command_Injection__wchar_t_console_execlp_22a.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_22_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_22_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [49]; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; CWE78_OS_Command_Injection__wchar_t_console_execlp_22_badGlobal = 1; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__wchar_t_console_execlp_22_badSource(puStack_10); func_0x00400b50(&UNK_00401360,&UNK_00401360,&UNK_00401354,&UNK_00401344,puStack_10,0); return; }
['gcc']
14,675
void CWE78_OS_Command_Injection__wchar_t_console_execlp_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120890/CWE78_OS_Command_Injection__wchar_t_console_execlp_22a.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_22_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,676
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_execlp_22_badSource(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_console_execlp_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/120890/CWE78_OS_Command_Injection__wchar_t_console_execlp_22b.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_22_badSource
long CWE78_OS_Command_Injection__wchar_t_console_execlp_22_badSource(long param_1) { long lVar1; long lVar2; if (CWE78_OS_Command_Injection__wchar_t_console_execlp_22_badGlobal != 0) { lVar1 = func_0x00400ad0(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400a90(lVar1 * 4 + param_1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401344); *(undefined4 *)(param_1 + lVar1 * 4) = 0; } else { lVar1 = func_0x00400ad0(param_1); if ((lVar1 != 0) && (*(int *)(param_1 + lVar1 * 4 + -4) == 10)) { *(undefined4 *)(param_1 + lVar1 * 4 + -4) = 0; } } } } return param_1; }
['gcc']
14,677
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_execlp_22_goodG2B1Source(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_console_execlp_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/120890/CWE78_OS_Command_Injection__wchar_t_console_execlp_22b.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_22_goodG2B1Source
undefined8 CWE78_OS_Command_Injection__wchar_t_console_execlp_22_goodG2B1Source(undefined8 param_1) { if (CWE78_OS_Command_Injection__wchar_t_console_execlp_22_goodG2B1Global == 0) { func_0x00400a20(param_1,&UNK_004012fc); } else { printLine(&UNK_004012e4); } return param_1; }
['gcc']
14,678
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_execlp_22_goodG2B2Source(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_console_execlp_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/120890/CWE78_OS_Command_Injection__wchar_t_console_execlp_22b.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_22_goodG2B2Source
undefined8 CWE78_OS_Command_Injection__wchar_t_console_execlp_22_goodG2B2Source(undefined8 param_1) { if (CWE78_OS_Command_Injection__wchar_t_console_execlp_22_goodG2B2Global != 0) { func_0x00400a20(param_1,&UNK_004012fc); } return param_1; }
['gcc']
14,679
void CWE78_OS_Command_Injection__wchar_t_console_execlp_32_bad() { wchar_t * data; wchar_t * *dataPtr1 = &data; wchar_t * *dataPtr2 = &data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { wchar_t * data = *dataPtr1; { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } *dataPtr1 = data; } { wchar_t * data = *dataPtr2; /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); } }
['/* 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 */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120892/CWE78_OS_Command_Injection__wchar_t_console_execlp_32.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_32_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_32_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; 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 = 0; uStack_1c0 = 0; puVar2 = auStack_1b8; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_38 = &uStack_1c8; puStack_20 = *ppuStack_10; lStack_28 = func_0x00400ad0(puStack_20); if (1 < 100U - lStack_28) { lVar1 = func_0x00400a90(lStack_28 * 4 + (long)puStack_20,100 - (int)lStack_28,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(undefined4 *)((long)puStack_20 + lStack_28 * 4) = 0; } else { lStack_28 = func_0x00400ad0(puStack_20); if ((lStack_28 != 0) && (*(int *)((long)puStack_20 + lStack_28 * 4 + -4) == 10)) { *(undefined4 *)((long)puStack_20 + lStack_28 * 4 + -4) = 0; } } } *ppuStack_10 = puStack_20; puStack_30 = *ppuStack_18; func_0x00400b50(&UNK_00401370,&UNK_00401370,&UNK_00401364,&UNK_00401354,puStack_30,0); return; }
['gcc']
14,680
void CWE78_OS_Command_Injection__wchar_t_console_execlp_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120892/CWE78_OS_Command_Injection__wchar_t_console_execlp_32.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_32_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_32_good(void) { goodG2B(); return; }
['gcc']
14,681
void CWE78_OS_Command_Injection__wchar_t_console_execlp_42_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; data = badSource(data); /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120896/CWE78_OS_Command_Injection__wchar_t_console_execlp_42.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_42_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_42_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [49]; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400b50(&UNK_00401360,&UNK_00401360,&UNK_00401354,&UNK_00401344,puStack_10,0); return; }
['gcc']
14,682
void CWE78_OS_Command_Injection__wchar_t_console_execlp_42_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120896/CWE78_OS_Command_Injection__wchar_t_console_execlp_42.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_42_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_42_good(void) { goodG2B(); return; }
['gcc']
14,683
void CWE78_OS_Command_Injection__wchar_t_console_execlp_61_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; data = CWE78_OS_Command_Injection__wchar_t_console_execlp_61b_badSource(data); /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* 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/120904/CWE78_OS_Command_Injection__wchar_t_console_execlp_61a.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_61_bad
void CWE78_OS_Command_Injection__wchar_t_console_execlp_61_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [49]; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__wchar_t_console_execlp_61b_badSource(puStack_10); func_0x00400b50(&UNK_00401350,&UNK_00401350,&UNK_00401344,&UNK_00401334,puStack_10,0); return; }
['gcc']
14,684
void CWE78_OS_Command_Injection__wchar_t_console_execlp_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120904/CWE78_OS_Command_Injection__wchar_t_console_execlp_61a.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_61_good
void CWE78_OS_Command_Injection__wchar_t_console_execlp_61_good(void) { goodG2B(); return; }
['gcc']
14,685
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_execlp_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/120904/CWE78_OS_Command_Injection__wchar_t_console_execlp_61b.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_61b_badSource
long CWE78_OS_Command_Injection__wchar_t_console_execlp_61b_badSource(long param_1) { long lVar1; long lVar2; lVar1 = func_0x00400ad0(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400a90(lVar1 * 4 + param_1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401334); *(undefined4 *)(param_1 + lVar1 * 4) = 0; } else { lVar1 = func_0x00400ad0(param_1); if ((lVar1 != 0) && (*(int *)(param_1 + lVar1 * 4 + -4) == 10)) { *(undefined4 *)(param_1 + lVar1 * 4 + -4) = 0; } } } return param_1; }
['gcc']
14,686
wchar_t * CWE78_OS_Command_Injection__wchar_t_console_execlp_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/120904/CWE78_OS_Command_Injection__wchar_t_console_execlp_61b.c
CWE78_OS_Command_Injection__wchar_t_console_execlp_61b_goodG2BSource
undefined8 CWE78_OS_Command_Injection__wchar_t_console_execlp_61b_goodG2BSource(undefined8 param_1) { func_0x00400a20(param_1,&UNK_00401204); return param_1; }
['gcc']
14,687
void CWE78_OS_Command_Injection__wchar_t_console_popen_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'; } } } } { 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/120920/CWE78_OS_Command_Injection__wchar_t_console_popen_02.c
CWE78_OS_Command_Injection__wchar_t_console_popen_02_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_02_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,688
void CWE78_OS_Command_Injection__wchar_t_console_popen_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120920/CWE78_OS_Command_Injection__wchar_t_console_popen_02.c
CWE78_OS_Command_Injection__wchar_t_console_popen_02_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,689
void CWE78_OS_Command_Injection__wchar_t_console_popen_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'; } } } } { 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/120921/CWE78_OS_Command_Injection__wchar_t_console_popen_03.c
CWE78_OS_Command_Injection__wchar_t_console_popen_03_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_03_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,690
void CWE78_OS_Command_Injection__wchar_t_console_popen_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120921/CWE78_OS_Command_Injection__wchar_t_console_popen_03.c
CWE78_OS_Command_Injection__wchar_t_console_popen_03_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,691
void CWE78_OS_Command_Injection__wchar_t_console_popen_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'; } } } } { 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/120922/CWE78_OS_Command_Injection__wchar_t_console_popen_04.c
CWE78_OS_Command_Injection__wchar_t_console_popen_04_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_04_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_0040141c); *(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_0040142c); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']
14,692
void CWE78_OS_Command_Injection__wchar_t_console_popen_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120922/CWE78_OS_Command_Injection__wchar_t_console_popen_04.c
CWE78_OS_Command_Injection__wchar_t_console_popen_04_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,693
void CWE78_OS_Command_Injection__wchar_t_console_popen_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'; } } } } { 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/120923/CWE78_OS_Command_Injection__wchar_t_console_popen_05.c
CWE78_OS_Command_Injection__wchar_t_console_popen_05_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_05_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 (staticTrue != 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,694
void CWE78_OS_Command_Injection__wchar_t_console_popen_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120923/CWE78_OS_Command_Injection__wchar_t_console_popen_05.c
CWE78_OS_Command_Injection__wchar_t_console_popen_05_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,695
void CWE78_OS_Command_Injection__wchar_t_console_popen_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'; } } } } { 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/120924/CWE78_OS_Command_Injection__wchar_t_console_popen_06.c
CWE78_OS_Command_Injection__wchar_t_console_popen_06_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_06_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_00401418); *(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_00401428); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']
14,696
void CWE78_OS_Command_Injection__wchar_t_console_popen_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120924/CWE78_OS_Command_Injection__wchar_t_console_popen_06.c
CWE78_OS_Command_Injection__wchar_t_console_popen_06_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,697
void CWE78_OS_Command_Injection__wchar_t_console_popen_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'; } } } } { 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/120925/CWE78_OS_Command_Injection__wchar_t_console_popen_07.c
CWE78_OS_Command_Injection__wchar_t_console_popen_07_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_07_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 (staticFive == 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,698
void CWE78_OS_Command_Injection__wchar_t_console_popen_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120925/CWE78_OS_Command_Injection__wchar_t_console_popen_07.c
CWE78_OS_Command_Injection__wchar_t_console_popen_07_good
void CWE78_OS_Command_Injection__wchar_t_console_popen_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,699
void CWE78_OS_Command_Injection__wchar_t_console_popen_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'; } } } } { 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/120926/CWE78_OS_Command_Injection__wchar_t_console_popen_08.c
CWE78_OS_Command_Injection__wchar_t_console_popen_08_bad
void CWE78_OS_Command_Injection__wchar_t_console_popen_08_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 = staticReturnsTrue(); 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_00401434); *(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_00401444); if (lStack_20 != 0) { func_0x00400b60(lStack_20); } return; }
['gcc']