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,700
void CWE78_OS_Command_Injection__char_console_execlp_51_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118500/CWE78_OS_Command_Injection__char_console_execlp_51a.c
CWE78_OS_Command_Injection__char_console_execlp_51_good
void CWE78_OS_Command_Injection__char_console_execlp_51_good(void) { goodG2B(); return; }
['gcc']
12,701
void CWE78_OS_Command_Injection__char_console_execlp_51b_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118500/CWE78_OS_Command_Injection__char_console_execlp_51b.c
CWE78_OS_Command_Injection__char_console_execlp_51b_badSink
void CWE78_OS_Command_Injection__char_console_execlp_51b_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040134b,&UNK_0040134b,&UNK_00401348,&UNK_00401344,param_1,0); return; }
['gcc']
12,702
void CWE78_OS_Command_Injection__char_console_execlp_51b_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118500/CWE78_OS_Command_Injection__char_console_execlp_51b.c
CWE78_OS_Command_Injection__char_console_execlp_51b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_51b_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,param_1,0); return; }
['gcc']
12,703
void CWE78_OS_Command_Injection__char_console_execlp_52_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execlp_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/118501/CWE78_OS_Command_Injection__char_console_execlp_52a.c
CWE78_OS_Command_Injection__char_console_execlp_52_bad
void CWE78_OS_Command_Injection__char_console_execlp_52_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execlp_52b_badSink(puStack_10); return; }
['gcc']
12,704
void CWE78_OS_Command_Injection__char_console_execlp_52_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118501/CWE78_OS_Command_Injection__char_console_execlp_52a.c
CWE78_OS_Command_Injection__char_console_execlp_52_good
void CWE78_OS_Command_Injection__char_console_execlp_52_good(void) { goodG2B(); return; }
['gcc']
12,705
void CWE78_OS_Command_Injection__char_console_execlp_52b_badSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_52c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118501/CWE78_OS_Command_Injection__char_console_execlp_52b.c
CWE78_OS_Command_Injection__char_console_execlp_52b_badSink
void CWE78_OS_Command_Injection__char_console_execlp_52b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_52c_badSink(param_1); return; }
['gcc']
12,706
void CWE78_OS_Command_Injection__char_console_execlp_52b_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_52c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118501/CWE78_OS_Command_Injection__char_console_execlp_52b.c
CWE78_OS_Command_Injection__char_console_execlp_52b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_52b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_52c_goodG2BSink(param_1); return; }
['gcc']
12,707
void CWE78_OS_Command_Injection__char_console_execlp_52c_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118501/CWE78_OS_Command_Injection__char_console_execlp_52c.c
CWE78_OS_Command_Injection__char_console_execlp_52c_badSink
void CWE78_OS_Command_Injection__char_console_execlp_52c_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040135b,&UNK_0040135b,&UNK_00401358,&UNK_00401354,param_1,0); return; }
['gcc']
12,708
void CWE78_OS_Command_Injection__char_console_execlp_52c_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118501/CWE78_OS_Command_Injection__char_console_execlp_52c.c
CWE78_OS_Command_Injection__char_console_execlp_52c_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_52c_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040121b,&UNK_0040121b,&UNK_00401218,&UNK_00401214,param_1,0); return; }
['gcc']
12,709
void CWE78_OS_Command_Injection__char_console_execlp_53_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execlp_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/118502/CWE78_OS_Command_Injection__char_console_execlp_53a.c
CWE78_OS_Command_Injection__char_console_execlp_53_bad
void CWE78_OS_Command_Injection__char_console_execlp_53_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401374); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execlp_53b_badSink(puStack_10); return; }
['gcc']
12,710
void CWE78_OS_Command_Injection__char_console_execlp_53_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118502/CWE78_OS_Command_Injection__char_console_execlp_53a.c
CWE78_OS_Command_Injection__char_console_execlp_53_good
void CWE78_OS_Command_Injection__char_console_execlp_53_good(void) { goodG2B(); return; }
['gcc']
12,711
void CWE78_OS_Command_Injection__char_console_execlp_53b_badSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_53c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118502/CWE78_OS_Command_Injection__char_console_execlp_53b.c
CWE78_OS_Command_Injection__char_console_execlp_53b_badSink
void CWE78_OS_Command_Injection__char_console_execlp_53b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_53c_badSink(param_1); return; }
['gcc']
12,712
void CWE78_OS_Command_Injection__char_console_execlp_53b_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_53c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118502/CWE78_OS_Command_Injection__char_console_execlp_53b.c
CWE78_OS_Command_Injection__char_console_execlp_53b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_53b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_53c_goodG2BSink(param_1); return; }
['gcc']
12,713
void CWE78_OS_Command_Injection__char_console_execlp_53c_badSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_53d_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118502/CWE78_OS_Command_Injection__char_console_execlp_53c.c
CWE78_OS_Command_Injection__char_console_execlp_53c_badSink
void CWE78_OS_Command_Injection__char_console_execlp_53c_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_53d_badSink(param_1); return; }
['gcc']
12,714
void CWE78_OS_Command_Injection__char_console_execlp_53c_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_53d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118502/CWE78_OS_Command_Injection__char_console_execlp_53c.c
CWE78_OS_Command_Injection__char_console_execlp_53c_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_53c_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_53d_goodG2BSink(param_1); return; }
['gcc']
12,715
void CWE78_OS_Command_Injection__char_console_execlp_53d_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118502/CWE78_OS_Command_Injection__char_console_execlp_53d.c
CWE78_OS_Command_Injection__char_console_execlp_53d_badSink
void CWE78_OS_Command_Injection__char_console_execlp_53d_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040137b,&UNK_0040137b,&UNK_00401378,&UNK_00401374,param_1,0); return; }
['gcc']
12,716
void CWE78_OS_Command_Injection__char_console_execlp_53d_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118502/CWE78_OS_Command_Injection__char_console_execlp_53d.c
CWE78_OS_Command_Injection__char_console_execlp_53d_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_53d_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040123b,&UNK_0040123b,&UNK_00401238,&UNK_00401234,param_1,0); return; }
['gcc']
12,717
void CWE78_OS_Command_Injection__char_console_execlp_54_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execlp_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/118503/CWE78_OS_Command_Injection__char_console_execlp_54a.c
CWE78_OS_Command_Injection__char_console_execlp_54_bad
void CWE78_OS_Command_Injection__char_console_execlp_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 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401394); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execlp_54b_badSink(puStack_10); return; }
['gcc']
12,718
void CWE78_OS_Command_Injection__char_console_execlp_54_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118503/CWE78_OS_Command_Injection__char_console_execlp_54a.c
CWE78_OS_Command_Injection__char_console_execlp_54_good
void CWE78_OS_Command_Injection__char_console_execlp_54_good(void) { goodG2B(); return; }
['gcc']
12,719
void CWE78_OS_Command_Injection__char_console_execlp_54b_badSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_54c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118503/CWE78_OS_Command_Injection__char_console_execlp_54b.c
CWE78_OS_Command_Injection__char_console_execlp_54b_badSink
void CWE78_OS_Command_Injection__char_console_execlp_54b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_54c_badSink(param_1); return; }
['gcc']
12,720
void CWE78_OS_Command_Injection__char_console_execlp_54b_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_54c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118503/CWE78_OS_Command_Injection__char_console_execlp_54b.c
CWE78_OS_Command_Injection__char_console_execlp_54b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_54b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_54c_goodG2BSink(param_1); return; }
['gcc']
12,721
void CWE78_OS_Command_Injection__char_console_execlp_54c_badSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_54d_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118503/CWE78_OS_Command_Injection__char_console_execlp_54c.c
CWE78_OS_Command_Injection__char_console_execlp_54c_badSink
void CWE78_OS_Command_Injection__char_console_execlp_54c_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_54d_badSink(param_1); return; }
['gcc']
12,722
void CWE78_OS_Command_Injection__char_console_execlp_54c_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_54d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118503/CWE78_OS_Command_Injection__char_console_execlp_54c.c
CWE78_OS_Command_Injection__char_console_execlp_54c_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_54c_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_54d_goodG2BSink(param_1); return; }
['gcc']
12,723
void CWE78_OS_Command_Injection__char_console_execlp_54d_badSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_54e_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118503/CWE78_OS_Command_Injection__char_console_execlp_54d.c
CWE78_OS_Command_Injection__char_console_execlp_54d_badSink
void CWE78_OS_Command_Injection__char_console_execlp_54d_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_54e_badSink(param_1); return; }
['gcc']
12,724
void CWE78_OS_Command_Injection__char_console_execlp_54d_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_console_execlp_54e_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118503/CWE78_OS_Command_Injection__char_console_execlp_54d.c
CWE78_OS_Command_Injection__char_console_execlp_54d_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_54d_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execlp_54e_goodG2BSink(param_1); return; }
['gcc']
12,725
void CWE78_OS_Command_Injection__char_console_execlp_54e_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118503/CWE78_OS_Command_Injection__char_console_execlp_54e.c
CWE78_OS_Command_Injection__char_console_execlp_54e_badSink
void CWE78_OS_Command_Injection__char_console_execlp_54e_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040139b,&UNK_0040139b,&UNK_00401398,&UNK_00401394,param_1,0); return; }
['gcc']
12,726
void CWE78_OS_Command_Injection__char_console_execlp_54e_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118503/CWE78_OS_Command_Injection__char_console_execlp_54e.c
CWE78_OS_Command_Injection__char_console_execlp_54e_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_54e_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040125b,&UNK_0040125b,&UNK_00401258,&UNK_00401254,param_1,0); return; }
['gcc']
12,727
void CWE78_OS_Command_Injection__char_console_execlp_61_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; data = CWE78_OS_Command_Injection__char_console_execlp_61b_badSource(data); /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118504/CWE78_OS_Command_Injection__char_console_execlp_61a.c
CWE78_OS_Command_Injection__char_console_execlp_61_bad
void CWE78_OS_Command_Injection__char_console_execlp_61_bad(void) { undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; undefined8 *puStack_10; uStack_78 = 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; uStack_20 = 0; uStack_18 = 0; puStack_10 = &uStack_78; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__char_console_execlp_61b_badSource(puStack_10); func_0x00400b50(&UNK_0040134b,&UNK_0040134b,&UNK_00401348,&UNK_00401344,puStack_10,0); return; }
['gcc']
12,728
void CWE78_OS_Command_Injection__char_console_execlp_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118504/CWE78_OS_Command_Injection__char_console_execlp_61a.c
CWE78_OS_Command_Injection__char_console_execlp_61_good
void CWE78_OS_Command_Injection__char_console_execlp_61_good(void) { goodG2B(); return; }
['gcc']
12,729
char * CWE78_OS_Command_Injection__char_console_execlp_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/118504/CWE78_OS_Command_Injection__char_console_execlp_61b.c
CWE78_OS_Command_Injection__char_console_execlp_61b_badSource
long CWE78_OS_Command_Injection__char_console_execlp_61b_badSource(long param_1) { long lVar1; long lVar2; lVar1 = func_0x00400ab0(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400af0(param_1 + lVar1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401344); *(undefined *)(lVar1 + param_1) = 0; } else { lVar1 = func_0x00400ab0(param_1); if ((lVar1 != 0) && (*(char *)(param_1 + lVar1 + -1) == '\n')) { *(undefined *)(param_1 + lVar1 + -1) = 0; } } } return param_1; }
['gcc']
12,730
char * CWE78_OS_Command_Injection__char_console_execlp_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/118504/CWE78_OS_Command_Injection__char_console_execlp_61b.c
CWE78_OS_Command_Injection__char_console_execlp_61b_goodG2BSource
char * CWE78_OS_Command_Injection__char_console_execlp_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,731
void CWE78_OS_Command_Injection__char_console_execlp_63_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execlp_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/118506/CWE78_OS_Command_Injection__char_console_execlp_63a.c
CWE78_OS_Command_Injection__char_console_execlp_63_bad
void CWE78_OS_Command_Injection__char_console_execlp_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 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_10 = func_0x00400ab0(puStack_18); if (1 < 100U - lStack_10) { lVar1 = func_0x00400af0((long)puStack_18 + lStack_10,100 - (int)lStack_10,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_10 + (long)puStack_18) = 0; } else { lStack_10 = func_0x00400ab0(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_execlp_63b_badSink(&puStack_18); return; }
['gcc']
12,732
void CWE78_OS_Command_Injection__char_console_execlp_63_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118506/CWE78_OS_Command_Injection__char_console_execlp_63a.c
CWE78_OS_Command_Injection__char_console_execlp_63_good
void CWE78_OS_Command_Injection__char_console_execlp_63_good(void) { goodG2B(); return; }
['gcc']
12,733
void CWE78_OS_Command_Injection__char_console_execlp_63b_badSink(char * * dataPtr) { char * data = *dataPtr; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118506/CWE78_OS_Command_Injection__char_console_execlp_63b.c
CWE78_OS_Command_Injection__char_console_execlp_63b_badSink
void CWE78_OS_Command_Injection__char_console_execlp_63b_badSink(undefined8 *param_1) { func_0x00400b50(&UNK_0040134b,&UNK_0040134b,&UNK_00401348,&UNK_00401344,*param_1,0); return; }
['gcc']
12,734
void CWE78_OS_Command_Injection__char_console_execlp_63b_goodG2BSink(char * * dataPtr) { char * data = *dataPtr; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118506/CWE78_OS_Command_Injection__char_console_execlp_63b.c
CWE78_OS_Command_Injection__char_console_execlp_63b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_63b_goodG2BSink(undefined8 *param_1) { func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,*param_1,0); return; }
['gcc']
12,735
void CWE78_OS_Command_Injection__char_console_execlp_64_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execlp_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/118507/CWE78_OS_Command_Injection__char_console_execlp_64a.c
CWE78_OS_Command_Injection__char_console_execlp_64_bad
void CWE78_OS_Command_Injection__char_console_execlp_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 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_10 = func_0x00400ab0(puStack_18); if (1 < 100U - lStack_10) { lVar1 = func_0x00400af0((long)puStack_18 + lStack_10,100 - (int)lStack_10,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); *(undefined *)(lStack_10 + (long)puStack_18) = 0; } else { lStack_10 = func_0x00400ab0(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_execlp_64b_badSink(&puStack_18); return; }
['gcc']
12,736
void CWE78_OS_Command_Injection__char_console_execlp_64_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118507/CWE78_OS_Command_Injection__char_console_execlp_64a.c
CWE78_OS_Command_Injection__char_console_execlp_64_good
void CWE78_OS_Command_Injection__char_console_execlp_64_good(void) { goodG2B(); return; }
['gcc']
12,737
void CWE78_OS_Command_Injection__char_console_execlp_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); /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118507/CWE78_OS_Command_Injection__char_console_execlp_64b.c
CWE78_OS_Command_Injection__char_console_execlp_64b_badSink
void CWE78_OS_Command_Injection__char_console_execlp_64b_badSink(undefined8 *param_1) { func_0x00400b50(&UNK_0040135b,&UNK_0040135b,&UNK_00401358,&UNK_00401354,*param_1,0); return; }
['gcc']
12,738
void CWE78_OS_Command_Injection__char_console_execlp_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); /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118507/CWE78_OS_Command_Injection__char_console_execlp_64b.c
CWE78_OS_Command_Injection__char_console_execlp_64b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_64b_goodG2BSink(undefined8 *param_1) { func_0x00400a80(&UNK_0040121b,&UNK_0040121b,&UNK_00401218,&UNK_00401214,*param_1,0); return; }
['gcc']
12,739
void CWE78_OS_Command_Injection__char_console_execlp_65_bad() { char * data; /* define a function pointer */ void (*funcPtr) (char *) = CWE78_OS_Command_Injection__char_console_execlp_65b_badSink; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* use the function pointer */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118508/CWE78_OS_Command_Injection__char_console_execlp_65a.c
CWE78_OS_Command_Injection__char_console_execlp_65_bad
void CWE78_OS_Command_Injection__char_console_execlp_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_execlp_65b_badSink; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_20 = func_0x00400ab0(puStack_18); if (1 < 100U - lStack_20) { lVar1 = func_0x00400af0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_20 + (long)puStack_18) = 0; } else { lStack_20 = func_0x00400ab0(puStack_18); if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_20 + -1) = 0; } } } (*pcStack_10)(puStack_18); return; }
['gcc']
12,740
void CWE78_OS_Command_Injection__char_console_execlp_65_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118508/CWE78_OS_Command_Injection__char_console_execlp_65a.c
CWE78_OS_Command_Injection__char_console_execlp_65_good
void CWE78_OS_Command_Injection__char_console_execlp_65_good(void) { goodG2B(); return; }
['gcc']
12,741
void CWE78_OS_Command_Injection__char_console_execlp_65b_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118508/CWE78_OS_Command_Injection__char_console_execlp_65b.c
CWE78_OS_Command_Injection__char_console_execlp_65b_badSink
void CWE78_OS_Command_Injection__char_console_execlp_65b_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040134b,&UNK_0040134b,&UNK_00401348,&UNK_00401344,param_1,0); return; }
['gcc']
12,742
void CWE78_OS_Command_Injection__char_console_execlp_65b_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118508/CWE78_OS_Command_Injection__char_console_execlp_65b.c
CWE78_OS_Command_Injection__char_console_execlp_65b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_65b_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,param_1,0); return; }
['gcc']
12,743
void CWE78_OS_Command_Injection__char_console_execlp_66_bad() { char * data; char * dataArray[5]; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } /* put data in array */ dataArray[2] = data; CWE78_OS_Command_Injection__char_console_execlp_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/118509/CWE78_OS_Command_Injection__char_console_execlp_66a.c
CWE78_OS_Command_Injection__char_console_execlp_66_bad
void CWE78_OS_Command_Injection__char_console_execlp_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 = 0; uStack_b0 = 0; uStack_a8 = 0; uStack_a0 = 0; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; puStack_10 = &uStack_b8; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401364); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } puStack_38 = puStack_10; CWE78_OS_Command_Injection__char_console_execlp_66b_badSink(auStack_48); return; }
['gcc']
12,744
void CWE78_OS_Command_Injection__char_console_execlp_66_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118509/CWE78_OS_Command_Injection__char_console_execlp_66a.c
CWE78_OS_Command_Injection__char_console_execlp_66_good
void CWE78_OS_Command_Injection__char_console_execlp_66_good(void) { goodG2B(); return; }
['gcc']
12,745
void CWE78_OS_Command_Injection__char_console_execlp_66b_badSink(char * dataArray[]) { /* copy data out of dataArray */ char * data = dataArray[2]; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* copy data out of dataArray */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118509/CWE78_OS_Command_Injection__char_console_execlp_66b.c
CWE78_OS_Command_Injection__char_console_execlp_66b_badSink
void CWE78_OS_Command_Injection__char_console_execlp_66b_badSink(long param_1) { func_0x00400b50(&UNK_0040136b,&UNK_0040136b,&UNK_00401368,&UNK_00401364, *(undefined8 *)(param_1 + 0x10),0); return; }
['gcc']
12,746
void CWE78_OS_Command_Injection__char_console_execlp_66b_goodG2BSink(char * dataArray[]) { char * data = dataArray[2]; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118509/CWE78_OS_Command_Injection__char_console_execlp_66b.c
CWE78_OS_Command_Injection__char_console_execlp_66b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_66b_goodG2BSink(long param_1) { func_0x00400a80(&UNK_0040122b,&UNK_0040122b,&UNK_00401228,&UNK_00401224, *(undefined8 *)(param_1 + 0x10),0); return; }
['gcc']
12,747
void CWE78_OS_Command_Injection__char_console_execlp_67_bad() { char * data; CWE78_OS_Command_Injection__char_console_execlp_67_structType myStruct; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } myStruct.structFirst = data; CWE78_OS_Command_Injection__char_console_execlp_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/118510/CWE78_OS_Command_Injection__char_console_execlp_67a.c
CWE78_OS_Command_Injection__char_console_execlp_67_bad
void CWE78_OS_Command_Injection__char_console_execlp_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 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } puStack_20 = puStack_10; CWE78_OS_Command_Injection__char_console_execlp_67b_badSink(puStack_10); return; }
['gcc']
12,748
void CWE78_OS_Command_Injection__char_console_execlp_67_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118510/CWE78_OS_Command_Injection__char_console_execlp_67a.c
CWE78_OS_Command_Injection__char_console_execlp_67_good
void CWE78_OS_Command_Injection__char_console_execlp_67_good(void) { goodG2B(); return; }
['gcc']
12,749
void CWE78_OS_Command_Injection__char_console_execlp_67b_badSink(CWE78_OS_Command_Injection__char_console_execlp_67_structType myStruct) { char * data = myStruct.structFirst; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118510/CWE78_OS_Command_Injection__char_console_execlp_67b.c
CWE78_OS_Command_Injection__char_console_execlp_67b_badSink
void CWE78_OS_Command_Injection__char_console_execlp_67b_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040135b,&UNK_0040135b,&UNK_00401358,&UNK_00401354,param_1,0); return; }
['gcc']
12,750
void CWE78_OS_Command_Injection__char_console_execlp_67b_goodG2BSink(CWE78_OS_Command_Injection__char_console_execlp_67_structType myStruct) { char * data = myStruct.structFirst; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118510/CWE78_OS_Command_Injection__char_console_execlp_67b.c
CWE78_OS_Command_Injection__char_console_execlp_67b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_67b_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040121b,&UNK_0040121b,&UNK_00401218,&UNK_00401214,param_1,0); return; }
['gcc']
12,751
void CWE78_OS_Command_Injection__char_console_execlp_68_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execlp_68_badData = data; CWE78_OS_Command_Injection__char_console_execlp_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/118511/CWE78_OS_Command_Injection__char_console_execlp_68a.c
CWE78_OS_Command_Injection__char_console_execlp_68_bad
void CWE78_OS_Command_Injection__char_console_execlp_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 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execlp_68_badData = puStack_10; CWE78_OS_Command_Injection__char_console_execlp_68b_badSink(); return; }
['gcc']
12,752
void CWE78_OS_Command_Injection__char_console_execlp_68_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118511/CWE78_OS_Command_Injection__char_console_execlp_68a.c
CWE78_OS_Command_Injection__char_console_execlp_68_good
void CWE78_OS_Command_Injection__char_console_execlp_68_good(void) { goodG2B(); return; }
['gcc']
12,753
void CWE78_OS_Command_Injection__char_console_execlp_68b_badSink() { char * data = CWE78_OS_Command_Injection__char_console_execlp_68_badData; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118511/CWE78_OS_Command_Injection__char_console_execlp_68b.c
CWE78_OS_Command_Injection__char_console_execlp_68b_badSink
void CWE78_OS_Command_Injection__char_console_execlp_68b_badSink(void) { func_0x00400b50(&UNK_0040135b,&UNK_0040135b,&UNK_00401358,&UNK_00401354, CWE78_OS_Command_Injection__char_console_execlp_68_badData,0); return; }
['gcc']
12,754
void CWE78_OS_Command_Injection__char_console_execlp_68b_goodG2BSink() { char * data = CWE78_OS_Command_Injection__char_console_execlp_68_goodG2BData; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118511/CWE78_OS_Command_Injection__char_console_execlp_68b.c
CWE78_OS_Command_Injection__char_console_execlp_68b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_68b_goodG2BSink(void) { func_0x00400a80(&UNK_0040121b,&UNK_0040121b,&UNK_00401218,&UNK_00401214, CWE78_OS_Command_Injection__char_console_execlp_68_goodG2BData,0); return; }
['gcc']
12,755
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } { 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/118519/CWE78_OS_Command_Injection__char_console_popen_01.c
CWE78_OS_Command_Injection__char_console_popen_01_bad
void CWE78_OS_Command_Injection__char_console_popen_01_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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_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; } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013c3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,756
void CWE78_OS_Command_Injection__char_console_popen_01_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118519/CWE78_OS_Command_Injection__char_console_popen_01.c
CWE78_OS_Command_Injection__char_console_popen_01_good
void CWE78_OS_Command_Injection__char_console_popen_01_good(void) { goodG2B(); return; }
['gcc']
12,757
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118520/CWE78_OS_Command_Injection__char_console_popen_02.c
CWE78_OS_Command_Injection__char_console_popen_02_bad
void CWE78_OS_Command_Injection__char_console_popen_02_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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_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; } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013c3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,758
void CWE78_OS_Command_Injection__char_console_popen_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118520/CWE78_OS_Command_Injection__char_console_popen_02.c
CWE78_OS_Command_Injection__char_console_popen_02_good
void CWE78_OS_Command_Injection__char_console_popen_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,759
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118521/CWE78_OS_Command_Injection__char_console_popen_03.c
CWE78_OS_Command_Injection__char_console_popen_03_bad
void CWE78_OS_Command_Injection__char_console_popen_03_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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_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; } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013c3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,760
void CWE78_OS_Command_Injection__char_console_popen_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118521/CWE78_OS_Command_Injection__char_console_popen_03.c
CWE78_OS_Command_Injection__char_console_popen_03_good
void CWE78_OS_Command_Injection__char_console_popen_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,761
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118522/CWE78_OS_Command_Injection__char_console_popen_04.c
CWE78_OS_Command_Injection__char_console_popen_04_bad
void CWE78_OS_Command_Injection__char_console_popen_04_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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_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; } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013db); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,762
void CWE78_OS_Command_Injection__char_console_popen_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118522/CWE78_OS_Command_Injection__char_console_popen_04.c
CWE78_OS_Command_Injection__char_console_popen_04_good
void CWE78_OS_Command_Injection__char_console_popen_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,763
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118523/CWE78_OS_Command_Injection__char_console_popen_05.c
CWE78_OS_Command_Injection__char_console_popen_05_bad
void CWE78_OS_Command_Injection__char_console_popen_05_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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; if (staticTrue != 0) { 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_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; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013d3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,764
void CWE78_OS_Command_Injection__char_console_popen_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118523/CWE78_OS_Command_Injection__char_console_popen_05.c
CWE78_OS_Command_Injection__char_console_popen_05_good
void CWE78_OS_Command_Injection__char_console_popen_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,765
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118524/CWE78_OS_Command_Injection__char_console_popen_06.c
CWE78_OS_Command_Injection__char_console_popen_06_bad
void CWE78_OS_Command_Injection__char_console_popen_06_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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_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; } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013d7); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,766
void CWE78_OS_Command_Injection__char_console_popen_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118524/CWE78_OS_Command_Injection__char_console_popen_06.c
CWE78_OS_Command_Injection__char_console_popen_06_good
void CWE78_OS_Command_Injection__char_console_popen_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,767
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118525/CWE78_OS_Command_Injection__char_console_popen_07.c
CWE78_OS_Command_Injection__char_console_popen_07_bad
void CWE78_OS_Command_Injection__char_console_popen_07_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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; if (staticFive == 5) { 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_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; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013d3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,768
void CWE78_OS_Command_Injection__char_console_popen_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118525/CWE78_OS_Command_Injection__char_console_popen_07.c
CWE78_OS_Command_Injection__char_console_popen_07_good
void CWE78_OS_Command_Injection__char_console_popen_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,769
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118526/CWE78_OS_Command_Injection__char_console_popen_08.c
CWE78_OS_Command_Injection__char_console_popen_08_bad
void CWE78_OS_Command_Injection__char_console_popen_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_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; 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; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013f3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,770
void CWE78_OS_Command_Injection__char_console_popen_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118526/CWE78_OS_Command_Injection__char_console_popen_08.c
CWE78_OS_Command_Injection__char_console_popen_08_good
void CWE78_OS_Command_Injection__char_console_popen_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,771
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118527/CWE78_OS_Command_Injection__char_console_popen_09.c
CWE78_OS_Command_Injection__char_console_popen_09_bad
void CWE78_OS_Command_Injection__char_console_popen_09_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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; if (GLOBAL_CONST_TRUE != 0) { 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_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; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013d3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,772
void CWE78_OS_Command_Injection__char_console_popen_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118527/CWE78_OS_Command_Injection__char_console_popen_09.c
CWE78_OS_Command_Injection__char_console_popen_09_good
void CWE78_OS_Command_Injection__char_console_popen_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,773
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118528/CWE78_OS_Command_Injection__char_console_popen_10.c
CWE78_OS_Command_Injection__char_console_popen_10_bad
void CWE78_OS_Command_Injection__char_console_popen_10_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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; if (globalTrue != 0) { 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_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; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013d3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,774
void CWE78_OS_Command_Injection__char_console_popen_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118528/CWE78_OS_Command_Injection__char_console_popen_10.c
CWE78_OS_Command_Injection__char_console_popen_10_good
void CWE78_OS_Command_Injection__char_console_popen_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,775
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118529/CWE78_OS_Command_Injection__char_console_popen_11.c
CWE78_OS_Command_Injection__char_console_popen_11_bad
void CWE78_OS_Command_Injection__char_console_popen_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_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; 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_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; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013e3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,776
void CWE78_OS_Command_Injection__char_console_popen_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118529/CWE78_OS_Command_Injection__char_console_popen_11.c
CWE78_OS_Command_Injection__char_console_popen_11_good
void CWE78_OS_Command_Injection__char_console_popen_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,777
void CWE78_OS_Command_Injection__char_console_popen_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, "*.*"); } { 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 */', '/* 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/118530/CWE78_OS_Command_Injection__char_console_popen_12.c
CWE78_OS_Command_Injection__char_console_popen_12_bad
void CWE78_OS_Command_Injection__char_console_popen_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_20; 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_00401404); *(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'; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_00401413); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,778
void CWE78_OS_Command_Injection__char_console_popen_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118530/CWE78_OS_Command_Injection__char_console_popen_12.c
CWE78_OS_Command_Injection__char_console_popen_12_good
void CWE78_OS_Command_Injection__char_console_popen_12_good(void) { goodG2B(); return; }
['gcc']
12,779
void CWE78_OS_Command_Injection__char_console_popen_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'; } } } } { 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/118531/CWE78_OS_Command_Injection__char_console_popen_13.c
CWE78_OS_Command_Injection__char_console_popen_13_bad
void CWE78_OS_Command_Injection__char_console_popen_13_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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; if (GLOBAL_CONST_FIVE == 5) { 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_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; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013d3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,780
void CWE78_OS_Command_Injection__char_console_popen_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118531/CWE78_OS_Command_Injection__char_console_popen_13.c
CWE78_OS_Command_Injection__char_console_popen_13_good
void CWE78_OS_Command_Injection__char_console_popen_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,781
void CWE78_OS_Command_Injection__char_console_popen_14_bad() { char * data; char data_buf[100] = FULL_COMMAND; data = data_buf; if(globalFive==5) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } { 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/118532/CWE78_OS_Command_Injection__char_console_popen_14.c
CWE78_OS_Command_Injection__char_console_popen_14_bad
void CWE78_OS_Command_Injection__char_console_popen_14_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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; if (globalFive == 5) { 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_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; } } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013d3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,782
void CWE78_OS_Command_Injection__char_console_popen_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118532/CWE78_OS_Command_Injection__char_console_popen_14.c
CWE78_OS_Command_Injection__char_console_popen_14_good
void CWE78_OS_Command_Injection__char_console_popen_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,783
void CWE78_OS_Command_Injection__char_console_popen_15_bad() { char * data; char data_buf[100] = FULL_COMMAND; data = data_buf; switch(6) { case 6: { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } { 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 */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118533/CWE78_OS_Command_Injection__char_console_popen_15.c
CWE78_OS_Command_Injection__char_console_popen_15_bad
void CWE78_OS_Command_Injection__char_console_popen_15_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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_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; } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013d3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,784
void CWE78_OS_Command_Injection__char_console_popen_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118533/CWE78_OS_Command_Injection__char_console_popen_15.c
CWE78_OS_Command_Injection__char_console_popen_15_good
void CWE78_OS_Command_Injection__char_console_popen_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,785
void CWE78_OS_Command_Injection__char_console_popen_16_bad() { char * data; char data_buf[100] = FULL_COMMAND; data = data_buf; while(1) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } break; } { 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/118534/CWE78_OS_Command_Injection__char_console_popen_16.c
CWE78_OS_Command_Injection__char_console_popen_16_bad
void CWE78_OS_Command_Injection__char_console_popen_16_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_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_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; } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013d3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,786
void CWE78_OS_Command_Injection__char_console_popen_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118534/CWE78_OS_Command_Injection__char_console_popen_16.c
CWE78_OS_Command_Injection__char_console_popen_16_good
void CWE78_OS_Command_Injection__char_console_popen_16_good(void) { goodG2B(); return; }
['gcc']
12,787
void CWE78_OS_Command_Injection__char_console_popen_17_bad() { int i; char * data; char data_buf[100] = FULL_COMMAND; data = data_buf; for(i = 0; i < 1; i++) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } { 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/118535/CWE78_OS_Command_Injection__char_console_popen_17.c
CWE78_OS_Command_Injection__char_console_popen_17_bad
void CWE78_OS_Command_Injection__char_console_popen_17_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; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_c; uStack_98 = 0x2068732f6e69622f; uStack_90 = 0x20616c2d20736c; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { lStack_28 = func_0x00400b30(puStack_18); if (1 < 100U - lStack_28) { lVar1 = func_0x00400b80((long)puStack_18 + lStack_28,100 - (int)lStack_28,stdin); if (lVar1 == 0) { printLine(&UNK_004013e4); *(undefined *)(lStack_28 + (long)puStack_18) = 0; } else { lStack_28 = func_0x00400b30(puStack_18); if ((lStack_28 != 0) && (*(char *)((long)puStack_18 + lStack_28 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_28 + -1) = 0; } } } } lStack_20 = func_0x00400be0(puStack_18,&UNK_004013f3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,788
void CWE78_OS_Command_Injection__char_console_popen_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118535/CWE78_OS_Command_Injection__char_console_popen_17.c
CWE78_OS_Command_Injection__char_console_popen_17_good
void CWE78_OS_Command_Injection__char_console_popen_17_good(void) { goodG2B(); return; }
['gcc']
12,789
void CWE78_OS_Command_Injection__char_console_popen_18_bad() { char * data; char data_buf[100] = FULL_COMMAND; data = data_buf; goto source; source: { /* 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'; } } } { 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/118536/CWE78_OS_Command_Injection__char_console_popen_18.c
CWE78_OS_Command_Injection__char_console_popen_18_bad
void CWE78_OS_Command_Injection__char_console_popen_18_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; 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_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; } } } lStack_20 = func_0x00400be0(puStack_10,&UNK_004013d3); if (lStack_20 != 0) { func_0x00400b50(lStack_20); } return; }
['gcc']
12,790
void CWE78_OS_Command_Injection__char_console_popen_18_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118536/CWE78_OS_Command_Injection__char_console_popen_18.c
CWE78_OS_Command_Injection__char_console_popen_18_good
void CWE78_OS_Command_Injection__char_console_popen_18_good(void) { goodG2B(); return; }
['gcc']
12,791
void CWE78_OS_Command_Injection__char_console_popen_21_bad() { char * data; char data_buf[100] = FULL_COMMAND; data = data_buf; badStatic = 1; /* true */ data = badSource(data); { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, "wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* true */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118537/CWE78_OS_Command_Injection__char_console_popen_21.c
CWE78_OS_Command_Injection__char_console_popen_21_bad
void CWE78_OS_Command_Injection__char_console_popen_21_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; badStatic = 1; puStack_10 = (undefined8 *)badSource(puStack_10); lStack_18 = func_0x00400be0(puStack_10,&UNK_00401403); if (lStack_18 != 0) { func_0x00400b50(lStack_18); } return; }
['gcc']
12,792
void CWE78_OS_Command_Injection__char_console_popen_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118537/CWE78_OS_Command_Injection__char_console_popen_21.c
CWE78_OS_Command_Injection__char_console_popen_21_good
void CWE78_OS_Command_Injection__char_console_popen_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,793
void CWE78_OS_Command_Injection__char_console_popen_22_bad() { char * data; char data_buf[100] = FULL_COMMAND; data = data_buf; CWE78_OS_Command_Injection__char_console_popen_22_badGlobal = 1; /* true */ data = CWE78_OS_Command_Injection__char_console_popen_22_badSource(data); { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, "wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* true */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118538/CWE78_OS_Command_Injection__char_console_popen_22a.c
CWE78_OS_Command_Injection__char_console_popen_22_bad
void CWE78_OS_Command_Injection__char_console_popen_22_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; CWE78_OS_Command_Injection__char_console_popen_22_badGlobal = 1; puStack_10 = (undefined8 *)CWE78_OS_Command_Injection__char_console_popen_22_badSource(puStack_10) ; lStack_18 = func_0x00400be0(puStack_10,&UNK_004013f4); if (lStack_18 != 0) { func_0x00400b50(lStack_18); } return; }
['gcc']
12,794
void CWE78_OS_Command_Injection__char_console_popen_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118538/CWE78_OS_Command_Injection__char_console_popen_22a.c
CWE78_OS_Command_Injection__char_console_popen_22_good
void CWE78_OS_Command_Injection__char_console_popen_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,795
char * CWE78_OS_Command_Injection__char_console_popen_22_badSource(char * data) { if(CWE78_OS_Command_Injection__char_console_popen_22_badGlobal) { { /* 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/118538/CWE78_OS_Command_Injection__char_console_popen_22b.c
CWE78_OS_Command_Injection__char_console_popen_22_badSource
long CWE78_OS_Command_Injection__char_console_popen_22_badSource(long param_1) { long lVar1; long lVar2; if (CWE78_OS_Command_Injection__char_console_popen_22_badGlobal != 0) { lVar1 = func_0x00400b30(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400b80(param_1 + lVar1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_004013f4); *(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,796
char * CWE78_OS_Command_Injection__char_console_popen_22_goodG2B1Source(char * data) { if(CWE78_OS_Command_Injection__char_console_popen_22_goodG2B1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Append a fixed string to data (not user / external input) */ strcat(data, "*.*"); } return data; }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118538/CWE78_OS_Command_Injection__char_console_popen_22b.c
CWE78_OS_Command_Injection__char_console_popen_22_goodG2B1Source
char * CWE78_OS_Command_Injection__char_console_popen_22_goodG2B1Source(char *param_1) { char cVar1; ulong uVar2; char *pcVar3; if (CWE78_OS_Command_Injection__char_console_popen_22_goodG2B1Global == 0) { 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; } else { printLine(&UNK_00401394); } return param_1; }
['gcc']
12,797
char * CWE78_OS_Command_Injection__char_console_popen_22_goodG2B2Source(char * data) { if(CWE78_OS_Command_Injection__char_console_popen_22_goodG2B2Global) { /* 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/118538/CWE78_OS_Command_Injection__char_console_popen_22b.c
CWE78_OS_Command_Injection__char_console_popen_22_goodG2B2Source
char * CWE78_OS_Command_Injection__char_console_popen_22_goodG2B2Source(char *param_1) { char cVar1; ulong uVar2; char *pcVar3; if (CWE78_OS_Command_Injection__char_console_popen_22_goodG2B2Global != 0) { 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,798
void CWE78_OS_Command_Injection__char_console_popen_31_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'; } } } { char * dataCopy = data; char * data = dataCopy; { 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/118539/CWE78_OS_Command_Injection__char_console_popen_31.c
CWE78_OS_Command_Injection__char_console_popen_31_bad
void CWE78_OS_Command_Injection__char_console_popen_31_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; long lStack_30; 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) { 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_20 = puStack_10; puStack_28 = puStack_10; lStack_30 = func_0x00400be0(puStack_10,&UNK_004013e3); if (lStack_30 != 0) { func_0x00400b50(lStack_30); } return; }
['gcc']
12,799
void CWE78_OS_Command_Injection__char_console_popen_31_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118539/CWE78_OS_Command_Injection__char_console_popen_31.c
CWE78_OS_Command_Injection__char_console_popen_31_good
void CWE78_OS_Command_Injection__char_console_popen_31_good(void) { goodG2B(); return; }
['gcc']