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 |
|---|---|---|---|---|---|---|---|---|
12,500 | void CWE78_OS_Command_Injection__char_connect_socket_system_52c_goodG2BSink(char * data)
{
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118117/CWE78_OS_Command_Injection__char_connect_socket_system_52c.c | CWE78_OS_Command_Injection__char_connect_socket_system_52c_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_52c_goodG2BSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a40(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401274);
func_0x00400ad0(1);
}
return;
}
| ['gcc'] |
12,501 | void CWE78_OS_Command_Injection__char_connect_socket_system_53_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(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(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE78_OS_Command_Injection__char_connect_socket_system_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/118118/CWE78_OS_Command_Injection__char_connect_socket_system_53a.c | CWE78_OS_Command_Injection__char_connect_socket_system_53_bad |
void CWE78_OS_Command_Injection__char_connect_socket_system_53_bad(void)
{
int iVar1;
undefined2 uStack_a8;
undefined2 uStack_a6;
undefined4 uStack_a4;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_98 = 0x2068732f6e69622f;
uStack_90 = 0x20616c2d20736c;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_10 = &uStack_98;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400cb0(puStack_10);
iStack_14 = func_0x00400de0(2,1,6);
if (iStack_14 != -1) {
func_0x00400d00(&uStack_a8,0,0x10);
uStack_a8 = 2;
uStack_a4 = func_0x00400d50(&UNK_00401694);
uStack_a6 = func_0x00400cd0(0x6987);
iVar1 = func_0x00400db0(iStack_14,&uStack_a8,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c80(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400ce0(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400ce0(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400d10(iStack_14);
}
CWE78_OS_Command_Injection__char_connect_socket_system_53b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,502 | void CWE78_OS_Command_Injection__char_connect_socket_system_53_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118118/CWE78_OS_Command_Injection__char_connect_socket_system_53a.c | CWE78_OS_Command_Injection__char_connect_socket_system_53_good |
void CWE78_OS_Command_Injection__char_connect_socket_system_53_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,503 | void CWE78_OS_Command_Injection__char_connect_socket_system_53b_badSink(char * data)
{
CWE78_OS_Command_Injection__char_connect_socket_system_53c_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118118/CWE78_OS_Command_Injection__char_connect_socket_system_53b.c | CWE78_OS_Command_Injection__char_connect_socket_system_53b_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_53b_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_connect_socket_system_53c_badSink(param_1);
return;
}
| ['gcc'] |
12,504 | void CWE78_OS_Command_Injection__char_connect_socket_system_53b_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_connect_socket_system_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118118/CWE78_OS_Command_Injection__char_connect_socket_system_53b.c | CWE78_OS_Command_Injection__char_connect_socket_system_53b_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_53b_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_connect_socket_system_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,505 | void CWE78_OS_Command_Injection__char_connect_socket_system_53c_badSink(char * data)
{
CWE78_OS_Command_Injection__char_connect_socket_system_53d_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118118/CWE78_OS_Command_Injection__char_connect_socket_system_53c.c | CWE78_OS_Command_Injection__char_connect_socket_system_53c_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_53c_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_connect_socket_system_53d_badSink(param_1);
return;
}
| ['gcc'] |
12,506 | void CWE78_OS_Command_Injection__char_connect_socket_system_53c_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_connect_socket_system_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118118/CWE78_OS_Command_Injection__char_connect_socket_system_53c.c | CWE78_OS_Command_Injection__char_connect_socket_system_53c_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_53c_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_connect_socket_system_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,507 | void CWE78_OS_Command_Injection__char_connect_socket_system_53d_badSink(char * data)
{
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118118/CWE78_OS_Command_Injection__char_connect_socket_system_53d.c | CWE78_OS_Command_Injection__char_connect_socket_system_53d_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_53d_badSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400cc0(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401694);
func_0x00400da0(1);
}
return;
}
| ['gcc'] |
12,508 | void CWE78_OS_Command_Injection__char_connect_socket_system_53d_goodG2BSink(char * data)
{
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118118/CWE78_OS_Command_Injection__char_connect_socket_system_53d.c | CWE78_OS_Command_Injection__char_connect_socket_system_53d_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_53d_goodG2BSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a40(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401284);
func_0x00400ad0(1);
}
return;
}
| ['gcc'] |
12,509 | void CWE78_OS_Command_Injection__char_connect_socket_system_54_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(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(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE78_OS_Command_Injection__char_connect_socket_system_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/118119/CWE78_OS_Command_Injection__char_connect_socket_system_54a.c | CWE78_OS_Command_Injection__char_connect_socket_system_54_bad |
void CWE78_OS_Command_Injection__char_connect_socket_system_54_bad(void)
{
int iVar1;
undefined2 uStack_a8;
undefined2 uStack_a6;
undefined4 uStack_a4;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_98 = 0x2068732f6e69622f;
uStack_90 = 0x20616c2d20736c;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_10 = &uStack_98;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400cb0(puStack_10);
iStack_14 = func_0x00400de0(2,1,6);
if (iStack_14 != -1) {
func_0x00400d00(&uStack_a8,0,0x10);
uStack_a8 = 2;
uStack_a4 = func_0x00400d50(&UNK_004016a4);
uStack_a6 = func_0x00400cd0(0x6987);
iVar1 = func_0x00400db0(iStack_14,&uStack_a8,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c80(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400ce0(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400ce0(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400d10(iStack_14);
}
CWE78_OS_Command_Injection__char_connect_socket_system_54b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,510 | void CWE78_OS_Command_Injection__char_connect_socket_system_54_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118119/CWE78_OS_Command_Injection__char_connect_socket_system_54a.c | CWE78_OS_Command_Injection__char_connect_socket_system_54_good |
void CWE78_OS_Command_Injection__char_connect_socket_system_54_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,511 | void CWE78_OS_Command_Injection__char_connect_socket_system_54b_badSink(char * data)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54c_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118119/CWE78_OS_Command_Injection__char_connect_socket_system_54b.c | CWE78_OS_Command_Injection__char_connect_socket_system_54b_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_54b_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54c_badSink(param_1);
return;
}
| ['gcc'] |
12,512 | void CWE78_OS_Command_Injection__char_connect_socket_system_54b_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118119/CWE78_OS_Command_Injection__char_connect_socket_system_54b.c | CWE78_OS_Command_Injection__char_connect_socket_system_54b_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_54b_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,513 | void CWE78_OS_Command_Injection__char_connect_socket_system_54c_badSink(char * data)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54d_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118119/CWE78_OS_Command_Injection__char_connect_socket_system_54c.c | CWE78_OS_Command_Injection__char_connect_socket_system_54c_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_54c_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54d_badSink(param_1);
return;
}
| ['gcc'] |
12,514 | void CWE78_OS_Command_Injection__char_connect_socket_system_54c_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118119/CWE78_OS_Command_Injection__char_connect_socket_system_54c.c | CWE78_OS_Command_Injection__char_connect_socket_system_54c_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_54c_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,515 | void CWE78_OS_Command_Injection__char_connect_socket_system_54d_badSink(char * data)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54e_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118119/CWE78_OS_Command_Injection__char_connect_socket_system_54d.c | CWE78_OS_Command_Injection__char_connect_socket_system_54d_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_54d_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54e_badSink(param_1);
return;
}
| ['gcc'] |
12,516 | void CWE78_OS_Command_Injection__char_connect_socket_system_54d_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118119/CWE78_OS_Command_Injection__char_connect_socket_system_54d.c | CWE78_OS_Command_Injection__char_connect_socket_system_54d_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_54d_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_connect_socket_system_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,517 | void CWE78_OS_Command_Injection__char_connect_socket_system_54e_badSink(char * data)
{
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118119/CWE78_OS_Command_Injection__char_connect_socket_system_54e.c | CWE78_OS_Command_Injection__char_connect_socket_system_54e_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_54e_badSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400cc0(param_1);
if (iVar1 < 1) {
printLine(&UNK_004016a4);
func_0x00400da0(1);
}
return;
}
| ['gcc'] |
12,518 | void CWE78_OS_Command_Injection__char_connect_socket_system_54e_goodG2BSink(char * data)
{
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118119/CWE78_OS_Command_Injection__char_connect_socket_system_54e.c | CWE78_OS_Command_Injection__char_connect_socket_system_54e_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_54e_goodG2BSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a40(param_1);
if (iVar1 < 1) {
printLine(&UNK_004012a4);
func_0x00400ad0(1);
}
return;
}
| ['gcc'] |
12,519 | void CWE78_OS_Command_Injection__char_connect_socket_system_61_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
data = CWE78_OS_Command_Injection__char_connect_socket_system_61b_badSource(data);
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118120/CWE78_OS_Command_Injection__char_connect_socket_system_61a.c | CWE78_OS_Command_Injection__char_connect_socket_system_61_bad |
void CWE78_OS_Command_Injection__char_connect_socket_system_61_bad(void)
{
int iVar1;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
undefined8 *puStack_10;
uStack_78 = 0x2068732f6e69622f;
uStack_70 = 0x20616c2d20736c;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
puStack_10 = &uStack_78;
puStack_10 = (undefined8 *)
CWE78_OS_Command_Injection__char_connect_socket_system_61b_badSource(puStack_10);
iVar1 = func_0x00400cc0(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_00401644);
func_0x00400da0(1);
}
return;
}
| ['gcc'] |
12,520 | void CWE78_OS_Command_Injection__char_connect_socket_system_61_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118120/CWE78_OS_Command_Injection__char_connect_socket_system_61a.c | CWE78_OS_Command_Injection__char_connect_socket_system_61_good |
void CWE78_OS_Command_Injection__char_connect_socket_system_61_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,521 | char * CWE78_OS_Command_Injection__char_connect_socket_system_61b_badSource(char * data)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(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(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\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/118120/CWE78_OS_Command_Injection__char_connect_socket_system_61b.c | CWE78_OS_Command_Injection__char_connect_socket_system_61b_badSource |
long CWE78_OS_Command_Injection__char_connect_socket_system_61b_badSource(long param_1)
{
int iVar1;
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_c;
iStack_c = 0xffffffff;
lStack_18 = func_0x00400cb0(param_1);
iStack_c = func_0x00400de0(2,1,6);
if (iStack_c != -1) {
func_0x00400d00(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400d50(&UNK_00401644);
uStack_36 = func_0x00400cd0(0x6987);
iVar1 = func_0x00400db0(iStack_c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_1c = func_0x00400c80(iStack_c,param_1 + lStack_18,99 - lStack_18,0), iStack_1c != -1
)) && (iStack_1c != 0)) {
*(undefined *)(param_1 + iStack_1c + lStack_18) = 0;
puStack_28 = (undefined *)func_0x00400ce0(param_1,0xd);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined *)func_0x00400ce0(param_1,10);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_c != -1) {
func_0x00400d10(iStack_c);
}
return param_1;
}
| ['gcc'] |
12,522 | char * CWE78_OS_Command_Injection__char_connect_socket_system_61b_goodG2BSource(char * data)
{
/* FIX: Append a fixed string to data (not user / external input) */
strcat(data, "*.*");
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/118120/CWE78_OS_Command_Injection__char_connect_socket_system_61b.c | CWE78_OS_Command_Injection__char_connect_socket_system_61b_goodG2BSource |
char * CWE78_OS_Command_Injection__char_connect_socket_system_61b_goodG2BSource(char *param_1)
{
char cVar1;
ulong uVar2;
char *pcVar3;
uVar2 = 0xffffffffffffffff;
pcVar3 = param_1;
do {
if (uVar2 == 0) break;
uVar2 = uVar2 - 1;
cVar1 = *pcVar3;
pcVar3 = pcVar3 + 1;
} while (cVar1 != '\0');
*(undefined4 *)(param_1 + (~uVar2 - 1)) = 0x2a2e2a;
return param_1;
}
| ['gcc'] |
12,523 | void CWE78_OS_Command_Injection__char_connect_socket_system_63_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(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(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE78_OS_Command_Injection__char_connect_socket_system_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/118122/CWE78_OS_Command_Injection__char_connect_socket_system_63a.c | CWE78_OS_Command_Injection__char_connect_socket_system_63_bad |
void CWE78_OS_Command_Injection__char_connect_socket_system_63_bad(void)
{
int iVar1;
undefined2 uStack_a8;
undefined2 uStack_a6;
undefined4 uStack_a4;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
undefined8 *puStack_30;
undefined *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_c;
uStack_98 = 0x2068732f6e69622f;
uStack_90 = 0x20616c2d20736c;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_30 = &uStack_98;
iStack_c = 0xffffffff;
lStack_18 = func_0x00400cb0(puStack_30);
iStack_c = func_0x00400de0(2,1,6);
if (iStack_c != -1) {
func_0x00400d00(&uStack_a8,0,0x10);
uStack_a8 = 2;
uStack_a4 = func_0x00400d50(&UNK_00401664);
uStack_a6 = func_0x00400cd0(0x6987);
iVar1 = func_0x00400db0(iStack_c,&uStack_a8,0x10);
if (((iVar1 != -1) &&
(iStack_1c = func_0x00400c80(iStack_c,(long)puStack_30 + lStack_18,99 - lStack_18,0),
iStack_1c != -1)) && (iStack_1c != 0)) {
*(undefined *)((long)puStack_30 + lStack_18 + iStack_1c) = 0;
puStack_28 = (undefined *)func_0x00400ce0(puStack_30,0xd);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined *)func_0x00400ce0(puStack_30,10);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_c != -1) {
func_0x00400d10(iStack_c);
}
CWE78_OS_Command_Injection__char_connect_socket_system_63b_badSink(&puStack_30);
return;
}
| ['gcc'] |
12,524 | void CWE78_OS_Command_Injection__char_connect_socket_system_63_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118122/CWE78_OS_Command_Injection__char_connect_socket_system_63a.c | CWE78_OS_Command_Injection__char_connect_socket_system_63_good |
void CWE78_OS_Command_Injection__char_connect_socket_system_63_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,525 | void CWE78_OS_Command_Injection__char_connect_socket_system_63b_badSink(char * * dataPtr)
{
char * data = *dataPtr;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118122/CWE78_OS_Command_Injection__char_connect_socket_system_63b.c | CWE78_OS_Command_Injection__char_connect_socket_system_63b_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_63b_badSink(undefined8 *param_1)
{
int iVar1;
iVar1 = func_0x00400cc0(*param_1);
if (iVar1 < 1) {
printLine(&UNK_00401664);
func_0x00400da0(1);
}
return;
}
| ['gcc'] |
12,526 | void CWE78_OS_Command_Injection__char_connect_socket_system_63b_goodG2BSink(char * * dataPtr)
{
char * data = *dataPtr;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118122/CWE78_OS_Command_Injection__char_connect_socket_system_63b.c | CWE78_OS_Command_Injection__char_connect_socket_system_63b_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_63b_goodG2BSink(undefined8 *param_1)
{
int iVar1;
iVar1 = func_0x00400a40(*param_1);
if (iVar1 < 1) {
printLine(&UNK_00401264);
func_0x00400ad0(1);
}
return;
}
| ['gcc'] |
12,527 | void CWE78_OS_Command_Injection__char_connect_socket_system_64_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(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(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE78_OS_Command_Injection__char_connect_socket_system_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/118123/CWE78_OS_Command_Injection__char_connect_socket_system_64a.c | CWE78_OS_Command_Injection__char_connect_socket_system_64_bad |
void CWE78_OS_Command_Injection__char_connect_socket_system_64_bad(void)
{
int iVar1;
undefined2 uStack_a8;
undefined2 uStack_a6;
undefined4 uStack_a4;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
undefined8 *puStack_30;
undefined *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_c;
uStack_98 = 0x2068732f6e69622f;
uStack_90 = 0x20616c2d20736c;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_30 = &uStack_98;
iStack_c = 0xffffffff;
lStack_18 = func_0x00400cb0(puStack_30);
iStack_c = func_0x00400de0(2,1,6);
if (iStack_c != -1) {
func_0x00400d00(&uStack_a8,0,0x10);
uStack_a8 = 2;
uStack_a4 = func_0x00400d50(&UNK_00401664);
uStack_a6 = func_0x00400cd0(0x6987);
iVar1 = func_0x00400db0(iStack_c,&uStack_a8,0x10);
if (((iVar1 != -1) &&
(iStack_1c = func_0x00400c80(iStack_c,(long)puStack_30 + lStack_18,99 - lStack_18,0),
iStack_1c != -1)) && (iStack_1c != 0)) {
*(undefined *)((long)puStack_30 + lStack_18 + iStack_1c) = 0;
puStack_28 = (undefined *)func_0x00400ce0(puStack_30,0xd);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined *)func_0x00400ce0(puStack_30,10);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_c != -1) {
func_0x00400d10(iStack_c);
}
CWE78_OS_Command_Injection__char_connect_socket_system_64b_badSink(&puStack_30);
return;
}
| ['gcc'] |
12,528 | void CWE78_OS_Command_Injection__char_connect_socket_system_64_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118123/CWE78_OS_Command_Injection__char_connect_socket_system_64a.c | CWE78_OS_Command_Injection__char_connect_socket_system_64_good |
void CWE78_OS_Command_Injection__char_connect_socket_system_64_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,529 | void CWE78_OS_Command_Injection__char_connect_socket_system_64b_badSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
char * * dataPtr = (char * *)dataVoidPtr;
/* dereference dataPtr into data */
char * data = (*dataPtr);
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* 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/118123/CWE78_OS_Command_Injection__char_connect_socket_system_64b.c | CWE78_OS_Command_Injection__char_connect_socket_system_64b_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_64b_badSink(undefined8 *param_1)
{
int iVar1;
iVar1 = func_0x00400cc0(*param_1);
if (iVar1 < 1) {
printLine(&UNK_00401664);
func_0x00400da0(1);
}
return;
}
| ['gcc'] |
12,530 | void CWE78_OS_Command_Injection__char_connect_socket_system_64b_goodG2BSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
char * * dataPtr = (char * *)dataVoidPtr;
/* dereference dataPtr into data */
char * data = (*dataPtr);
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118123/CWE78_OS_Command_Injection__char_connect_socket_system_64b.c | CWE78_OS_Command_Injection__char_connect_socket_system_64b_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_64b_goodG2BSink(undefined8 *param_1)
{
int iVar1;
iVar1 = func_0x00400a40(*param_1);
if (iVar1 < 1) {
printLine(&UNK_00401264);
func_0x00400ad0(1);
}
return;
}
| ['gcc'] |
12,531 | void CWE78_OS_Command_Injection__char_connect_socket_system_65_bad()
{
char * data;
/* define a function pointer */
void (*funcPtr) (char *) = CWE78_OS_Command_Injection__char_connect_socket_system_65b_badSink;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(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(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\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/118124/CWE78_OS_Command_Injection__char_connect_socket_system_65a.c | CWE78_OS_Command_Injection__char_connect_socket_system_65_bad |
void CWE78_OS_Command_Injection__char_connect_socket_system_65_bad(void)
{
int iVar1;
undefined2 uStack_b8;
undefined2 uStack_b6;
undefined4 uStack_b4;
undefined8 uStack_a8;
undefined8 uStack_a0;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined4 uStack_48;
undefined *puStack_38;
int iStack_2c;
long lStack_28;
int iStack_1c;
undefined8 *puStack_18;
code *pcStack_10;
pcStack_10 = CWE78_OS_Command_Injection__char_connect_socket_system_65b_badSink;
uStack_a8 = 0x2068732f6e69622f;
uStack_a0 = 0x20616c2d20736c;
uStack_98 = 0;
uStack_90 = 0;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
puStack_18 = &uStack_a8;
iStack_1c = 0xffffffff;
lStack_28 = func_0x00400cb0(puStack_18);
iStack_1c = func_0x00400de0(2,1,6);
if (iStack_1c != -1) {
func_0x00400d00(&uStack_b8,0,0x10);
uStack_b8 = 2;
uStack_b4 = func_0x00400d50(&UNK_00401664);
uStack_b6 = func_0x00400cd0(0x6987);
iVar1 = func_0x00400db0(iStack_1c,&uStack_b8,0x10);
if (((iVar1 != -1) &&
(iStack_2c = func_0x00400c80(iStack_1c,(long)puStack_18 + lStack_28,99 - lStack_28,0),
iStack_2c != -1)) && (iStack_2c != 0)) {
*(undefined *)((long)puStack_18 + iStack_2c + lStack_28) = 0;
puStack_38 = (undefined *)func_0x00400ce0(puStack_18,0xd);
if (puStack_38 != (undefined *)0x0) {
*puStack_38 = 0;
}
puStack_38 = (undefined *)func_0x00400ce0(puStack_18,10);
if (puStack_38 != (undefined *)0x0) {
*puStack_38 = 0;
}
}
}
if (iStack_1c != -1) {
func_0x00400d10(iStack_1c);
}
(*pcStack_10)(puStack_18);
return;
}
| ['gcc'] |
12,532 | void CWE78_OS_Command_Injection__char_connect_socket_system_65_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118124/CWE78_OS_Command_Injection__char_connect_socket_system_65a.c | CWE78_OS_Command_Injection__char_connect_socket_system_65_good |
void CWE78_OS_Command_Injection__char_connect_socket_system_65_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,533 | void CWE78_OS_Command_Injection__char_connect_socket_system_65b_badSink(char * data)
{
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118124/CWE78_OS_Command_Injection__char_connect_socket_system_65b.c | CWE78_OS_Command_Injection__char_connect_socket_system_65b_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_65b_badSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400cc0(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401664);
func_0x00400da0(1);
}
return;
}
| ['gcc'] |
12,534 | void CWE78_OS_Command_Injection__char_connect_socket_system_65b_goodG2BSink(char * data)
{
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118124/CWE78_OS_Command_Injection__char_connect_socket_system_65b.c | CWE78_OS_Command_Injection__char_connect_socket_system_65b_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_65b_goodG2BSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a40(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401264);
func_0x00400ad0(1);
}
return;
}
| ['gcc'] |
12,535 | void CWE78_OS_Command_Injection__char_connect_socket_system_66_bad()
{
char * data;
char * dataArray[5];
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(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(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\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__char_connect_socket_system_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/118125/CWE78_OS_Command_Injection__char_connect_socket_system_66a.c | CWE78_OS_Command_Injection__char_connect_socket_system_66_bad |
void CWE78_OS_Command_Injection__char_connect_socket_system_66_bad(void)
{
int iVar1;
undefined2 uStack_d8;
undefined2 uStack_d6;
undefined4 uStack_d4;
undefined8 uStack_c8;
undefined8 uStack_c0;
undefined8 uStack_b8;
undefined8 uStack_b0;
undefined8 uStack_a8;
undefined8 uStack_a0;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined4 uStack_68;
undefined auStack_58 [16];
undefined8 *puStack_48;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_c8 = 0x2068732f6e69622f;
uStack_c0 = 0x20616c2d20736c;
uStack_b8 = 0;
uStack_b0 = 0;
uStack_a8 = 0;
uStack_a0 = 0;
uStack_98 = 0;
uStack_90 = 0;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
puStack_10 = &uStack_c8;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400cb0(puStack_10);
iStack_14 = func_0x00400de0(2,1,6);
if (iStack_14 != -1) {
func_0x00400d00(&uStack_d8,0,0x10);
uStack_d8 = 2;
uStack_d4 = func_0x00400d50(&UNK_00401684);
uStack_d6 = func_0x00400cd0(0x6987);
iVar1 = func_0x00400db0(iStack_14,&uStack_d8,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c80(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400ce0(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400ce0(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400d10(iStack_14);
}
puStack_48 = puStack_10;
CWE78_OS_Command_Injection__char_connect_socket_system_66b_badSink(auStack_58);
return;
}
| ['gcc'] |
12,536 | void CWE78_OS_Command_Injection__char_connect_socket_system_66_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118125/CWE78_OS_Command_Injection__char_connect_socket_system_66a.c | CWE78_OS_Command_Injection__char_connect_socket_system_66_good |
void CWE78_OS_Command_Injection__char_connect_socket_system_66_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,537 | void CWE78_OS_Command_Injection__char_connect_socket_system_66b_badSink(char * dataArray[])
{
/* copy data out of dataArray */
char * data = dataArray[2];
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* copy data out of dataArray */', '/* 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/118125/CWE78_OS_Command_Injection__char_connect_socket_system_66b.c | CWE78_OS_Command_Injection__char_connect_socket_system_66b_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_66b_badSink(long param_1)
{
int iVar1;
iVar1 = func_0x00400cc0(*(undefined8 *)(param_1 + 0x10));
if (iVar1 < 1) {
printLine(&UNK_00401684);
func_0x00400da0(1);
}
return;
}
| ['gcc'] |
12,538 | void CWE78_OS_Command_Injection__char_connect_socket_system_66b_goodG2BSink(char * dataArray[])
{
char * data = dataArray[2];
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118125/CWE78_OS_Command_Injection__char_connect_socket_system_66b.c | CWE78_OS_Command_Injection__char_connect_socket_system_66b_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_66b_goodG2BSink(long param_1)
{
int iVar1;
iVar1 = func_0x00400a40(*(undefined8 *)(param_1 + 0x10));
if (iVar1 < 1) {
printLine(&UNK_00401274);
func_0x00400ad0(1);
}
return;
}
| ['gcc'] |
12,539 | void CWE78_OS_Command_Injection__char_connect_socket_system_67_bad()
{
char * data;
CWE78_OS_Command_Injection__char_connect_socket_system_67_structType myStruct;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(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(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
myStruct.structFirst = data;
CWE78_OS_Command_Injection__char_connect_socket_system_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/118126/CWE78_OS_Command_Injection__char_connect_socket_system_67a.c | CWE78_OS_Command_Injection__char_connect_socket_system_67_bad |
void CWE78_OS_Command_Injection__char_connect_socket_system_67_bad(void)
{
int iVar1;
undefined2 uStack_b8;
undefined2 uStack_b6;
undefined4 uStack_b4;
undefined8 uStack_a8;
undefined8 uStack_a0;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined4 uStack_48;
undefined8 *puStack_38;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_a8 = 0x2068732f6e69622f;
uStack_a0 = 0x20616c2d20736c;
uStack_98 = 0;
uStack_90 = 0;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
puStack_10 = &uStack_a8;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400cb0(puStack_10);
iStack_14 = func_0x00400de0(2,1,6);
if (iStack_14 != -1) {
func_0x00400d00(&uStack_b8,0,0x10);
uStack_b8 = 2;
uStack_b4 = func_0x00400d50(&UNK_00401674);
uStack_b6 = func_0x00400cd0(0x6987);
iVar1 = func_0x00400db0(iStack_14,&uStack_b8,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c80(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400ce0(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400ce0(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400d10(iStack_14);
}
puStack_38 = puStack_10;
CWE78_OS_Command_Injection__char_connect_socket_system_67b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,540 | void CWE78_OS_Command_Injection__char_connect_socket_system_67_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118126/CWE78_OS_Command_Injection__char_connect_socket_system_67a.c | CWE78_OS_Command_Injection__char_connect_socket_system_67_good |
void CWE78_OS_Command_Injection__char_connect_socket_system_67_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,541 | void CWE78_OS_Command_Injection__char_connect_socket_system_67b_badSink(CWE78_OS_Command_Injection__char_connect_socket_system_67_structType myStruct)
{
char * data = myStruct.structFirst;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118126/CWE78_OS_Command_Injection__char_connect_socket_system_67b.c | CWE78_OS_Command_Injection__char_connect_socket_system_67b_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_67b_badSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400cc0(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401674);
func_0x00400da0(1);
}
return;
}
| ['gcc'] |
12,542 | void CWE78_OS_Command_Injection__char_connect_socket_system_67b_goodG2BSink(CWE78_OS_Command_Injection__char_connect_socket_system_67_structType myStruct)
{
char * data = myStruct.structFirst;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118126/CWE78_OS_Command_Injection__char_connect_socket_system_67b.c | CWE78_OS_Command_Injection__char_connect_socket_system_67b_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_67b_goodG2BSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a40(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401264);
func_0x00400ad0(1);
}
return;
}
| ['gcc'] |
12,543 | void CWE78_OS_Command_Injection__char_connect_socket_system_68_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(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(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE78_OS_Command_Injection__char_connect_socket_system_68_badData = data;
CWE78_OS_Command_Injection__char_connect_socket_system_68b_badSink();
} | ['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118127/CWE78_OS_Command_Injection__char_connect_socket_system_68a.c | CWE78_OS_Command_Injection__char_connect_socket_system_68_bad |
void CWE78_OS_Command_Injection__char_connect_socket_system_68_bad(void)
{
int iVar1;
undefined2 uStack_a8;
undefined2 uStack_a6;
undefined4 uStack_a4;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_98 = 0x2068732f6e69622f;
uStack_90 = 0x20616c2d20736c;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_10 = &uStack_98;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400cb0(puStack_10);
iStack_14 = func_0x00400de0(2,1,6);
if (iStack_14 != -1) {
func_0x00400d00(&uStack_a8,0,0x10);
uStack_a8 = 2;
uStack_a4 = func_0x00400d50(&UNK_00401664);
uStack_a6 = func_0x00400cd0(0x6987);
iVar1 = func_0x00400db0(iStack_14,&uStack_a8,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c80(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400ce0(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400ce0(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400d10(iStack_14);
}
CWE78_OS_Command_Injection__char_connect_socket_system_68_badData = puStack_10;
CWE78_OS_Command_Injection__char_connect_socket_system_68b_badSink();
return;
}
| ['gcc'] |
12,544 | void CWE78_OS_Command_Injection__char_connect_socket_system_68_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118127/CWE78_OS_Command_Injection__char_connect_socket_system_68a.c | CWE78_OS_Command_Injection__char_connect_socket_system_68_good |
void CWE78_OS_Command_Injection__char_connect_socket_system_68_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,545 | void CWE78_OS_Command_Injection__char_connect_socket_system_68b_badSink()
{
char * data = CWE78_OS_Command_Injection__char_connect_socket_system_68_badData;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118127/CWE78_OS_Command_Injection__char_connect_socket_system_68b.c | CWE78_OS_Command_Injection__char_connect_socket_system_68b_badSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_68b_badSink(void)
{
int iVar1;
iVar1 = func_0x00400cc0(CWE78_OS_Command_Injection__char_connect_socket_system_68_badData);
if (iVar1 < 1) {
printLine(&UNK_00401664);
func_0x00400da0(1);
}
return;
}
| ['gcc'] |
12,546 | void CWE78_OS_Command_Injection__char_connect_socket_system_68b_goodG2BSink()
{
char * data = CWE78_OS_Command_Injection__char_connect_socket_system_68_goodG2BData;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118127/CWE78_OS_Command_Injection__char_connect_socket_system_68b.c | CWE78_OS_Command_Injection__char_connect_socket_system_68b_goodG2BSink |
void CWE78_OS_Command_Injection__char_connect_socket_system_68b_goodG2BSink(void)
{
int iVar1;
iVar1 = func_0x00400a40(CWE78_OS_Command_Injection__char_connect_socket_system_68_goodG2BData);
if (iVar1 < 1) {
printLine(&UNK_00401264);
func_0x00400ad0(1);
}
return;
}
| ['gcc'] |
12,547 | void CWE78_OS_Command_Injection__char_console_execl_01_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118423/CWE78_OS_Command_Injection__char_console_execl_01.c | CWE78_OS_Command_Injection__char_console_execl_01_bad |
void CWE78_OS_Command_Injection__char_console_execl_01_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0);
return;
}
| ['gcc'] |
12,548 | void CWE78_OS_Command_Injection__char_console_execl_01_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118423/CWE78_OS_Command_Injection__char_console_execl_01.c | CWE78_OS_Command_Injection__char_console_execl_01_good |
void CWE78_OS_Command_Injection__char_console_execl_01_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,549 | void CWE78_OS_Command_Injection__char_console_execl_02_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(1)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118424/CWE78_OS_Command_Injection__char_console_execl_02.c | CWE78_OS_Command_Injection__char_console_execl_02_bad |
void CWE78_OS_Command_Injection__char_console_execl_02_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0);
return;
}
| ['gcc'] |
12,550 | void CWE78_OS_Command_Injection__char_console_execl_02_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118424/CWE78_OS_Command_Injection__char_console_execl_02.c | CWE78_OS_Command_Injection__char_console_execl_02_good |
void CWE78_OS_Command_Injection__char_console_execl_02_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,551 | void CWE78_OS_Command_Injection__char_console_execl_03_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(5==5)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118425/CWE78_OS_Command_Injection__char_console_execl_03.c | CWE78_OS_Command_Injection__char_console_execl_03_bad |
void CWE78_OS_Command_Injection__char_console_execl_03_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0);
return;
}
| ['gcc'] |
12,552 | void CWE78_OS_Command_Injection__char_console_execl_03_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118425/CWE78_OS_Command_Injection__char_console_execl_03.c | CWE78_OS_Command_Injection__char_console_execl_03_good |
void CWE78_OS_Command_Injection__char_console_execl_03_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,553 | void CWE78_OS_Command_Injection__char_console_execl_04_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(STATIC_CONST_TRUE)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118426/CWE78_OS_Command_Injection__char_console_execl_04.c | CWE78_OS_Command_Injection__char_console_execl_04_bad |
void CWE78_OS_Command_Injection__char_console_execl_04_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_0040133c);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
func_0x00400b50(&UNK_00401352,&UNK_00401352,&UNK_0040134f,&UNK_0040134b,puStack_10,0);
return;
}
| ['gcc'] |
12,554 | void CWE78_OS_Command_Injection__char_console_execl_04_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118426/CWE78_OS_Command_Injection__char_console_execl_04.c | CWE78_OS_Command_Injection__char_console_execl_04_good |
void CWE78_OS_Command_Injection__char_console_execl_04_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,555 | void CWE78_OS_Command_Injection__char_console_execl_05_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(staticTrue)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118427/CWE78_OS_Command_Injection__char_console_execl_05.c | CWE78_OS_Command_Injection__char_console_execl_05_bad |
void CWE78_OS_Command_Injection__char_console_execl_05_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
if (staticTrue != 0) {
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401334);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0);
return;
}
| ['gcc'] |
12,556 | void CWE78_OS_Command_Injection__char_console_execl_05_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118427/CWE78_OS_Command_Injection__char_console_execl_05.c | CWE78_OS_Command_Injection__char_console_execl_05_good |
void CWE78_OS_Command_Injection__char_console_execl_05_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,557 | void CWE78_OS_Command_Injection__char_console_execl_06_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(STATIC_CONST_FIVE==5)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118428/CWE78_OS_Command_Injection__char_console_execl_06.c | CWE78_OS_Command_Injection__char_console_execl_06_bad |
void CWE78_OS_Command_Injection__char_console_execl_06_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401338);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
func_0x00400b50(&UNK_0040134e,&UNK_0040134e,&UNK_0040134b,&UNK_00401347,puStack_10,0);
return;
}
| ['gcc'] |
12,558 | void CWE78_OS_Command_Injection__char_console_execl_06_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118428/CWE78_OS_Command_Injection__char_console_execl_06.c | CWE78_OS_Command_Injection__char_console_execl_06_good |
void CWE78_OS_Command_Injection__char_console_execl_06_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,559 | void CWE78_OS_Command_Injection__char_console_execl_07_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(staticFive==5)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118429/CWE78_OS_Command_Injection__char_console_execl_07.c | CWE78_OS_Command_Injection__char_console_execl_07_bad |
void CWE78_OS_Command_Injection__char_console_execl_07_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
if (staticFive == 5) {
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401334);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0);
return;
}
| ['gcc'] |
12,560 | void CWE78_OS_Command_Injection__char_console_execl_07_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118429/CWE78_OS_Command_Injection__char_console_execl_07.c | CWE78_OS_Command_Injection__char_console_execl_07_good |
void CWE78_OS_Command_Injection__char_console_execl_07_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,561 | void CWE78_OS_Command_Injection__char_console_execl_08_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(staticReturnsTrue())
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118430/CWE78_OS_Command_Injection__char_console_execl_08.c | CWE78_OS_Command_Injection__char_console_execl_08_bad |
void CWE78_OS_Command_Injection__char_console_execl_08_bad(void)
{
int iVar1;
long lVar2;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401344);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
func_0x00400b50(&UNK_0040135a,&UNK_0040135a,&UNK_00401357,&UNK_00401353,puStack_10,0);
return;
}
| ['gcc'] |
12,562 | void CWE78_OS_Command_Injection__char_console_execl_08_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118430/CWE78_OS_Command_Injection__char_console_execl_08.c | CWE78_OS_Command_Injection__char_console_execl_08_good |
void CWE78_OS_Command_Injection__char_console_execl_08_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,563 | void CWE78_OS_Command_Injection__char_console_execl_09_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(GLOBAL_CONST_TRUE)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118431/CWE78_OS_Command_Injection__char_console_execl_09.c | CWE78_OS_Command_Injection__char_console_execl_09_bad |
void CWE78_OS_Command_Injection__char_console_execl_09_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
if (GLOBAL_CONST_TRUE != 0) {
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401334);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0);
return;
}
| ['gcc'] |
12,564 | void CWE78_OS_Command_Injection__char_console_execl_09_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118431/CWE78_OS_Command_Injection__char_console_execl_09.c | CWE78_OS_Command_Injection__char_console_execl_09_good |
void CWE78_OS_Command_Injection__char_console_execl_09_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,565 | void CWE78_OS_Command_Injection__char_console_execl_10_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalTrue)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118432/CWE78_OS_Command_Injection__char_console_execl_10.c | CWE78_OS_Command_Injection__char_console_execl_10_bad |
void CWE78_OS_Command_Injection__char_console_execl_10_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
if (globalTrue != 0) {
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401334);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0);
return;
}
| ['gcc'] |
12,566 | void CWE78_OS_Command_Injection__char_console_execl_10_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118432/CWE78_OS_Command_Injection__char_console_execl_10.c | CWE78_OS_Command_Injection__char_console_execl_10_good |
void CWE78_OS_Command_Injection__char_console_execl_10_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,567 | void CWE78_OS_Command_Injection__char_console_execl_11_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalReturnsTrue())
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118433/CWE78_OS_Command_Injection__char_console_execl_11.c | CWE78_OS_Command_Injection__char_console_execl_11_bad |
void CWE78_OS_Command_Injection__char_console_execl_11_bad(void)
{
int iVar1;
long lVar2;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401334);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0);
return;
}
| ['gcc'] |
12,568 | void CWE78_OS_Command_Injection__char_console_execl_11_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118433/CWE78_OS_Command_Injection__char_console_execl_11.c | CWE78_OS_Command_Injection__char_console_execl_11_good |
void CWE78_OS_Command_Injection__char_console_execl_11_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,569 | void CWE78_OS_Command_Injection__char_console_execl_12_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalReturnsTrueOrFalse())
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
else
{
/* FIX: Append a fixed string to data (not user / external input) */
strcat(data, "*.*");
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* FIX: Append a fixed string to data (not user / external input) */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118434/CWE78_OS_Command_Injection__char_console_execl_12.c | CWE78_OS_Command_Injection__char_console_execl_12_bad |
void CWE78_OS_Command_Injection__char_console_execl_12_bad(void)
{
char cVar1;
int iVar2;
long lVar3;
ulong uVar4;
undefined8 *puVar5;
byte bVar6;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
bVar6 = 0;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
iVar2 = globalReturnsTrueOrFalse();
if (iVar2 == 0) {
uVar4 = 0xffffffffffffffff;
puVar5 = puStack_10;
do {
if (uVar4 == 0) break;
uVar4 = uVar4 - 1;
cVar1 = *(char *)puVar5;
puVar5 = (undefined8 *)((long)puVar5 + (ulong)bVar6 * -2 + 1);
} while (cVar1 != '\0');
*(undefined4 *)((long)puStack_10 + (~uVar4 - 1)) = 0x2a2e2a;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar3 = func_0x00400af0((char *)((long)puStack_10 + lStack_18),100 - (int)lStack_18,stdin);
if (lVar3 == 0) {
printLine(&UNK_00401364);
*(char *)(lStack_18 + (long)puStack_10) = '\0';
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(char *)((long)puStack_10 + lStack_18 + -1) = '\0';
}
}
}
}
func_0x00400b50(&UNK_0040137a,&UNK_0040137a,&UNK_00401377,&UNK_00401373,puStack_10,0);
return;
}
| ['gcc'] |
12,570 | void CWE78_OS_Command_Injection__char_console_execl_12_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118434/CWE78_OS_Command_Injection__char_console_execl_12.c | CWE78_OS_Command_Injection__char_console_execl_12_good |
void CWE78_OS_Command_Injection__char_console_execl_12_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,571 | void CWE78_OS_Command_Injection__char_console_execl_13_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(GLOBAL_CONST_FIVE==5)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118435/CWE78_OS_Command_Injection__char_console_execl_13.c | CWE78_OS_Command_Injection__char_console_execl_13_bad |
void CWE78_OS_Command_Injection__char_console_execl_13_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
if (GLOBAL_CONST_FIVE == 5) {
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401334);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0);
return;
}
| ['gcc'] |
12,572 | void CWE78_OS_Command_Injection__char_console_execl_13_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118435/CWE78_OS_Command_Injection__char_console_execl_13.c | CWE78_OS_Command_Injection__char_console_execl_13_good |
void CWE78_OS_Command_Injection__char_console_execl_13_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,573 | void CWE78_OS_Command_Injection__char_console_execl_14_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalFive==5)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118436/CWE78_OS_Command_Injection__char_console_execl_14.c | CWE78_OS_Command_Injection__char_console_execl_14_bad |
void CWE78_OS_Command_Injection__char_console_execl_14_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
if (globalFive == 5) {
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401334);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0);
return;
}
| ['gcc'] |
12,574 | void CWE78_OS_Command_Injection__char_console_execl_14_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118436/CWE78_OS_Command_Injection__char_console_execl_14.c | CWE78_OS_Command_Injection__char_console_execl_14_good |
void CWE78_OS_Command_Injection__char_console_execl_14_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,575 | void CWE78_OS_Command_Injection__char_console_execl_15_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
switch(6)
{
case 6:
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118437/CWE78_OS_Command_Injection__char_console_execl_15.c | CWE78_OS_Command_Injection__char_console_execl_15_bad |
void CWE78_OS_Command_Injection__char_console_execl_15_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0);
return;
}
| ['gcc'] |
12,576 | void CWE78_OS_Command_Injection__char_console_execl_15_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118437/CWE78_OS_Command_Injection__char_console_execl_15.c | CWE78_OS_Command_Injection__char_console_execl_15_good |
void CWE78_OS_Command_Injection__char_console_execl_15_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,577 | void CWE78_OS_Command_Injection__char_console_execl_16_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
while(1)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
break;
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118438/CWE78_OS_Command_Injection__char_console_execl_16.c | CWE78_OS_Command_Injection__char_console_execl_16_bad |
void CWE78_OS_Command_Injection__char_console_execl_16_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0);
return;
}
| ['gcc'] |
12,578 | void CWE78_OS_Command_Injection__char_console_execl_16_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118438/CWE78_OS_Command_Injection__char_console_execl_16.c | CWE78_OS_Command_Injection__char_console_execl_16_good |
void CWE78_OS_Command_Injection__char_console_execl_16_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,579 | void CWE78_OS_Command_Injection__char_console_execl_17_bad()
{
int i;
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
for(i = 0; i < 1; i++)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118439/CWE78_OS_Command_Injection__char_console_execl_17.c | CWE78_OS_Command_Injection__char_console_execl_17_bad |
void CWE78_OS_Command_Injection__char_console_execl_17_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_18 = &uStack_88;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
lStack_20 = func_0x00400ab0(puStack_18);
if (1 < 100U - lStack_20) {
lVar1 = func_0x00400af0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401344);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400ab0(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
}
func_0x00400b50(&UNK_0040135a,&UNK_0040135a,&UNK_00401357,&UNK_00401353,puStack_18,0);
return;
}
| ['gcc'] |
12,580 | void CWE78_OS_Command_Injection__char_console_execl_17_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118439/CWE78_OS_Command_Injection__char_console_execl_17.c | CWE78_OS_Command_Injection__char_console_execl_17_good |
void CWE78_OS_Command_Injection__char_console_execl_17_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,581 | void CWE78_OS_Command_Injection__char_console_execl_44_bad()
{
char * data;
/* define a function pointer */
void (*funcPtr) (char *) = badSink;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* use the function pointer */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118450/CWE78_OS_Command_Injection__char_console_execl_44.c | CWE78_OS_Command_Injection__char_console_execl_44_bad |
void CWE78_OS_Command_Injection__char_console_execl_44_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
code *pcStack_10;
pcStack_10 = badSink;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_18 = &uStack_88;
lStack_20 = func_0x00400ab0(puStack_18);
if (1 < 100U - lStack_20) {
lVar1 = func_0x00400af0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401353);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400ab0(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
(*pcStack_10)(puStack_18);
return;
}
| ['gcc'] |
12,582 | void CWE78_OS_Command_Injection__char_console_execl_44_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118450/CWE78_OS_Command_Injection__char_console_execl_44.c | CWE78_OS_Command_Injection__char_console_execl_44_good |
void CWE78_OS_Command_Injection__char_console_execl_44_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,583 | void CWE78_OS_Command_Injection__char_console_execl_45_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
CWE78_OS_Command_Injection__char_console_execl_45_badData = data;
badSink();
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118451/CWE78_OS_Command_Injection__char_console_execl_45.c | CWE78_OS_Command_Injection__char_console_execl_45_bad |
void CWE78_OS_Command_Injection__char_console_execl_45_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401363);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
CWE78_OS_Command_Injection__char_console_execl_45_badData = puStack_10;
badSink();
return;
}
| ['gcc'] |
12,584 | void CWE78_OS_Command_Injection__char_console_execl_45_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118451/CWE78_OS_Command_Injection__char_console_execl_45.c | CWE78_OS_Command_Injection__char_console_execl_45_good |
void CWE78_OS_Command_Injection__char_console_execl_45_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,585 | void CWE78_OS_Command_Injection__char_console_execl_51_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
CWE78_OS_Command_Injection__char_console_execl_51b_badSink(data);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118452/CWE78_OS_Command_Injection__char_console_execl_51a.c | CWE78_OS_Command_Injection__char_console_execl_51_bad |
void CWE78_OS_Command_Injection__char_console_execl_51_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401344);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
CWE78_OS_Command_Injection__char_console_execl_51b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,586 | void CWE78_OS_Command_Injection__char_console_execl_51_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118452/CWE78_OS_Command_Injection__char_console_execl_51a.c | CWE78_OS_Command_Injection__char_console_execl_51_good |
void CWE78_OS_Command_Injection__char_console_execl_51_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,587 | void CWE78_OS_Command_Injection__char_console_execl_51b_badSink(char * data)
{
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118452/CWE78_OS_Command_Injection__char_console_execl_51b.c | CWE78_OS_Command_Injection__char_console_execl_51b_badSink |
void CWE78_OS_Command_Injection__char_console_execl_51b_badSink(undefined8 param_1)
{
func_0x00400b50(&UNK_0040134b,&UNK_0040134b,&UNK_00401348,&UNK_00401344,param_1,0);
return;
}
| ['gcc'] |
12,588 | void CWE78_OS_Command_Injection__char_console_execl_51b_goodG2BSink(char * data)
{
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* execl - specify the path where the command is located */', '/* 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/118452/CWE78_OS_Command_Injection__char_console_execl_51b.c | CWE78_OS_Command_Injection__char_console_execl_51b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_execl_51b_goodG2BSink(undefined8 param_1)
{
func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,param_1,0);
return;
}
| ['gcc'] |
12,589 | void CWE78_OS_Command_Injection__char_console_execl_52_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
CWE78_OS_Command_Injection__char_console_execl_52b_badSink(data);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118453/CWE78_OS_Command_Injection__char_console_execl_52a.c | CWE78_OS_Command_Injection__char_console_execl_52_bad |
void CWE78_OS_Command_Injection__char_console_execl_52_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401354);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
CWE78_OS_Command_Injection__char_console_execl_52b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,590 | void CWE78_OS_Command_Injection__char_console_execl_52_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118453/CWE78_OS_Command_Injection__char_console_execl_52a.c | CWE78_OS_Command_Injection__char_console_execl_52_good |
void CWE78_OS_Command_Injection__char_console_execl_52_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,591 | void CWE78_OS_Command_Injection__char_console_execl_52b_badSink(char * data)
{
CWE78_OS_Command_Injection__char_console_execl_52c_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118453/CWE78_OS_Command_Injection__char_console_execl_52b.c | CWE78_OS_Command_Injection__char_console_execl_52b_badSink |
void CWE78_OS_Command_Injection__char_console_execl_52b_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_execl_52c_badSink(param_1);
return;
}
| ['gcc'] |
12,592 | void CWE78_OS_Command_Injection__char_console_execl_52b_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_console_execl_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118453/CWE78_OS_Command_Injection__char_console_execl_52b.c | CWE78_OS_Command_Injection__char_console_execl_52b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_execl_52b_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_execl_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,593 | void CWE78_OS_Command_Injection__char_console_execl_52c_badSink(char * data)
{
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118453/CWE78_OS_Command_Injection__char_console_execl_52c.c | CWE78_OS_Command_Injection__char_console_execl_52c_badSink |
void CWE78_OS_Command_Injection__char_console_execl_52c_badSink(undefined8 param_1)
{
func_0x00400b50(&UNK_0040135b,&UNK_0040135b,&UNK_00401358,&UNK_00401354,param_1,0);
return;
}
| ['gcc'] |
12,594 | void CWE78_OS_Command_Injection__char_console_execl_52c_goodG2BSink(char * data)
{
/* execl - specify the path where the command is located */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);
} | ['/* execl - specify the path where the command is located */', '/* 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/118453/CWE78_OS_Command_Injection__char_console_execl_52c.c | CWE78_OS_Command_Injection__char_console_execl_52c_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_execl_52c_goodG2BSink(undefined8 param_1)
{
func_0x00400a80(&UNK_0040121b,&UNK_0040121b,&UNK_00401218,&UNK_00401214,param_1,0);
return;
}
| ['gcc'] |
12,595 | void CWE78_OS_Command_Injection__char_console_execl_53_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
CWE78_OS_Command_Injection__char_console_execl_53b_badSink(data);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118454/CWE78_OS_Command_Injection__char_console_execl_53a.c | CWE78_OS_Command_Injection__char_console_execl_53_bad |
void CWE78_OS_Command_Injection__char_console_execl_53_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400ab0(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401374);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400ab0(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
CWE78_OS_Command_Injection__char_console_execl_53b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,596 | void CWE78_OS_Command_Injection__char_console_execl_53_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118454/CWE78_OS_Command_Injection__char_console_execl_53a.c | CWE78_OS_Command_Injection__char_console_execl_53_good |
void CWE78_OS_Command_Injection__char_console_execl_53_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,597 | void CWE78_OS_Command_Injection__char_console_execl_53b_badSink(char * data)
{
CWE78_OS_Command_Injection__char_console_execl_53c_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118454/CWE78_OS_Command_Injection__char_console_execl_53b.c | CWE78_OS_Command_Injection__char_console_execl_53b_badSink |
void CWE78_OS_Command_Injection__char_console_execl_53b_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_execl_53c_badSink(param_1);
return;
}
| ['gcc'] |
12,598 | void CWE78_OS_Command_Injection__char_console_execl_53b_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_console_execl_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118454/CWE78_OS_Command_Injection__char_console_execl_53b.c | CWE78_OS_Command_Injection__char_console_execl_53b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_execl_53b_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_execl_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,599 | void CWE78_OS_Command_Injection__char_console_execl_53c_badSink(char * data)
{
CWE78_OS_Command_Injection__char_console_execl_53d_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118454/CWE78_OS_Command_Injection__char_console_execl_53c.c | CWE78_OS_Command_Injection__char_console_execl_53c_badSink |
void CWE78_OS_Command_Injection__char_console_execl_53c_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_execl_53d_badSink(param_1);
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.