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,300
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_15_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; switch(6) { case 6: { #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 } 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); }
['/* 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 */', '/* 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/120405/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_15.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_15_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_15_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_004015d4); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } func_0x00400d60(&UNK_004015fc,&UNK_004015fc,&UNK_004015f0,&UNK_004015e0,puStack_10,0); return; }
['gcc']
14,301
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120405/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_15.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_15_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,302
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_16_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; while(1) { { #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 } 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); }
['/* 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 */', '/* 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/120406/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_16.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_16_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_16_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_004015d4); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } func_0x00400d60(&UNK_004015fc,&UNK_004015fc,&UNK_004015f0,&UNK_004015e0,puStack_10,0); return; }
['gcc']
14,303
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120406/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_16.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_16_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_16_good(void) { goodG2B(); return; }
['gcc']
14,304
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_17_bad() { int i; wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; for(i = 0; i < 1; i++) { { #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 } } /* 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); }
['/* 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 */', '/* 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/120407/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_17.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_17_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_17_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { iStack_1c = 0xffffffff; lStack_28 = func_0x00400c90(puStack_18); iStack_1c = func_0x00400d90(2,1,6); if (iStack_1c != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_004015e4); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_1c,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_2c = func_0x00400c40(iStack_1c,lStack_28 * 4 + (long)puStack_18, (99 - lStack_28) * 4,0), iStack_2c != -1)) && (iStack_2c != 0)) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d40(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d40(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400cb0(iStack_1c); } } func_0x00400d60(&UNK_0040160c,&UNK_0040160c,&UNK_00401600,&UNK_004015f0,puStack_18,0); return; }
['gcc']
14,305
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120407/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_17.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_17_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_17_good(void) { goodG2B(); return; }
['gcc']
14,306
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_18_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; goto source; source: { #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 } /* 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); }
['/* 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 */', '/* 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/120408/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_18.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_18_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_18_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_004015d4); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } func_0x00400d60(&UNK_004015fc,&UNK_004015fc,&UNK_004015f0,&UNK_004015e0,puStack_10,0); return; }
['gcc']
14,307
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_18_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120408/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_18.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_18_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_18_good(void) { goodG2B(); return; }
['gcc']
14,308
void CWE78_OS_Command_Injection__wchar_t_connect_socket_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/120409/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_21.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_21_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_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_0x00400d60(&UNK_0040161c,&UNK_0040161c,&UNK_00401610,&UNK_00401600,puStack_10,0); return; }
['gcc']
14,309
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120409/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_21.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_21_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,310
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_badGlobal = 1; /* true */ data = CWE78_OS_Command_Injection__wchar_t_connect_socket_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/120410/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_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_connect_socket_execlp_22_badGlobal = 1; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_badSource(puStack_10); func_0x00400d60(&UNK_00401610,&UNK_00401610,&UNK_00401604,&UNK_004015f4,puStack_10,0); return; }
['gcc']
14,311
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120410/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,312
wchar_t * CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_badSource(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_badGlobal) { { #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 } } return data; }
['/* 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/120410/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_badSource
long CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_badSource(long param_1) { int iVar1; undefined2 uStack_38; undefined2 uStack_36; undefined4 uStack_34; undefined4 *puStack_28; int iStack_1c; long lStack_18; int iStack_c; if (CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_badGlobal != 0) { iStack_c = 0xffffffff; lStack_18 = func_0x00400c90(param_1); iStack_c = func_0x00400d90(2,1,6); if (iStack_c != -1) { func_0x00400ca0(&uStack_38,0,0x10); uStack_38 = 2; uStack_34 = func_0x00400cf0(&UNK_004015f4); uStack_36 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_c,&uStack_38,0x10); if (((iVar1 != -1) && (iStack_1c = func_0x00400c40(iStack_c,lStack_18 * 4 + param_1,(99 - lStack_18) * 4,0), iStack_1c != -1)) && (iStack_1c != 0)) { *(undefined4 *)(param_1 + (lStack_18 + ((ulong)(long)iStack_1c >> 2)) * 4) = 0; puStack_28 = (undefined4 *)func_0x00400d40(param_1,0xd); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } puStack_28 = (undefined4 *)func_0x00400d40(param_1,10); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } } } if (iStack_c != -1) { func_0x00400cb0(iStack_c); } } return param_1; }
['gcc']
14,313
wchar_t * CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_goodG2B1Source(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_connect_socket_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/120410/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_goodG2B1Source
undefined8 CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_goodG2B1Source(undefined8 param_1) { if (CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_goodG2B1Global == 0) { func_0x00400a20(param_1,&UNK_004012fc); } else { printLine(&UNK_004012e4); } return param_1; }
['gcc']
14,314
wchar_t * CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_goodG2B2Source(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_connect_socket_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/120410/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_goodG2B2Source
undefined8 CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_goodG2B2Source(undefined8 param_1) { if (CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_22_goodG2B2Global != 0) { func_0x00400a20(param_1,&UNK_004012fc); } return param_1; }
['gcc']
14,315
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_31_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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 } { wchar_t * dataCopy = data; wchar_t * data = dataCopy; /* 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); } }
['/* 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 */', '/* 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/120411/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_31.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_31_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_31_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1e8; undefined2 uStack_1e6; undefined4 uStack_1e4; undefined8 uStack_1d8; undefined8 uStack_1d0; undefined8 auStack_1c8 [49]; undefined8 *puStack_40; undefined8 *puStack_38; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1d8 = 0; uStack_1d0 = 0; puVar3 = auStack_1c8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1d8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1e8,0,0x10); uStack_1e8 = 2; uStack_1e4 = func_0x00400cf0(&UNK_004015e4); uStack_1e6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1e8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } puStack_38 = puStack_10; puStack_40 = puStack_10; func_0x00400d60(&UNK_0040160c,&UNK_0040160c,&UNK_00401600,&UNK_004015f0,puStack_10,0); return; }
['gcc']
14,316
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_31_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120411/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_31.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_31_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_31_good(void) { goodG2B(); return; }
['gcc']
14,317
void CWE78_OS_Command_Injection__wchar_t_connect_socket_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; { #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 } *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); } }
['/* 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 */', '/* 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/120412/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_32.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_32_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_32_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1f8; undefined2 uStack_1f6; undefined4 uStack_1f4; undefined8 uStack_1e8; undefined8 uStack_1e0; undefined8 auStack_1d8 [49]; undefined8 *puStack_50; undefined8 *puStack_48; undefined4 *puStack_40; int iStack_34; long lStack_30; int iStack_24; undefined8 *puStack_20; undefined8 **ppuStack_18; undefined8 **ppuStack_10; ppuStack_10 = &puStack_50; ppuStack_18 = &puStack_50; uStack_1e8 = 0; uStack_1e0 = 0; puVar3 = auStack_1d8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_50 = &uStack_1e8; puStack_20 = *ppuStack_10; iStack_24 = 0xffffffff; lStack_30 = func_0x00400c90(puStack_20); iStack_24 = func_0x00400d90(2,1,6); if (iStack_24 != -1) { func_0x00400ca0(&uStack_1f8,0,0x10); uStack_1f8 = 2; uStack_1f4 = func_0x00400cf0(&UNK_00401604); uStack_1f6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_24,&uStack_1f8,0x10); if (((iVar1 != -1) && (iStack_34 = func_0x00400c40(iStack_24,lStack_30 * 4 + (long)puStack_20,(99 - lStack_30) * 4 ,0), iStack_34 != -1)) && (iStack_34 != 0)) { *(undefined4 *)((long)puStack_20 + (lStack_30 + ((ulong)(long)iStack_34 >> 2)) * 4) = 0; puStack_40 = (undefined4 *)func_0x00400d40(puStack_20,0xd); if (puStack_40 != (undefined4 *)0x0) { *puStack_40 = 0; } puStack_40 = (undefined4 *)func_0x00400d40(puStack_20,10); if (puStack_40 != (undefined4 *)0x0) { *puStack_40 = 0; } } } if (iStack_24 != -1) { func_0x00400cb0(iStack_24); } *ppuStack_10 = puStack_20; puStack_48 = *ppuStack_18; func_0x00400d60(&UNK_0040162c,&UNK_0040162c,&UNK_00401620,&UNK_00401610,puStack_48,0); return; }
['gcc']
14,318
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120412/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_32.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_32_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_32_good(void) { goodG2B(); return; }
['gcc']
14,319
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_34_bad() { wchar_t * data; CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_34_unionType myUnion; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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 } myUnion.unionFirst = data; { wchar_t * data = myUnion.unionSecond; /* 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); } }
['/* 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 */', '/* 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/120414/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_34.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_34_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_34_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1e8; undefined2 uStack_1e6; undefined4 uStack_1e4; undefined8 uStack_1d8; undefined8 uStack_1d0; undefined8 auStack_1c8 [49]; undefined8 *puStack_40; undefined8 *puStack_38; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1d8 = 0; uStack_1d0 = 0; puVar3 = auStack_1c8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1d8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1e8,0,0x10); uStack_1e8 = 2; uStack_1e4 = func_0x00400cf0(&UNK_004015e4); uStack_1e6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1e8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } puStack_40 = puStack_10; puStack_38 = puStack_10; func_0x00400d60(&UNK_0040160c,&UNK_0040160c,&UNK_00401600,&UNK_004015f0,puStack_10,0); return; }
['gcc']
14,320
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_34_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120414/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_34.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_34_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_34_good(void) { goodG2B(); return; }
['gcc']
14,321
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_badSink(wchar_t * 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/120415/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_badSink(undefined8 param_1) { func_0x00400d60(&UNK_00401600,&UNK_00401600,&UNK_004015f4,&UNK_004015e4,param_1,0); return; }
['gcc']
14,322
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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_execlp_41_badSink(data); }
['/* 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/120415/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_0040160c); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_badSink(puStack_10); return; }
['gcc']
14,323
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_goodG2BSink(wchar_t * 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120415/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401220,&UNK_00401220,&UNK_00401214,&UNK_00401204,param_1,0); return; }
['gcc']
14,324
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120415/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_41_good(void) { goodG2B(); return; }
['gcc']
14,325
void CWE78_OS_Command_Injection__wchar_t_connect_socket_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/120416/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_42.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_42_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_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_0x00400d60(&UNK_0040160c,&UNK_0040160c,&UNK_00401600,&UNK_004015f0,puStack_10,0); return; }
['gcc']
14,326
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_42_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120416/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_42.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_42_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_42_good(void) { goodG2B(); return; }
['gcc']
14,327
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_44_bad() { wchar_t * data; /* define a function pointer */ void (*funcPtr) (wchar_t *) = badSink; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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 } /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* 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 */', '/* use the function pointer */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120418/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_44.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_44_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_44_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; code *pcStack_10; pcStack_10 = badSink; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; lStack_28 = func_0x00400c90(puStack_18); iStack_1c = func_0x00400d90(2,1,6); if (iStack_1c != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_0040161c); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_1c,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_2c = func_0x00400c40(iStack_1c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4 ,0), iStack_2c != -1)) && (iStack_2c != 0)) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d40(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d40(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400cb0(iStack_1c); } (*pcStack_10)(puStack_18); return; }
['gcc']
14,328
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_44_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120418/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_44.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_44_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_44_good(void) { goodG2B(); return; }
['gcc']
14,329
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_45_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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_execlp_45_badData = data; 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/120419/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_45.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_45_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_45_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_0040161c); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_45_badData = puStack_10; badSink(); return; }
['gcc']
14,330
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_45_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120419/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_45.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_45_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_45_good(void) { goodG2B(); return; }
['gcc']
14,331
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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_execlp_51b_badSink(data); }
['/* 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/120420/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_004015e4); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51b_badSink(puStack_10); return; }
['gcc']
14,332
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120420/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51_good(void) { goodG2B(); return; }
['gcc']
14,333
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51b_badSink(wchar_t * 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/120420/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51b_badSink(undefined8 param_1) { func_0x00400d60(&UNK_00401600,&UNK_00401600,&UNK_004015f4,&UNK_004015e4,param_1,0); return; }
['gcc']
14,334
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51b_goodG2BSink(wchar_t * 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120420/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_51b_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401220,&UNK_00401220,&UNK_00401214,&UNK_00401204,param_1,0); return; }
['gcc']
14,335
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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_execlp_52b_badSink(data); }
['/* 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/120421/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_00401604); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52b_badSink(puStack_10); return; }
['gcc']
14,336
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120421/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52_good(void) { goodG2B(); return; }
['gcc']
14,337
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52b_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120421/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c_badSink(param_1); return; }
['gcc']
14,338
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52b_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120421/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c_goodG2BSink(param_1); return; }
['gcc']
14,339
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c_badSink(wchar_t * 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/120421/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c_badSink(undefined8 param_1) { func_0x00400d60(&UNK_00401620,&UNK_00401620,&UNK_00401614,&UNK_00401604,param_1,0); return; }
['gcc']
14,340
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c_goodG2BSink(wchar_t * 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120421/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_52c_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401230,&UNK_00401230,&UNK_00401224,&UNK_00401214,param_1,0); return; }
['gcc']
14,341
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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_execlp_53b_badSink(data); }
['/* 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/120422/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_00401624); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53b_badSink(puStack_10); return; }
['gcc']
14,342
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120422/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53_good(void) { goodG2B(); return; }
['gcc']
14,343
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53b_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120422/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c_badSink(param_1); return; }
['gcc']
14,344
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53b_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120422/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c_goodG2BSink(param_1); return; }
['gcc']
14,345
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120422/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d_badSink(param_1); return; }
['gcc']
14,346
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120422/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53c_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d_goodG2BSink(param_1); return; }
['gcc']
14,347
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d_badSink(wchar_t * 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/120422/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d_badSink(undefined8 param_1) { func_0x00400d60(&UNK_00401640,&UNK_00401640,&UNK_00401634,&UNK_00401624,param_1,0); return; }
['gcc']
14,348
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d_goodG2BSink(wchar_t * 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120422/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_53d_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401250,&UNK_00401250,&UNK_00401244,&UNK_00401234,param_1,0); return; }
['gcc']
14,349
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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_execlp_54b_badSink(data); }
['/* 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/120423/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_00401634); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54b_badSink(puStack_10); return; }
['gcc']
14,350
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120423/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54_good(void) { goodG2B(); return; }
['gcc']
14,351
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54b_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120423/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c_badSink(param_1); return; }
['gcc']
14,352
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54b_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120423/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c_goodG2BSink(param_1); return; }
['gcc']
14,353
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120423/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d_badSink(param_1); return; }
['gcc']
14,354
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120423/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54c_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d_goodG2BSink(param_1); return; }
['gcc']
14,355
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120423/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e_badSink(param_1); return; }
['gcc']
14,356
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120423/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54d_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e_goodG2BSink(param_1); return; }
['gcc']
14,357
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e_badSink(wchar_t * 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/120423/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e_badSink(undefined8 param_1) { func_0x00400d60(&UNK_00401650,&UNK_00401650,&UNK_00401644,&UNK_00401634,param_1,0); return; }
['gcc']
14,358
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e_goodG2BSink(wchar_t * 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120423/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_54e_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401270,&UNK_00401270,&UNK_00401264,&UNK_00401254,param_1,0); return; }
['gcc']
14,359
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; data = CWE78_OS_Command_Injection__wchar_t_connect_socket_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/120424/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_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_connect_socket_execlp_61b_badSource(puStack_10); func_0x00400d60(&UNK_00401600,&UNK_00401600,&UNK_004015f4,&UNK_004015e4,puStack_10,0); return; }
['gcc']
14,360
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120424/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61_good(void) { goodG2B(); return; }
['gcc']
14,361
wchar_t * CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61b_badSource(wchar_t * data) { { #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 } return data; }
['/* 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/120424/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61b_badSource
long CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61b_badSource(long param_1) { int iVar1; undefined2 uStack_38; undefined2 uStack_36; undefined4 uStack_34; undefined4 *puStack_28; int iStack_1c; long lStack_18; int iStack_c; iStack_c = 0xffffffff; lStack_18 = func_0x00400c90(param_1); iStack_c = func_0x00400d90(2,1,6); if (iStack_c != -1) { func_0x00400ca0(&uStack_38,0,0x10); uStack_38 = 2; uStack_34 = func_0x00400cf0(&UNK_004015e4); uStack_36 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_c,&uStack_38,0x10); if (((iVar1 != -1) && (iStack_1c = func_0x00400c40(iStack_c,lStack_18 * 4 + param_1,(99 - lStack_18) * 4,0), iStack_1c != -1)) && (iStack_1c != 0)) { *(undefined4 *)(param_1 + (lStack_18 + ((ulong)(long)iStack_1c >> 2)) * 4) = 0; puStack_28 = (undefined4 *)func_0x00400d40(param_1,0xd); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } puStack_28 = (undefined4 *)func_0x00400d40(param_1,10); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } } } if (iStack_c != -1) { func_0x00400cb0(iStack_c); } return param_1; }
['gcc']
14,362
wchar_t * CWE78_OS_Command_Injection__wchar_t_connect_socket_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/120424/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61b_goodG2BSource
undefined8 CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_61b_goodG2BSource(undefined8 param_1) { func_0x00400a20(param_1,&UNK_00401204); return param_1; }
['gcc']
14,363
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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_execlp_63b_badSink(&data); }
['/* 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/120426/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined8 *puStack_30; undefined4 *puStack_28; int iStack_1c; long lStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_30 = &uStack_1c8; iStack_c = 0xffffffff; lStack_18 = func_0x00400c90(puStack_30); iStack_c = func_0x00400d90(2,1,6); if (iStack_c != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_004015e4); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_c,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_1c = func_0x00400c40(iStack_c,(long)puStack_30 + lStack_18 * 4,(99 - lStack_18) * 4, 0), iStack_1c != -1)) && (iStack_1c != 0)) { *(undefined4 *)((long)puStack_30 + (lStack_18 + ((ulong)(long)iStack_1c >> 2)) * 4) = 0; puStack_28 = (undefined4 *)func_0x00400d40(puStack_30,0xd); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } puStack_28 = (undefined4 *)func_0x00400d40(puStack_30,10); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } } } if (iStack_c != -1) { func_0x00400cb0(iStack_c); } CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63b_badSink(&puStack_30); return; }
['gcc']
14,364
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120426/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63_good(void) { goodG2B(); return; }
['gcc']
14,365
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63b_badSink(wchar_t * * dataPtr) { wchar_t * data = *dataPtr; /* 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/120426/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63b_badSink(undefined8 *param_1) { func_0x00400d60(&UNK_00401600,&UNK_00401600,&UNK_004015f4,&UNK_004015e4,*param_1,0); return; }
['gcc']
14,366
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63b_goodG2BSink(wchar_t * * dataPtr) { wchar_t * data = *dataPtr; /* 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120426/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_63b_goodG2BSink(undefined8 *param_1) { func_0x00400ad0(&UNK_00401220,&UNK_00401220,&UNK_00401214,&UNK_00401204,*param_1,0); return; }
['gcc']
14,367
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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_execlp_64b_badSink(&data); }
['/* 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/120427/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined8 *puStack_30; undefined4 *puStack_28; int iStack_1c; long lStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_30 = &uStack_1c8; iStack_c = 0xffffffff; lStack_18 = func_0x00400c90(puStack_30); iStack_c = func_0x00400d90(2,1,6); if (iStack_c != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_004015f4); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_c,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_1c = func_0x00400c40(iStack_c,(long)puStack_30 + lStack_18 * 4,(99 - lStack_18) * 4, 0), iStack_1c != -1)) && (iStack_1c != 0)) { *(undefined4 *)((long)puStack_30 + (lStack_18 + ((ulong)(long)iStack_1c >> 2)) * 4) = 0; puStack_28 = (undefined4 *)func_0x00400d40(puStack_30,0xd); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } puStack_28 = (undefined4 *)func_0x00400d40(puStack_30,10); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } } } if (iStack_c != -1) { func_0x00400cb0(iStack_c); } CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64b_badSink(&puStack_30); return; }
['gcc']
14,368
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120427/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64_good(void) { goodG2B(); return; }
['gcc']
14,369
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64b_badSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ wchar_t * * dataPtr = (wchar_t * *)dataVoidPtr; /* dereference dataPtr into data */ wchar_t * data = (*dataPtr); /* 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); }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* 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/120427/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64b_badSink(undefined8 *param_1) { func_0x00400d60(&UNK_00401610,&UNK_00401610,&UNK_00401604,&UNK_004015f4,*param_1,0); return; }
['gcc']
14,370
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64b_goodG2BSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ wchar_t * * dataPtr = (wchar_t * *)dataVoidPtr; /* dereference dataPtr into data */ wchar_t * data = (*dataPtr); /* 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); }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120427/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_64b_goodG2BSink(undefined8 *param_1) { func_0x00400ad0(&UNK_00401230,&UNK_00401230,&UNK_00401224,&UNK_00401214,*param_1,0); return; }
['gcc']
14,371
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65_bad() { wchar_t * data; /* define a function pointer */ void (*funcPtr) (wchar_t *) = CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65b_badSink; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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 } /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* 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 */', '/* use the function pointer */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120428/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; code *pcStack_10; pcStack_10 = CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65b_badSink; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; lStack_28 = func_0x00400c90(puStack_18); iStack_1c = func_0x00400d90(2,1,6); if (iStack_1c != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_004015f4); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_1c,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_2c = func_0x00400c40(iStack_1c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4 ,0), iStack_2c != -1)) && (iStack_2c != 0)) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d40(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d40(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400cb0(iStack_1c); } (*pcStack_10)(puStack_18); return; }
['gcc']
14,372
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120428/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65_good(void) { goodG2B(); return; }
['gcc']
14,373
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65b_badSink(wchar_t * 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/120428/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65b_badSink(undefined8 param_1) { func_0x00400d60(&UNK_00401610,&UNK_00401610,&UNK_00401604,&UNK_004015f4,param_1,0); return; }
['gcc']
14,374
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65b_goodG2BSink(wchar_t * 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120428/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_65b_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401220,&UNK_00401220,&UNK_00401214,&UNK_00401204,param_1,0); return; }
['gcc']
14,375
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66_bad() { wchar_t * data; wchar_t * dataArray[5]; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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 } /* put data in array */ dataArray[2] = data; CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66b_badSink(dataArray); }
['/* 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 */', '/* put data in array */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120429/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1f8; undefined2 uStack_1f6; undefined4 uStack_1f4; undefined8 uStack_1e8; undefined8 uStack_1e0; undefined8 auStack_1d8 [48]; undefined auStack_58 [16]; undefined8 *puStack_48; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1e8 = 0; uStack_1e0 = 0; puVar3 = auStack_1d8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1e8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1f8,0,0x10); uStack_1f8 = 2; uStack_1f4 = func_0x00400cf0(&UNK_00401604); uStack_1f6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1f8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } puStack_48 = puStack_10; CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66b_badSink(auStack_58); return; }
['gcc']
14,376
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120429/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66_good(void) { goodG2B(); return; }
['gcc']
14,377
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66b_badSink(wchar_t * dataArray[]) { /* copy data out of dataArray */ wchar_t * data = dataArray[2]; /* 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); }
['/* copy data out of dataArray */', '/* 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/120429/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66b_badSink(long param_1) { func_0x00400d60(&UNK_00401620,&UNK_00401620,&UNK_00401614,&UNK_00401604, *(undefined8 *)(param_1 + 0x10),0); return; }
['gcc']
14,378
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66b_goodG2BSink(wchar_t * dataArray[]) { wchar_t * data = dataArray[2]; /* 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120429/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_66b_goodG2BSink(long param_1) { func_0x00400ad0(&UNK_00401230,&UNK_00401230,&UNK_00401224,&UNK_00401214, *(undefined8 *)(param_1 + 0x10),0); return; }
['gcc']
14,379
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67_bad() { wchar_t * data; CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67_structType myStruct; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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 } myStruct.structFirst = data; CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67b_badSink(myStruct); }
['/* 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/120430/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined8 *puStack_38; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_004015f4); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } puStack_38 = puStack_10; CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67b_badSink(puStack_10); return; }
['gcc']
14,380
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120430/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67_good(void) { goodG2B(); return; }
['gcc']
14,381
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67b_badSink(CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67_structType myStruct) { wchar_t * data = myStruct.structFirst; /* 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/120430/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67b_badSink(undefined8 param_1) { func_0x00400d60(&UNK_00401610,&UNK_00401610,&UNK_00401604,&UNK_004015f4,param_1,0); return; }
['gcc']
14,382
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67b_goodG2BSink(CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67_structType myStruct) { wchar_t * data = myStruct.structFirst; /* 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120430/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_67b_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401230,&UNK_00401230,&UNK_00401224,&UNK_00401214,param_1,0); return; }
['gcc']
14,383
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #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_execlp_68_badData = data; CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_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/120431/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_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 auStack_1b8 [49]; undefined4 *puStack_30; int iStack_24; long lStack_20; int iStack_14; undefined8 *puStack_10; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1c8; iStack_14 = 0xffffffff; lStack_20 = func_0x00400c90(puStack_10); iStack_14 = func_0x00400d90(2,1,6); if (iStack_14 != -1) { func_0x00400ca0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400cf0(&UNK_004015f4); uStack_1d6 = func_0x00400c70(0x6987); iVar1 = func_0x00400d50(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c40(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_0x00400d40(puStack_10,0xd); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } puStack_30 = (undefined4 *)func_0x00400d40(puStack_10,10); if (puStack_30 != (undefined4 *)0x0) { *puStack_30 = 0; } } } if (iStack_14 != -1) { func_0x00400cb0(iStack_14); } CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68_badData = puStack_10; CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68b_badSink(); return; }
['gcc']
14,384
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120431/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68a.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68_good(void) { goodG2B(); return; }
['gcc']
14,385
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68b_badSink() { wchar_t * data = CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68_badData; /* 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/120431/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68b_badSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68b_badSink(void) { func_0x00400d60(&UNK_00401610,&UNK_00401610,&UNK_00401604,&UNK_004015f4, CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68_badData,0); return; }
['gcc']
14,386
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68b_goodG2BSink() { wchar_t * data = CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68_goodG2BData; /* 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 */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120431/CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68b.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68b_goodG2BSink(void) { func_0x00400ad0(&UNK_00401230,&UNK_00401230,&UNK_00401224,&UNK_00401214, CWE78_OS_Command_Injection__wchar_t_connect_socket_execlp_68_goodG2BData,0); return; }
['gcc']
14,387
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_01_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 } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* POTENTIAL FLAW: 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 */', '/* 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/120439/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_01.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_01_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_01_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 [42]; long lStack_38; 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_0x00400cc0(puStack_10); iStack_14 = func_0x00400dd0(2,1,6); if (iStack_14 != -1) { func_0x00400ce0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400d30(&UNK_00401674); uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400da0(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c70(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_0x00400cf0(iStack_14); } lStack_38 = func_0x00400d80(puStack_10,&UNK_00401680); if (lStack_38 != 0) { func_0x00400cd0(lStack_38); } return; }
['gcc']
14,388
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_01_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120439/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_01.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_01_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_01_good(void) { goodG2B(); return; }
['gcc']
14,389
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_02_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(1) { { #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 } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* POTENTIAL FLAW: 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 */', '/* 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/120440/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_02.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_02_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_02_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 [42]; long lStack_38; 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_0x00400cc0(puStack_10); iStack_14 = func_0x00400dd0(2,1,6); if (iStack_14 != -1) { func_0x00400ce0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400d30(&UNK_00401674); uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400da0(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c70(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_0x00400cf0(iStack_14); } lStack_38 = func_0x00400d80(puStack_10,&UNK_00401680); if (lStack_38 != 0) { func_0x00400cd0(lStack_38); } return; }
['gcc']
14,390
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120440/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_02.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_02_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,391
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_03_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(5==5) { { #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 } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* POTENTIAL FLAW: 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 */', '/* 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/120441/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_03.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_03_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_03_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 [42]; long lStack_38; 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_0x00400cc0(puStack_10); iStack_14 = func_0x00400dd0(2,1,6); if (iStack_14 != -1) { func_0x00400ce0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400d30(&UNK_00401674); uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400da0(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c70(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_0x00400cf0(iStack_14); } lStack_38 = func_0x00400d80(puStack_10,&UNK_00401680); if (lStack_38 != 0) { func_0x00400cd0(lStack_38); } return; }
['gcc']
14,392
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120441/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_03.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_03_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,393
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_04_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(STATIC_CONST_TRUE) { { #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 } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* POTENTIAL FLAW: 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 */', '/* 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/120442/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_04.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_04_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_04_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 [42]; long lStack_38; 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_0x00400cc0(puStack_10); iStack_14 = func_0x00400dd0(2,1,6); if (iStack_14 != -1) { func_0x00400ce0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400d30(&UNK_0040168c); uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400da0(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c70(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_0x00400cf0(iStack_14); } lStack_38 = func_0x00400d80(puStack_10,&UNK_00401698); if (lStack_38 != 0) { func_0x00400cd0(lStack_38); } return; }
['gcc']
14,394
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120442/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_04.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_04_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,395
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_05_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(staticTrue) { { #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 } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* POTENTIAL FLAW: 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 */', '/* 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/120443/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_05.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_05_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_05_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 [42]; long lStack_38; 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; if (staticTrue != 0) { iStack_14 = 0xffffffff; lStack_20 = func_0x00400cc0(puStack_10); iStack_14 = func_0x00400dd0(2,1,6); if (iStack_14 != -1) { func_0x00400ce0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400d30(&UNK_00401684); uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400da0(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c70(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_0x00400cf0(iStack_14); } } lStack_38 = func_0x00400d80(puStack_10,&UNK_00401690); if (lStack_38 != 0) { func_0x00400cd0(lStack_38); } return; }
['gcc']
14,396
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120443/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_05.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_05_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,397
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_06_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(STATIC_CONST_FIVE==5) { { #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 } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* POTENTIAL FLAW: 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 */', '/* 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/120444/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_06.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_06_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_06_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 [42]; long lStack_38; 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_0x00400cc0(puStack_10); iStack_14 = func_0x00400dd0(2,1,6); if (iStack_14 != -1) { func_0x00400ce0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400d30(&UNK_00401688); uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400da0(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c70(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_0x00400cf0(iStack_14); } lStack_38 = func_0x00400d80(puStack_10,&UNK_00401694); if (lStack_38 != 0) { func_0x00400cd0(lStack_38); } return; }
['gcc']
14,398
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/120444/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_06.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_06_good
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,399
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_07_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(staticFive==5) { { #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 } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* POTENTIAL FLAW: 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 */', '/* 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/120445/CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_07.c
CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_07_bad
void CWE78_OS_Command_Injection__wchar_t_connect_socket_popen_07_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 [42]; long lStack_38; 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; if (staticFive == 5) { iStack_14 = 0xffffffff; lStack_20 = func_0x00400cc0(puStack_10); iStack_14 = func_0x00400dd0(2,1,6); if (iStack_14 != -1) { func_0x00400ce0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = func_0x00400d30(&UNK_00401684); uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400da0(iStack_14,&uStack_1d8,0x10); if (((iVar1 != -1) && (iStack_24 = func_0x00400c70(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_0x00400cf0(iStack_14); } } lStack_38 = func_0x00400d80(puStack_10,&UNK_00401690); if (lStack_38 != 0) { func_0x00400cd0(lStack_38); } return; }
['gcc']