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,800 | void CWE78_OS_Command_Injection__char_console_popen_32_bad()
{
char * data;
char * *dataPtr1 = &data;
char * *dataPtr2 = &data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
char * data = *dataPtr1;
{
/* 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';
}
}
}
*dataPtr1 = data;
}
{
char * data = *dataPtr2;
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118540/CWE78_OS_Command_Injection__char_console_popen_32.c | CWE78_OS_Command_Injection__char_console_popen_32_bad |
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void CWE78_OS_Command_Injection__char_console_popen_32_bad(void)
{
long lVar1;
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_40;
long lStack_38;
undefined8 *puStack_30;
long lStack_28;
undefined8 *puStack_20;
undefined8 **ppuStack_18;
undefined8 **ppuStack_10;
ppuStack_10 = &puStack_40;
ppuStack_18 = &puStack_40;
uStack_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_40 = &uStack_a8;
puStack_20 = puStack_40;
lStack_28 = func_0x00400b30(puStack_40);
if (1 < 100U - lStack_28) {
lVar1 = func_0x00400b80((long)puStack_20 + lStack_28,100 - (int)lStack_28,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401404);
*(undefined *)(lStack_28 + (long)puStack_20) = 0;
}
else {
lStack_28 = func_0x00400b30(puStack_20);
if ((lStack_28 != 0) && (*(char *)((long)puStack_20 + lStack_28 + -1) == '\n')) {
*(undefined *)((long)puStack_20 + lStack_28 + -1) = 0;
}
}
}
*ppuStack_10 = puStack_20;
puStack_30 = *ppuStack_18;
lStack_38 = func_0x00400be0(puStack_30,&UNK_00401413);
if (lStack_38 != 0) {
func_0x00400b50(lStack_38);
}
return;
}
| ['gcc'] |
12,801 | void CWE78_OS_Command_Injection__char_console_popen_32_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118540/CWE78_OS_Command_Injection__char_console_popen_32.c | CWE78_OS_Command_Injection__char_console_popen_32_good |
void CWE78_OS_Command_Injection__char_console_popen_32_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,802 | void CWE78_OS_Command_Injection__char_console_popen_34_bad()
{
char * data;
CWE78_OS_Command_Injection__char_console_popen_34_unionType myUnion;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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';
}
}
}
myUnion.unionFirst = data;
{
char * data = myUnion.unionSecond;
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118542/CWE78_OS_Command_Injection__char_console_popen_34.c | CWE78_OS_Command_Injection__char_console_popen_34_bad |
void CWE78_OS_Command_Injection__char_console_popen_34_bad(void)
{
long lVar1;
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;
long lStack_28;
undefined8 *puStack_20;
long lStack_18;
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;
lStack_18 = func_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013d4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
puStack_30 = puStack_10;
puStack_20 = puStack_10;
lStack_28 = func_0x00400be0(puStack_10,&UNK_004013e3);
if (lStack_28 != 0) {
func_0x00400b50(lStack_28);
}
return;
}
| ['gcc'] |
12,803 | void CWE78_OS_Command_Injection__char_console_popen_34_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118542/CWE78_OS_Command_Injection__char_console_popen_34.c | CWE78_OS_Command_Injection__char_console_popen_34_good |
void CWE78_OS_Command_Injection__char_console_popen_34_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,804 | void CWE78_OS_Command_Injection__char_console_popen_41_badSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118543/CWE78_OS_Command_Injection__char_console_popen_41.c | CWE78_OS_Command_Injection__char_console_popen_41_badSink |
void CWE78_OS_Command_Injection__char_console_popen_41_badSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400be0(param_1,&UNK_004013d4);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,805 | void CWE78_OS_Command_Injection__char_console_popen_41_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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_popen_41_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/118543/CWE78_OS_Command_Injection__char_console_popen_41.c | CWE78_OS_Command_Injection__char_console_popen_41_bad |
void CWE78_OS_Command_Injection__char_console_popen_41_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013d7);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(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_popen_41_badSink(puStack_10);
return;
}
| ['gcc'] |
12,806 | void CWE78_OS_Command_Injection__char_console_popen_41_goodG2BSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118543/CWE78_OS_Command_Injection__char_console_popen_41.c | CWE78_OS_Command_Injection__char_console_popen_41_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_41_goodG2BSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400ad0(param_1,&UNK_00401254);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,807 | void CWE78_OS_Command_Injection__char_console_popen_41_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118543/CWE78_OS_Command_Injection__char_console_popen_41.c | CWE78_OS_Command_Injection__char_console_popen_41_good |
void CWE78_OS_Command_Injection__char_console_popen_41_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,808 | void CWE78_OS_Command_Injection__char_console_popen_42_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
data = badSource(data);
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118544/CWE78_OS_Command_Injection__char_console_popen_42.c | CWE78_OS_Command_Injection__char_console_popen_42_bad |
void CWE78_OS_Command_Injection__char_console_popen_42_bad(void)
{
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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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;
puStack_10 = (undefined8 *)badSource(puStack_10);
lStack_18 = func_0x00400be0(puStack_10,&UNK_004013f3);
if (lStack_18 != 0) {
func_0x00400b50(lStack_18);
}
return;
}
| ['gcc'] |
12,809 | void CWE78_OS_Command_Injection__char_console_popen_42_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118544/CWE78_OS_Command_Injection__char_console_popen_42.c | CWE78_OS_Command_Injection__char_console_popen_42_good |
void CWE78_OS_Command_Injection__char_console_popen_42_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,810 | void CWE78_OS_Command_Injection__char_console_popen_44_bad()
{
char * data;
/* define a function pointer */
void (*funcPtr) (char *) = badSink;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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/118546/CWE78_OS_Command_Injection__char_console_popen_44.c | CWE78_OS_Command_Injection__char_console_popen_44_bad |
void CWE78_OS_Command_Injection__char_console_popen_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_18);
if (1 < 100U - lStack_20) {
lVar1 = func_0x00400b80((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e7);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400b30(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,811 | void CWE78_OS_Command_Injection__char_console_popen_44_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118546/CWE78_OS_Command_Injection__char_console_popen_44.c | CWE78_OS_Command_Injection__char_console_popen_44_good |
void CWE78_OS_Command_Injection__char_console_popen_44_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,812 | void CWE78_OS_Command_Injection__char_console_popen_45_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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_popen_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/118547/CWE78_OS_Command_Injection__char_console_popen_45.c | CWE78_OS_Command_Injection__char_console_popen_45_bad |
void CWE78_OS_Command_Injection__char_console_popen_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e7);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(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_popen_45_badData = puStack_10;
badSink();
return;
}
| ['gcc'] |
12,813 | void CWE78_OS_Command_Injection__char_console_popen_45_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118547/CWE78_OS_Command_Injection__char_console_popen_45.c | CWE78_OS_Command_Injection__char_console_popen_45_good |
void CWE78_OS_Command_Injection__char_console_popen_45_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,814 | void CWE78_OS_Command_Injection__char_console_popen_51_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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_popen_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/118548/CWE78_OS_Command_Injection__char_console_popen_51a.c | CWE78_OS_Command_Injection__char_console_popen_51_bad |
void CWE78_OS_Command_Injection__char_console_popen_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013d4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(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_popen_51b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,815 | void CWE78_OS_Command_Injection__char_console_popen_51_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118548/CWE78_OS_Command_Injection__char_console_popen_51a.c | CWE78_OS_Command_Injection__char_console_popen_51_good |
void CWE78_OS_Command_Injection__char_console_popen_51_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,816 | void CWE78_OS_Command_Injection__char_console_popen_51b_badSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118548/CWE78_OS_Command_Injection__char_console_popen_51b.c | CWE78_OS_Command_Injection__char_console_popen_51b_badSink |
void CWE78_OS_Command_Injection__char_console_popen_51b_badSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400be0(param_1,&UNK_004013d4);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,817 | void CWE78_OS_Command_Injection__char_console_popen_51b_goodG2BSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118548/CWE78_OS_Command_Injection__char_console_popen_51b.c | CWE78_OS_Command_Injection__char_console_popen_51b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_51b_goodG2BSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400ad0(param_1,&UNK_00401254);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,818 | void CWE78_OS_Command_Injection__char_console_popen_52_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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_popen_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/118549/CWE78_OS_Command_Injection__char_console_popen_52a.c | CWE78_OS_Command_Injection__char_console_popen_52_bad |
void CWE78_OS_Command_Injection__char_console_popen_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013f4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(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_popen_52b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,819 | void CWE78_OS_Command_Injection__char_console_popen_52_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118549/CWE78_OS_Command_Injection__char_console_popen_52a.c | CWE78_OS_Command_Injection__char_console_popen_52_good |
void CWE78_OS_Command_Injection__char_console_popen_52_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,820 | void CWE78_OS_Command_Injection__char_console_popen_52b_badSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_52c_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118549/CWE78_OS_Command_Injection__char_console_popen_52b.c | CWE78_OS_Command_Injection__char_console_popen_52b_badSink |
void CWE78_OS_Command_Injection__char_console_popen_52b_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_52c_badSink(param_1);
return;
}
| ['gcc'] |
12,821 | void CWE78_OS_Command_Injection__char_console_popen_52b_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118549/CWE78_OS_Command_Injection__char_console_popen_52b.c | CWE78_OS_Command_Injection__char_console_popen_52b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_52b_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,822 | void CWE78_OS_Command_Injection__char_console_popen_52c_badSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118549/CWE78_OS_Command_Injection__char_console_popen_52c.c | CWE78_OS_Command_Injection__char_console_popen_52c_badSink |
void CWE78_OS_Command_Injection__char_console_popen_52c_badSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400be0(param_1,&UNK_004013f4);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,823 | void CWE78_OS_Command_Injection__char_console_popen_52c_goodG2BSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118549/CWE78_OS_Command_Injection__char_console_popen_52c.c | CWE78_OS_Command_Injection__char_console_popen_52c_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_52c_goodG2BSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400ad0(param_1,&UNK_00401274);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,824 | void CWE78_OS_Command_Injection__char_console_popen_53_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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_popen_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/118550/CWE78_OS_Command_Injection__char_console_popen_53a.c | CWE78_OS_Command_Injection__char_console_popen_53_bad |
void CWE78_OS_Command_Injection__char_console_popen_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401414);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(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_popen_53b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,825 | void CWE78_OS_Command_Injection__char_console_popen_53_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118550/CWE78_OS_Command_Injection__char_console_popen_53a.c | CWE78_OS_Command_Injection__char_console_popen_53_good |
void CWE78_OS_Command_Injection__char_console_popen_53_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,826 | void CWE78_OS_Command_Injection__char_console_popen_53b_badSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_53c_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118550/CWE78_OS_Command_Injection__char_console_popen_53b.c | CWE78_OS_Command_Injection__char_console_popen_53b_badSink |
void CWE78_OS_Command_Injection__char_console_popen_53b_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_53c_badSink(param_1);
return;
}
| ['gcc'] |
12,827 | void CWE78_OS_Command_Injection__char_console_popen_53b_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118550/CWE78_OS_Command_Injection__char_console_popen_53b.c | CWE78_OS_Command_Injection__char_console_popen_53b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_53b_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,828 | void CWE78_OS_Command_Injection__char_console_popen_53c_badSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_53d_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118550/CWE78_OS_Command_Injection__char_console_popen_53c.c | CWE78_OS_Command_Injection__char_console_popen_53c_badSink |
void CWE78_OS_Command_Injection__char_console_popen_53c_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_53d_badSink(param_1);
return;
}
| ['gcc'] |
12,829 | void CWE78_OS_Command_Injection__char_console_popen_53c_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118550/CWE78_OS_Command_Injection__char_console_popen_53c.c | CWE78_OS_Command_Injection__char_console_popen_53c_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_53c_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,830 | void CWE78_OS_Command_Injection__char_console_popen_53d_badSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118550/CWE78_OS_Command_Injection__char_console_popen_53d.c | CWE78_OS_Command_Injection__char_console_popen_53d_badSink |
void CWE78_OS_Command_Injection__char_console_popen_53d_badSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400be0(param_1,&UNK_00401414);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,831 | void CWE78_OS_Command_Injection__char_console_popen_53d_goodG2BSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118550/CWE78_OS_Command_Injection__char_console_popen_53d.c | CWE78_OS_Command_Injection__char_console_popen_53d_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_53d_goodG2BSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400ad0(param_1,&UNK_00401294);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,832 | void CWE78_OS_Command_Injection__char_console_popen_54_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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_popen_54b_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/118551/CWE78_OS_Command_Injection__char_console_popen_54a.c | CWE78_OS_Command_Injection__char_console_popen_54_bad |
void CWE78_OS_Command_Injection__char_console_popen_54_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401424);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(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_popen_54b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,833 | void CWE78_OS_Command_Injection__char_console_popen_54_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118551/CWE78_OS_Command_Injection__char_console_popen_54a.c | CWE78_OS_Command_Injection__char_console_popen_54_good |
void CWE78_OS_Command_Injection__char_console_popen_54_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,834 | void CWE78_OS_Command_Injection__char_console_popen_54b_badSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_54c_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118551/CWE78_OS_Command_Injection__char_console_popen_54b.c | CWE78_OS_Command_Injection__char_console_popen_54b_badSink |
void CWE78_OS_Command_Injection__char_console_popen_54b_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_54c_badSink(param_1);
return;
}
| ['gcc'] |
12,835 | void CWE78_OS_Command_Injection__char_console_popen_54b_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118551/CWE78_OS_Command_Injection__char_console_popen_54b.c | CWE78_OS_Command_Injection__char_console_popen_54b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_54b_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,836 | void CWE78_OS_Command_Injection__char_console_popen_54c_badSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_54d_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118551/CWE78_OS_Command_Injection__char_console_popen_54c.c | CWE78_OS_Command_Injection__char_console_popen_54c_badSink |
void CWE78_OS_Command_Injection__char_console_popen_54c_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_54d_badSink(param_1);
return;
}
| ['gcc'] |
12,837 | void CWE78_OS_Command_Injection__char_console_popen_54c_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118551/CWE78_OS_Command_Injection__char_console_popen_54c.c | CWE78_OS_Command_Injection__char_console_popen_54c_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_54c_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,838 | void CWE78_OS_Command_Injection__char_console_popen_54d_badSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_54e_badSink(data);
} | [] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118551/CWE78_OS_Command_Injection__char_console_popen_54d.c | CWE78_OS_Command_Injection__char_console_popen_54d_badSink |
void CWE78_OS_Command_Injection__char_console_popen_54d_badSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_54e_badSink(param_1);
return;
}
| ['gcc'] |
12,839 | void CWE78_OS_Command_Injection__char_console_popen_54d_goodG2BSink(char * data)
{
CWE78_OS_Command_Injection__char_console_popen_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118551/CWE78_OS_Command_Injection__char_console_popen_54d.c | CWE78_OS_Command_Injection__char_console_popen_54d_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_54d_goodG2BSink(undefined8 param_1)
{
CWE78_OS_Command_Injection__char_console_popen_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
12,840 | void CWE78_OS_Command_Injection__char_console_popen_54e_badSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118551/CWE78_OS_Command_Injection__char_console_popen_54e.c | CWE78_OS_Command_Injection__char_console_popen_54e_badSink |
void CWE78_OS_Command_Injection__char_console_popen_54e_badSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400be0(param_1,&UNK_00401424);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,841 | void CWE78_OS_Command_Injection__char_console_popen_54e_goodG2BSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118551/CWE78_OS_Command_Injection__char_console_popen_54e.c | CWE78_OS_Command_Injection__char_console_popen_54e_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_54e_goodG2BSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400ad0(param_1,&UNK_004012a4);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,842 | void CWE78_OS_Command_Injection__char_console_popen_61_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
data = CWE78_OS_Command_Injection__char_console_popen_61b_badSource(data);
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118552/CWE78_OS_Command_Injection__char_console_popen_61a.c | CWE78_OS_Command_Injection__char_console_popen_61_bad |
void CWE78_OS_Command_Injection__char_console_popen_61_bad(void)
{
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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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;
puStack_10 = (undefined8 *)
CWE78_OS_Command_Injection__char_console_popen_61b_badSource(puStack_10);
lStack_18 = func_0x00400be0(puStack_10,&UNK_004013e4);
if (lStack_18 != 0) {
func_0x00400b50(lStack_18);
}
return;
}
| ['gcc'] |
12,843 | void CWE78_OS_Command_Injection__char_console_popen_61_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118552/CWE78_OS_Command_Injection__char_console_popen_61a.c | CWE78_OS_Command_Injection__char_console_popen_61_good |
void CWE78_OS_Command_Injection__char_console_popen_61_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,844 | char * CWE78_OS_Command_Injection__char_console_popen_61b_badSource(char * data)
{
{
/* 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';
}
}
}
return data;
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118552/CWE78_OS_Command_Injection__char_console_popen_61b.c | CWE78_OS_Command_Injection__char_console_popen_61b_badSource |
long CWE78_OS_Command_Injection__char_console_popen_61b_badSource(long param_1)
{
long lVar1;
long lVar2;
lVar1 = func_0x00400b30(param_1);
if (1 < 100U - lVar1) {
lVar2 = func_0x00400b80(param_1 + lVar1,100 - (int)lVar1,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013e4);
*(undefined *)(lVar1 + param_1) = 0;
}
else {
lVar1 = func_0x00400b30(param_1);
if ((lVar1 != 0) && (*(char *)(param_1 + lVar1 + -1) == '\n')) {
*(undefined *)(param_1 + lVar1 + -1) = 0;
}
}
}
return param_1;
}
| ['gcc'] |
12,845 | char * CWE78_OS_Command_Injection__char_console_popen_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/118552/CWE78_OS_Command_Injection__char_console_popen_61b.c | CWE78_OS_Command_Injection__char_console_popen_61b_goodG2BSource |
char * CWE78_OS_Command_Injection__char_console_popen_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,846 | void CWE78_OS_Command_Injection__char_console_popen_63_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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_popen_63b_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/118554/CWE78_OS_Command_Injection__char_console_popen_63a.c | CWE78_OS_Command_Injection__char_console_popen_63_bad |
void CWE78_OS_Command_Injection__char_console_popen_63_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;
undefined8 *puStack_18;
long lStack_10;
uStack_88 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_10 = func_0x00400b30(puStack_18);
if (1 < 100U - lStack_10) {
lVar1 = func_0x00400b80((long)puStack_18 + lStack_10,100 - (int)lStack_10,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
*(undefined *)(lStack_10 + (long)puStack_18) = 0;
}
else {
lStack_10 = func_0x00400b30(puStack_18);
if ((lStack_10 != 0) && (*(char *)((long)puStack_18 + lStack_10 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_10 + -1) = 0;
}
}
}
CWE78_OS_Command_Injection__char_console_popen_63b_badSink(&puStack_18);
return;
}
| ['gcc'] |
12,847 | void CWE78_OS_Command_Injection__char_console_popen_63_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118554/CWE78_OS_Command_Injection__char_console_popen_63a.c | CWE78_OS_Command_Injection__char_console_popen_63_good |
void CWE78_OS_Command_Injection__char_console_popen_63_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,848 | void CWE78_OS_Command_Injection__char_console_popen_63b_badSink(char * * dataPtr)
{
char * data = *dataPtr;
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118554/CWE78_OS_Command_Injection__char_console_popen_63b.c | CWE78_OS_Command_Injection__char_console_popen_63b_badSink |
void CWE78_OS_Command_Injection__char_console_popen_63b_badSink(undefined8 *param_1)
{
long lVar1;
lVar1 = func_0x00400be0(*param_1,&UNK_004013e4);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,849 | void CWE78_OS_Command_Injection__char_console_popen_63b_goodG2BSink(char * * dataPtr)
{
char * data = *dataPtr;
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118554/CWE78_OS_Command_Injection__char_console_popen_63b.c | CWE78_OS_Command_Injection__char_console_popen_63b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_63b_goodG2BSink(undefined8 *param_1)
{
long lVar1;
lVar1 = func_0x00400ad0(*param_1,&UNK_00401264);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,850 | void CWE78_OS_Command_Injection__char_console_popen_64_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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_popen_64b_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/118555/CWE78_OS_Command_Injection__char_console_popen_64a.c | CWE78_OS_Command_Injection__char_console_popen_64_bad |
void CWE78_OS_Command_Injection__char_console_popen_64_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;
undefined8 *puStack_18;
long lStack_10;
uStack_88 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_10 = func_0x00400b30(puStack_18);
if (1 < 100U - lStack_10) {
lVar1 = func_0x00400b80((long)puStack_18 + lStack_10,100 - (int)lStack_10,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
*(undefined *)(lStack_10 + (long)puStack_18) = 0;
}
else {
lStack_10 = func_0x00400b30(puStack_18);
if ((lStack_10 != 0) && (*(char *)((long)puStack_18 + lStack_10 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_10 + -1) = 0;
}
}
}
CWE78_OS_Command_Injection__char_console_popen_64b_badSink(&puStack_18);
return;
}
| ['gcc'] |
12,851 | void CWE78_OS_Command_Injection__char_console_popen_64_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118555/CWE78_OS_Command_Injection__char_console_popen_64a.c | CWE78_OS_Command_Injection__char_console_popen_64_good |
void CWE78_OS_Command_Injection__char_console_popen_64_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,852 | void CWE78_OS_Command_Injection__char_console_popen_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);
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118555/CWE78_OS_Command_Injection__char_console_popen_64b.c | CWE78_OS_Command_Injection__char_console_popen_64b_badSink |
void CWE78_OS_Command_Injection__char_console_popen_64b_badSink(undefined8 *param_1)
{
long lVar1;
lVar1 = func_0x00400be0(*param_1,&UNK_004013e4);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,853 | void CWE78_OS_Command_Injection__char_console_popen_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);
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118555/CWE78_OS_Command_Injection__char_console_popen_64b.c | CWE78_OS_Command_Injection__char_console_popen_64b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_64b_goodG2BSink(undefined8 *param_1)
{
long lVar1;
lVar1 = func_0x00400ad0(*param_1,&UNK_00401264);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,854 | void CWE78_OS_Command_Injection__char_console_popen_65_bad()
{
char * data;
/* define a function pointer */
void (*funcPtr) (char *) = CWE78_OS_Command_Injection__char_console_popen_65b_badSink;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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/118556/CWE78_OS_Command_Injection__char_console_popen_65a.c | CWE78_OS_Command_Injection__char_console_popen_65_bad |
void CWE78_OS_Command_Injection__char_console_popen_65_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 = CWE78_OS_Command_Injection__char_console_popen_65b_badSink;
uStack_88 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_18);
if (1 < 100U - lStack_20) {
lVar1 = func_0x00400b80((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400b30(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,855 | void CWE78_OS_Command_Injection__char_console_popen_65_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118556/CWE78_OS_Command_Injection__char_console_popen_65a.c | CWE78_OS_Command_Injection__char_console_popen_65_good |
void CWE78_OS_Command_Injection__char_console_popen_65_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,856 | void CWE78_OS_Command_Injection__char_console_popen_65b_badSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118556/CWE78_OS_Command_Injection__char_console_popen_65b.c | CWE78_OS_Command_Injection__char_console_popen_65b_badSink |
void CWE78_OS_Command_Injection__char_console_popen_65b_badSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400be0(param_1,&UNK_004013e4);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,857 | void CWE78_OS_Command_Injection__char_console_popen_65b_goodG2BSink(char * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118556/CWE78_OS_Command_Injection__char_console_popen_65b.c | CWE78_OS_Command_Injection__char_console_popen_65b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_65b_goodG2BSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400ad0(param_1,&UNK_00401264);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,858 | void CWE78_OS_Command_Injection__char_console_popen_66_bad()
{
char * data;
char * dataArray[5];
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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';
}
}
}
/* put data in array */
dataArray[2] = data;
CWE78_OS_Command_Injection__char_console_popen_66b_badSink(dataArray);
} | ['/* 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 */', '/* put data in array */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118557/CWE78_OS_Command_Injection__char_console_popen_66a.c | CWE78_OS_Command_Injection__char_console_popen_66_bad |
void CWE78_OS_Command_Injection__char_console_popen_66_bad(void)
{
long lVar1;
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;
undefined8 uStack_68;
undefined8 uStack_60;
undefined4 uStack_58;
undefined auStack_48 [16];
undefined8 *puStack_38;
long lStack_18;
undefined8 *puStack_10;
uStack_b8 = 0x2068732f6e69622f;
uStack_b0 = 0x20616c2d20736c;
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;
uStack_60 = 0;
uStack_58 = 0;
puStack_10 = &uStack_b8;
lStack_18 = func_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401404);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
puStack_38 = puStack_10;
CWE78_OS_Command_Injection__char_console_popen_66b_badSink(auStack_48);
return;
}
| ['gcc'] |
12,859 | void CWE78_OS_Command_Injection__char_console_popen_66_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118557/CWE78_OS_Command_Injection__char_console_popen_66a.c | CWE78_OS_Command_Injection__char_console_popen_66_good |
void CWE78_OS_Command_Injection__char_console_popen_66_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,860 | void CWE78_OS_Command_Injection__char_console_popen_66b_badSink(char * dataArray[])
{
/* copy data out of dataArray */
char * data = dataArray[2];
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118557/CWE78_OS_Command_Injection__char_console_popen_66b.c | CWE78_OS_Command_Injection__char_console_popen_66b_badSink |
void CWE78_OS_Command_Injection__char_console_popen_66b_badSink(long param_1)
{
long lVar1;
lVar1 = func_0x00400be0(*(undefined8 *)(param_1 + 0x10),&UNK_00401404);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,861 | void CWE78_OS_Command_Injection__char_console_popen_66b_goodG2BSink(char * dataArray[])
{
char * data = dataArray[2];
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118557/CWE78_OS_Command_Injection__char_console_popen_66b.c | CWE78_OS_Command_Injection__char_console_popen_66b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_66b_goodG2BSink(long param_1)
{
long lVar1;
lVar1 = func_0x00400ad0(*(undefined8 *)(param_1 + 0x10),&UNK_00401284);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,862 | void CWE78_OS_Command_Injection__char_console_popen_67_bad()
{
char * data;
CWE78_OS_Command_Injection__char_console_popen_67_structType myStruct;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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';
}
}
}
myStruct.structFirst = data;
CWE78_OS_Command_Injection__char_console_popen_67b_badSink(myStruct);
} | ['/* 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/118558/CWE78_OS_Command_Injection__char_console_popen_67a.c | CWE78_OS_Command_Injection__char_console_popen_67_bad |
void CWE78_OS_Command_Injection__char_console_popen_67_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;
undefined8 *puStack_20;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
puStack_20 = puStack_10;
CWE78_OS_Command_Injection__char_console_popen_67b_badSink(puStack_10);
return;
}
| ['gcc'] |
12,863 | void CWE78_OS_Command_Injection__char_console_popen_67_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118558/CWE78_OS_Command_Injection__char_console_popen_67a.c | CWE78_OS_Command_Injection__char_console_popen_67_good |
void CWE78_OS_Command_Injection__char_console_popen_67_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,864 | void CWE78_OS_Command_Injection__char_console_popen_67b_badSink(CWE78_OS_Command_Injection__char_console_popen_67_structType myStruct)
{
char * data = myStruct.structFirst;
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118558/CWE78_OS_Command_Injection__char_console_popen_67b.c | CWE78_OS_Command_Injection__char_console_popen_67b_badSink |
void CWE78_OS_Command_Injection__char_console_popen_67b_badSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400be0(param_1,&UNK_004013e4);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,865 | void CWE78_OS_Command_Injection__char_console_popen_67b_goodG2BSink(CWE78_OS_Command_Injection__char_console_popen_67_structType myStruct)
{
char * data = myStruct.structFirst;
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118558/CWE78_OS_Command_Injection__char_console_popen_67b.c | CWE78_OS_Command_Injection__char_console_popen_67b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_67b_goodG2BSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400ad0(param_1,&UNK_00401264);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,866 | void CWE78_OS_Command_Injection__char_console_popen_68_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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_popen_68_badData = data;
CWE78_OS_Command_Injection__char_console_popen_68b_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/118559/CWE78_OS_Command_Injection__char_console_popen_68a.c | CWE78_OS_Command_Injection__char_console_popen_68_bad |
void CWE78_OS_Command_Injection__char_console_popen_68_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013e4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(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_popen_68_badData = puStack_10;
CWE78_OS_Command_Injection__char_console_popen_68b_badSink();
return;
}
| ['gcc'] |
12,867 | void CWE78_OS_Command_Injection__char_console_popen_68_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118559/CWE78_OS_Command_Injection__char_console_popen_68a.c | CWE78_OS_Command_Injection__char_console_popen_68_good |
void CWE78_OS_Command_Injection__char_console_popen_68_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,868 | void CWE78_OS_Command_Injection__char_console_popen_68b_badSink()
{
char * data = CWE78_OS_Command_Injection__char_console_popen_68_badData;
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118559/CWE78_OS_Command_Injection__char_console_popen_68b.c | CWE78_OS_Command_Injection__char_console_popen_68b_badSink |
void CWE78_OS_Command_Injection__char_console_popen_68b_badSink(void)
{
long lVar1;
lVar1 = func_0x00400be0(CWE78_OS_Command_Injection__char_console_popen_68_badData,&UNK_004013e4);
if (lVar1 != 0) {
func_0x00400b50(lVar1);
}
return;
}
| ['gcc'] |
12,869 | void CWE78_OS_Command_Injection__char_console_popen_68b_goodG2BSink()
{
char * data = CWE78_OS_Command_Injection__char_console_popen_68_goodG2BData;
{
FILE *pipe;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
pipe = POPEN(data, "wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
} | ['/* 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/118559/CWE78_OS_Command_Injection__char_console_popen_68b.c | CWE78_OS_Command_Injection__char_console_popen_68b_goodG2BSink |
void CWE78_OS_Command_Injection__char_console_popen_68b_goodG2BSink(void)
{
long lVar1;
lVar1 = func_0x00400ad0(CWE78_OS_Command_Injection__char_console_popen_68_goodG2BData,
&UNK_00401264);
if (lVar1 != 0) {
func_0x00400a50(lVar1);
}
return;
}
| ['gcc'] |
12,870 | void CWE78_OS_Command_Injection__char_console_system_01_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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';
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118567/CWE78_OS_Command_Injection__char_console_system_01.c | CWE78_OS_Command_Injection__char_console_system_01_bad |
void CWE78_OS_Command_Injection__char_console_system_01_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013b4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013c3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,871 | void CWE78_OS_Command_Injection__char_console_system_01_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118567/CWE78_OS_Command_Injection__char_console_system_01.c | CWE78_OS_Command_Injection__char_console_system_01_good |
void CWE78_OS_Command_Injection__char_console_system_01_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,872 | void CWE78_OS_Command_Injection__char_console_system_02_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118568/CWE78_OS_Command_Injection__char_console_system_02.c | CWE78_OS_Command_Injection__char_console_system_02_bad |
void CWE78_OS_Command_Injection__char_console_system_02_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013b4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013c3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,873 | void CWE78_OS_Command_Injection__char_console_system_02_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118568/CWE78_OS_Command_Injection__char_console_system_02.c | CWE78_OS_Command_Injection__char_console_system_02_good |
void CWE78_OS_Command_Injection__char_console_system_02_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,874 | void CWE78_OS_Command_Injection__char_console_system_03_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118569/CWE78_OS_Command_Injection__char_console_system_03.c | CWE78_OS_Command_Injection__char_console_system_03_bad |
void CWE78_OS_Command_Injection__char_console_system_03_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013b4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013c3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,875 | void CWE78_OS_Command_Injection__char_console_system_03_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118569/CWE78_OS_Command_Injection__char_console_system_03.c | CWE78_OS_Command_Injection__char_console_system_03_good |
void CWE78_OS_Command_Injection__char_console_system_03_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,876 | void CWE78_OS_Command_Injection__char_console_system_04_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118570/CWE78_OS_Command_Injection__char_console_system_04.c | CWE78_OS_Command_Injection__char_console_system_04_bad |
void CWE78_OS_Command_Injection__char_console_system_04_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013cc);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013db);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,877 | void CWE78_OS_Command_Injection__char_console_system_04_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118570/CWE78_OS_Command_Injection__char_console_system_04.c | CWE78_OS_Command_Injection__char_console_system_04_good |
void CWE78_OS_Command_Injection__char_console_system_04_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,878 | void CWE78_OS_Command_Injection__char_console_system_05_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118571/CWE78_OS_Command_Injection__char_console_system_05.c | CWE78_OS_Command_Injection__char_console_system_05_bad |
void CWE78_OS_Command_Injection__char_console_system_05_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013c4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013d3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,879 | void CWE78_OS_Command_Injection__char_console_system_05_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118571/CWE78_OS_Command_Injection__char_console_system_05.c | CWE78_OS_Command_Injection__char_console_system_05_good |
void CWE78_OS_Command_Injection__char_console_system_05_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,880 | void CWE78_OS_Command_Injection__char_console_system_06_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118572/CWE78_OS_Command_Injection__char_console_system_06.c | CWE78_OS_Command_Injection__char_console_system_06_bad |
void CWE78_OS_Command_Injection__char_console_system_06_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013c8);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013d7);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,881 | void CWE78_OS_Command_Injection__char_console_system_06_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118572/CWE78_OS_Command_Injection__char_console_system_06.c | CWE78_OS_Command_Injection__char_console_system_06_good |
void CWE78_OS_Command_Injection__char_console_system_06_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,882 | void CWE78_OS_Command_Injection__char_console_system_07_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118573/CWE78_OS_Command_Injection__char_console_system_07.c | CWE78_OS_Command_Injection__char_console_system_07_bad |
void CWE78_OS_Command_Injection__char_console_system_07_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013c4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013d3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,883 | void CWE78_OS_Command_Injection__char_console_system_07_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118573/CWE78_OS_Command_Injection__char_console_system_07.c | CWE78_OS_Command_Injection__char_console_system_07_good |
void CWE78_OS_Command_Injection__char_console_system_07_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,884 | void CWE78_OS_Command_Injection__char_console_system_08_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118574/CWE78_OS_Command_Injection__char_console_system_08.c | CWE78_OS_Command_Injection__char_console_system_08_bad |
void CWE78_OS_Command_Injection__char_console_system_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013e4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013f3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,885 | void CWE78_OS_Command_Injection__char_console_system_08_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118574/CWE78_OS_Command_Injection__char_console_system_08.c | CWE78_OS_Command_Injection__char_console_system_08_good |
void CWE78_OS_Command_Injection__char_console_system_08_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,886 | void CWE78_OS_Command_Injection__char_console_system_09_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118575/CWE78_OS_Command_Injection__char_console_system_09.c | CWE78_OS_Command_Injection__char_console_system_09_bad |
void CWE78_OS_Command_Injection__char_console_system_09_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013c4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013d3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,887 | void CWE78_OS_Command_Injection__char_console_system_09_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118575/CWE78_OS_Command_Injection__char_console_system_09.c | CWE78_OS_Command_Injection__char_console_system_09_good |
void CWE78_OS_Command_Injection__char_console_system_09_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,888 | void CWE78_OS_Command_Injection__char_console_system_10_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118576/CWE78_OS_Command_Injection__char_console_system_10.c | CWE78_OS_Command_Injection__char_console_system_10_bad |
void CWE78_OS_Command_Injection__char_console_system_10_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013c4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013d3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,889 | void CWE78_OS_Command_Injection__char_console_system_10_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118576/CWE78_OS_Command_Injection__char_console_system_10.c | CWE78_OS_Command_Injection__char_console_system_10_good |
void CWE78_OS_Command_Injection__char_console_system_10_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,890 | void CWE78_OS_Command_Injection__char_console_system_11_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118577/CWE78_OS_Command_Injection__char_console_system_11.c | CWE78_OS_Command_Injection__char_console_system_11_bad |
void CWE78_OS_Command_Injection__char_console_system_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013c4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013d3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,891 | void CWE78_OS_Command_Injection__char_console_system_11_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118577/CWE78_OS_Command_Injection__char_console_system_11.c | CWE78_OS_Command_Injection__char_console_system_11_good |
void CWE78_OS_Command_Injection__char_console_system_11_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,892 | void CWE78_OS_Command_Injection__char_console_system_12_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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, "*.*");
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* FIX: Append a fixed string to data (not user / external input) */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118578/CWE78_OS_Command_Injection__char_console_system_12.c | CWE78_OS_Command_Injection__char_console_system_12_bad |
void CWE78_OS_Command_Injection__char_console_system_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar3 = func_0x00400b80((char *)((long)puStack_10 + lStack_18),100 - (int)lStack_18,stdin);
if (lVar3 == 0) {
printLine(&UNK_004013f4);
*(char *)(lStack_18 + (long)puStack_10) = '\0';
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(char *)((long)puStack_10 + lStack_18 + -1) = '\0';
}
}
}
}
iVar2 = func_0x00400b40(puStack_10);
if (iVar2 < 1) {
printLine(&UNK_00401403);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,893 | void CWE78_OS_Command_Injection__char_console_system_12_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118578/CWE78_OS_Command_Injection__char_console_system_12.c | CWE78_OS_Command_Injection__char_console_system_12_good |
void CWE78_OS_Command_Injection__char_console_system_12_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,894 | void CWE78_OS_Command_Injection__char_console_system_13_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
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';
}
}
}
}
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118579/CWE78_OS_Command_Injection__char_console_system_13.c | CWE78_OS_Command_Injection__char_console_system_13_bad |
void CWE78_OS_Command_Injection__char_console_system_13_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013c4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
}
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013d3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,895 | void CWE78_OS_Command_Injection__char_console_system_13_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118579/CWE78_OS_Command_Injection__char_console_system_13.c | CWE78_OS_Command_Injection__char_console_system_13_good |
void CWE78_OS_Command_Injection__char_console_system_13_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
12,896 | void CWE78_OS_Command_Injection__char_console_system_34_bad()
{
char * data;
CWE78_OS_Command_Injection__char_console_system_34_unionType myUnion;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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';
}
}
}
myUnion.unionFirst = data;
{
char * data = myUnion.unionSecond;
/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */'] | ['CWE78'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118590/CWE78_OS_Command_Injection__char_console_system_34.c | CWE78_OS_Command_Injection__char_console_system_34_bad |
void CWE78_OS_Command_Injection__char_console_system_34_bad(void)
{
int iVar1;
long lVar2;
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_28;
undefined8 *puStack_20;
long lStack_18;
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;
lStack_18 = func_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar2 == 0) {
printLine(&UNK_004013d4);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
puStack_28 = puStack_10;
puStack_20 = puStack_10;
iVar1 = func_0x00400b40(puStack_10);
if (iVar1 < 1) {
printLine(&UNK_004013e3);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,897 | void CWE78_OS_Command_Injection__char_console_system_34_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118590/CWE78_OS_Command_Injection__char_console_system_34.c | CWE78_OS_Command_Injection__char_console_system_34_good |
void CWE78_OS_Command_Injection__char_console_system_34_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
12,898 | void CWE78_OS_Command_Injection__char_console_system_41_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/118591/CWE78_OS_Command_Injection__char_console_system_41.c | CWE78_OS_Command_Injection__char_console_system_41_badSink |
void CWE78_OS_Command_Injection__char_console_system_41_badSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400b40(param_1);
if (iVar1 < 1) {
printLine(&UNK_004013d4);
func_0x00400be0(1);
}
return;
}
| ['gcc'] |
12,899 | void CWE78_OS_Command_Injection__char_console_system_41_bad()
{
char * data;
char data_buf[100] = FULL_COMMAND;
data = data_buf;
{
/* 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_system_41_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/118591/CWE78_OS_Command_Injection__char_console_system_41.c | CWE78_OS_Command_Injection__char_console_system_41_bad |
void CWE78_OS_Command_Injection__char_console_system_41_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 = 0x2068732f6e69622f;
uStack_80 = 0x20616c2d20736c;
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_0x00400b30(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_004013ee);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400b30(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_system_41_badSink(puStack_10);
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.