Unnamed: 0
int64
0
56k
source_code
stringlengths
55
5.98k
comments
stringlengths
2
1.76k
label
stringclasses
68 values
dataset_name
stringclasses
1 value
file_name
stringlengths
208
265
function
stringlengths
27
87
decompiled_code
stringlengths
68
3.97k
compiler_options
stringclasses
1 value
14,900
void CWE78_OS_Command_Injection__wchar_t_file_execlp_68_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } CWE78_OS_Command_Injection__wchar_t_file_execlp_68_badData = data; CWE78_OS_Command_Injection__wchar_t_file_execlp_68b_badSink(); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121871/CWE78_OS_Command_Injection__wchar_t_file_execlp_68a.c
CWE78_OS_Command_Injection__wchar_t_file_execlp_68_bad
void CWE78_OS_Command_Injection__wchar_t_file_execlp_68_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 auStack_1a8 [49]; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0; uStack_1b0 = 0; puVar2 = auStack_1a8; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; lStack_18 = func_0x00400b60(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013b6,&UNK_004013b4); if (lStack_20 != 0) { lVar1 = func_0x00400b10(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013c4); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b40(lStack_20); } } CWE78_OS_Command_Injection__wchar_t_file_execlp_68_badData = puStack_10; CWE78_OS_Command_Injection__wchar_t_file_execlp_68b_badSink(); return; }
['gcc']
14,901
void CWE78_OS_Command_Injection__wchar_t_file_execlp_68_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121871/CWE78_OS_Command_Injection__wchar_t_file_execlp_68a.c
CWE78_OS_Command_Injection__wchar_t_file_execlp_68_good
void CWE78_OS_Command_Injection__wchar_t_file_execlp_68_good(void) { goodG2B(); return; }
['gcc']
14,902
void CWE78_OS_Command_Injection__wchar_t_file_execlp_68b_badSink() { wchar_t * data = CWE78_OS_Command_Injection__wchar_t_file_execlp_68_badData; /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121871/CWE78_OS_Command_Injection__wchar_t_file_execlp_68b.c
CWE78_OS_Command_Injection__wchar_t_file_execlp_68b_badSink
void CWE78_OS_Command_Injection__wchar_t_file_execlp_68b_badSink(void) { func_0x00400bf0(&UNK_004013d0,&UNK_004013d0,&UNK_004013c4,&UNK_004013b4, CWE78_OS_Command_Injection__wchar_t_file_execlp_68_badData,0); return; }
['gcc']
14,903
void CWE78_OS_Command_Injection__wchar_t_file_execlp_68b_goodG2BSink() { wchar_t * data = CWE78_OS_Command_Injection__wchar_t_file_execlp_68_goodG2BData; /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121871/CWE78_OS_Command_Injection__wchar_t_file_execlp_68b.c
CWE78_OS_Command_Injection__wchar_t_file_execlp_68b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_file_execlp_68b_goodG2BSink(void) { func_0x00400ad0(&UNK_00401230,&UNK_00401230,&UNK_00401224,&UNK_00401214, CWE78_OS_Command_Injection__wchar_t_file_execlp_68_goodG2BData,0); return; }
['gcc']
14,904
void CWE78_OS_Command_Injection__wchar_t_file_popen_01_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121879/CWE78_OS_Command_Injection__wchar_t_file_popen_01.c
CWE78_OS_Command_Injection__wchar_t_file_popen_01_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_01_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; lStack_18 = func_0x00400b90(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400c30(&UNK_00401436,&UNK_00401434); if (lStack_20 != 0) { lVar1 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_00401444); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } } lStack_28 = func_0x00400c20(puStack_10,&UNK_00401454); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,905
void CWE78_OS_Command_Injection__wchar_t_file_popen_01_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121879/CWE78_OS_Command_Injection__wchar_t_file_popen_01.c
CWE78_OS_Command_Injection__wchar_t_file_popen_01_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_01_good(void) { goodG2B(); return; }
['gcc']
14,906
void CWE78_OS_Command_Injection__wchar_t_file_popen_02_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(1) { { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121880/CWE78_OS_Command_Injection__wchar_t_file_popen_02.c
CWE78_OS_Command_Injection__wchar_t_file_popen_02_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_02_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; lStack_18 = func_0x00400b90(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400c30(&UNK_00401436,&UNK_00401434); if (lStack_20 != 0) { lVar1 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_00401444); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } } lStack_28 = func_0x00400c20(puStack_10,&UNK_00401454); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,907
void CWE78_OS_Command_Injection__wchar_t_file_popen_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121880/CWE78_OS_Command_Injection__wchar_t_file_popen_02.c
CWE78_OS_Command_Injection__wchar_t_file_popen_02_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,908
void CWE78_OS_Command_Injection__wchar_t_file_popen_03_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(5==5) { { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121881/CWE78_OS_Command_Injection__wchar_t_file_popen_03.c
CWE78_OS_Command_Injection__wchar_t_file_popen_03_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_03_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; lStack_18 = func_0x00400b90(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400c30(&UNK_00401436,&UNK_00401434); if (lStack_20 != 0) { lVar1 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_00401444); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } } lStack_28 = func_0x00400c20(puStack_10,&UNK_00401454); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,909
void CWE78_OS_Command_Injection__wchar_t_file_popen_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121881/CWE78_OS_Command_Injection__wchar_t_file_popen_03.c
CWE78_OS_Command_Injection__wchar_t_file_popen_03_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,910
void CWE78_OS_Command_Injection__wchar_t_file_popen_04_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(STATIC_CONST_TRUE) { { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121882/CWE78_OS_Command_Injection__wchar_t_file_popen_04.c
CWE78_OS_Command_Injection__wchar_t_file_popen_04_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_04_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; lStack_18 = func_0x00400b90(puStack_10); if ((1 < 100U - lStack_18) && (lStack_20 = func_0x00400c30(&UNK_0040143e,&UNK_0040143c), lStack_20 != 0)) { lVar1 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_0040144c); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } lStack_28 = func_0x00400c20(puStack_10,&UNK_0040145c); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,911
void CWE78_OS_Command_Injection__wchar_t_file_popen_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121882/CWE78_OS_Command_Injection__wchar_t_file_popen_04.c
CWE78_OS_Command_Injection__wchar_t_file_popen_04_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,912
void CWE78_OS_Command_Injection__wchar_t_file_popen_05_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(staticTrue) { { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121883/CWE78_OS_Command_Injection__wchar_t_file_popen_05.c
CWE78_OS_Command_Injection__wchar_t_file_popen_05_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_05_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; if (staticTrue != 0) { lStack_18 = func_0x00400b90(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400c30(&UNK_00401446,&UNK_00401444); if (lStack_20 != 0) { lVar1 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_00401454); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } } } lStack_28 = func_0x00400c20(puStack_10,&UNK_00401464); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,913
void CWE78_OS_Command_Injection__wchar_t_file_popen_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121883/CWE78_OS_Command_Injection__wchar_t_file_popen_05.c
CWE78_OS_Command_Injection__wchar_t_file_popen_05_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,914
void CWE78_OS_Command_Injection__wchar_t_file_popen_06_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(STATIC_CONST_FIVE==5) { { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121884/CWE78_OS_Command_Injection__wchar_t_file_popen_06.c
CWE78_OS_Command_Injection__wchar_t_file_popen_06_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_06_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; lStack_18 = func_0x00400b90(puStack_10); if ((1 < 100U - lStack_18) && (lStack_20 = func_0x00400c30(&UNK_0040144a,&UNK_00401448), lStack_20 != 0)) { lVar1 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_00401458); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } lStack_28 = func_0x00400c20(puStack_10,&UNK_00401468); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,915
void CWE78_OS_Command_Injection__wchar_t_file_popen_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121884/CWE78_OS_Command_Injection__wchar_t_file_popen_06.c
CWE78_OS_Command_Injection__wchar_t_file_popen_06_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,916
void CWE78_OS_Command_Injection__wchar_t_file_popen_07_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(staticFive==5) { { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121885/CWE78_OS_Command_Injection__wchar_t_file_popen_07.c
CWE78_OS_Command_Injection__wchar_t_file_popen_07_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_07_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; if (staticFive == 5) { lStack_18 = func_0x00400b90(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400c30(&UNK_00401446,&UNK_00401444); if (lStack_20 != 0) { lVar1 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_00401454); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } } } lStack_28 = func_0x00400c20(puStack_10,&UNK_00401464); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,917
void CWE78_OS_Command_Injection__wchar_t_file_popen_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121885/CWE78_OS_Command_Injection__wchar_t_file_popen_07.c
CWE78_OS_Command_Injection__wchar_t_file_popen_07_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,918
void CWE78_OS_Command_Injection__wchar_t_file_popen_08_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(staticReturnsTrue()) { { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121886/CWE78_OS_Command_Injection__wchar_t_file_popen_08.c
CWE78_OS_Command_Injection__wchar_t_file_popen_08_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_08_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar3 = auStack_178; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1b8; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400b90(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400c30(&UNK_00401456,&UNK_00401454); if (lStack_20 != 0) { lVar2 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar2 == 0) { printLine(&UNK_00401464); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } } } lStack_28 = func_0x00400c20(puStack_10,&UNK_00401474); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,919
void CWE78_OS_Command_Injection__wchar_t_file_popen_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121886/CWE78_OS_Command_Injection__wchar_t_file_popen_08.c
CWE78_OS_Command_Injection__wchar_t_file_popen_08_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,920
void CWE78_OS_Command_Injection__wchar_t_file_popen_09_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(GLOBAL_CONST_TRUE) { { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121887/CWE78_OS_Command_Injection__wchar_t_file_popen_09.c
CWE78_OS_Command_Injection__wchar_t_file_popen_09_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_09_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; if (GLOBAL_CONST_TRUE != 0) { lStack_18 = func_0x00400b90(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400c30(&UNK_00401446,&UNK_00401444); if (lStack_20 != 0) { lVar1 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_00401454); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } } } lStack_28 = func_0x00400c20(puStack_10,&UNK_00401464); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,921
void CWE78_OS_Command_Injection__wchar_t_file_popen_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121887/CWE78_OS_Command_Injection__wchar_t_file_popen_09.c
CWE78_OS_Command_Injection__wchar_t_file_popen_09_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,922
void CWE78_OS_Command_Injection__wchar_t_file_popen_10_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalTrue) { { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121888/CWE78_OS_Command_Injection__wchar_t_file_popen_10.c
CWE78_OS_Command_Injection__wchar_t_file_popen_10_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_10_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar2 = auStack_178; for (lVar1 = 0x2a; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1b8; if (globalTrue != 0) { lStack_18 = func_0x00400b90(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400c30(&UNK_00401446,&UNK_00401444); if (lStack_20 != 0) { lVar1 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_00401454); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } } } lStack_28 = func_0x00400c20(puStack_10,&UNK_00401464); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,923
void CWE78_OS_Command_Injection__wchar_t_file_popen_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121888/CWE78_OS_Command_Injection__wchar_t_file_popen_10.c
CWE78_OS_Command_Injection__wchar_t_file_popen_10_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,924
void CWE78_OS_Command_Injection__wchar_t_file_popen_11_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; if(globalReturnsTrue()) { { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } } { FILE *pipe; /* POTENTIAL FLAW: Execute command in data possibly leading to command injection */ pipe = POPEN(data, L"wb"); if (pipe != NULL) { PCLOSE(pipe); } } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgetws fails */', '/* POTENTIAL FLAW: Execute command in data possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121889/CWE78_OS_Command_Injection__wchar_t_file_popen_11.c
CWE78_OS_Command_Injection__wchar_t_file_popen_11_bad
void CWE78_OS_Command_Injection__wchar_t_file_popen_11_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined8 uStack_1b8; undefined8 uStack_1b0; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 uStack_198; undefined8 uStack_190; undefined8 uStack_188; undefined8 uStack_180; undefined8 auStack_178 [42]; long lStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_1b8 = 0x620000002f; uStack_1b0 = 0x6e00000069; uStack_1a8 = 0x730000002f; uStack_1a0 = 0x2000000068; uStack_198 = 0x730000006c; uStack_190 = 0x2d00000020; uStack_188 = 0x610000006c; uStack_180 = 0x20; puVar3 = auStack_178; for (lVar2 = 0x2a; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_10 = &uStack_1b8; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400b90(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400c30(&UNK_00401446,&UNK_00401444); if (lStack_20 != 0) { lVar2 = func_0x00400b40(lStack_18 * 4 + (long)puStack_10,100 - (int)lStack_18,lStack_20); if (lVar2 == 0) { printLine(&UNK_00401454); *(undefined4 *)((long)puStack_10 + lStack_18 * 4) = 0; } func_0x00400b70(lStack_20); } } } lStack_28 = func_0x00400c20(puStack_10,&UNK_00401464); if (lStack_28 != 0) { func_0x00400ba0(lStack_28); } return; }
['gcc']
14,925
void CWE78_OS_Command_Injection__wchar_t_file_popen_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/121889/CWE78_OS_Command_Injection__wchar_t_file_popen_11.c
CWE78_OS_Command_Injection__wchar_t_file_popen_11_good
void CWE78_OS_Command_Injection__wchar_t_file_popen_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,926
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_18_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; goto source; source: { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122280/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_18.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_18_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_18_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } func_0x00400da0(&UNK_00401688,&UNK_00401688,&UNK_00401678,&UNK_00401668,puStack_18,0); return; }
['gcc']
14,927
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_18_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122280/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_18.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_18_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_18_good(void) { goodG2B(); return; }
['gcc']
14,928
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_21_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; badStatic = 1; /* true */ data = badSource(data); /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* true */', '/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122281/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_21.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_21_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_21_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [49]; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; badStatic = 1; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400da0(&UNK_004016b8,&UNK_004016b8,&UNK_004016a8,&UNK_00401698,puStack_10,0); return; }
['gcc']
14,929
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122281/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_21.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_21_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,930
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_badGlobal = 1; /* true */ data = CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_badSource(data); /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* true */', '/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122282/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [49]; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_badGlobal = 1; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_badSource(puStack_10); func_0x00400da0(&UNK_004016b8,&UNK_004016b8,&UNK_004016a8,&UNK_00401698,puStack_10,0); return; }
['gcc']
14,931
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122282/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,932
wchar_t * CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_badSource(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_badGlobal) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } return data; }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122282/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_badSource
long CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_badSource(long param_1) { int iVar1; undefined2 uStack_38; undefined2 uStack_36; undefined4 uStack_34; undefined4 *puStack_28; int iStack_1c; long lStack_18; int iStack_10; int iStack_c; if (CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_badGlobal != 0) { iStack_10 = 0xffffffff; iStack_c = -1; lStack_18 = func_0x00400cc0(param_1); iStack_10 = func_0x00400dd0(2,1,6); if (iStack_10 != -1) { func_0x00400cd0(&uStack_38,0,0x10); uStack_38 = 2; uStack_34 = 0; uStack_36 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_10,&uStack_38,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_10,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_10,0,0), iStack_c != -1)) && ((iStack_1c = func_0x00400c70(iStack_c,lStack_18 * 4 + param_1,(99 - lStack_18) * 4,0), iStack_1c != -1 && (iStack_1c != 0)))) { *(undefined4 *)(param_1 + (lStack_18 + ((ulong)(long)iStack_1c >> 2)) * 4) = 0; puStack_28 = (undefined4 *)func_0x00400d80(param_1,0xd); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } puStack_28 = (undefined4 *)func_0x00400d80(param_1,10); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } } } if (iStack_10 != -1) { func_0x00400ce0(iStack_10); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } } return param_1; }
['gcc']
14,933
wchar_t * CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_goodG2B1Source(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_goodG2B1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } return data; }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122282/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_goodG2B1Source
undefined8 CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_goodG2B1Source(undefined8 param_1) { if (CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_goodG2B1Global == 0) { func_0x00400a20(param_1,&UNK_004012fc); } else { printLine(&UNK_004012e4); } return param_1; }
['gcc']
14,934
wchar_t * CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_goodG2B2Source(wchar_t * data) { if(CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_goodG2B2Global) { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } return data; }
['/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122282/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_goodG2B2Source
undefined8 CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_goodG2B2Source(undefined8 param_1) { if (CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_22_goodG2B2Global != 0) { func_0x00400a20(param_1,&UNK_004012fc); } return param_1; }
['gcc']
14,935
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_31_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } { wchar_t * dataCopy = data; wchar_t * data = dataCopy; /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); } }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122283/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_31.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_31_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_31_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1e8; undefined2 uStack_1e6; undefined4 uStack_1e4; undefined8 uStack_1d8; undefined8 uStack_1d0; undefined8 auStack_1c8 [48]; undefined8 *puStack_48; undefined8 *puStack_40; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1d8 = 0; uStack_1d0 = 0; puVar3 = auStack_1c8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1d8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1e8,0,0x10); uStack_1e8 = 2; uStack_1e4 = 0; uStack_1e6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1e8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } puStack_40 = puStack_18; puStack_48 = puStack_18; func_0x00400da0(&UNK_00401698,&UNK_00401698,&UNK_00401688,&UNK_00401678,puStack_18,0); return; }
['gcc']
14,936
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_31_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122283/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_31.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_31_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_31_good(void) { goodG2B(); return; }
['gcc']
14,937
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_32_bad() { wchar_t * data; wchar_t * *dataPtr1 = &data; wchar_t * *dataPtr2 = &data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { wchar_t * data = *dataPtr1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } *dataPtr1 = data; } { wchar_t * data = *dataPtr2; /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); } }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122284/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_32.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_32_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_32_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1f8; undefined2 uStack_1f6; undefined4 uStack_1f4; undefined8 uStack_1e8; undefined8 uStack_1e0; undefined8 auStack_1d8 [48]; undefined8 *puStack_58; undefined8 *puStack_50; undefined4 *puStack_48; int iStack_3c; long lStack_38; int iStack_2c; undefined8 *puStack_28; undefined8 **ppuStack_20; undefined8 **ppuStack_18; int iStack_c; ppuStack_18 = &puStack_58; ppuStack_20 = &puStack_58; uStack_1e8 = 0; uStack_1e0 = 0; puVar3 = auStack_1d8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_58 = &uStack_1e8; puStack_28 = *ppuStack_18; iStack_2c = 0xffffffff; iStack_c = -1; lStack_38 = func_0x00400cc0(puStack_28); iStack_2c = func_0x00400dd0(2,1,6); if (iStack_2c != -1) { func_0x00400cd0(&uStack_1f8,0,0x10); uStack_1f8 = 2; uStack_1f4 = 0; uStack_1f6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_2c,&uStack_1f8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_2c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_2c,0,0), iStack_c != -1)) && ((iStack_3c = func_0x00400c70(iStack_c,lStack_38 * 4 + (long)puStack_28,(99 - lStack_38) * 4, 0), iStack_3c != -1 && (iStack_3c != 0)))) { *(undefined4 *)((long)puStack_28 + (lStack_38 + ((ulong)(long)iStack_3c >> 2)) * 4) = 0; puStack_48 = (undefined4 *)func_0x00400d80(puStack_28,0xd); if (puStack_48 != (undefined4 *)0x0) { *puStack_48 = 0; } puStack_48 = (undefined4 *)func_0x00400d80(puStack_28,10); if (puStack_48 != (undefined4 *)0x0) { *puStack_48 = 0; } } } if (iStack_2c != -1) { func_0x00400ce0(iStack_2c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } *ppuStack_18 = puStack_28; puStack_50 = *ppuStack_20; func_0x00400da0(&UNK_004016b8,&UNK_004016b8,&UNK_004016a8,&UNK_00401698,puStack_50,0); return; }
['gcc']
14,938
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122284/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_32.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_32_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_32_good(void) { goodG2B(); return; }
['gcc']
14,939
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_34_bad() { wchar_t * data; CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_34_unionType myUnion; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } myUnion.unionFirst = data; { wchar_t * data = myUnion.unionSecond; /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); } }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122286/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_34.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_34_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_34_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1e8; undefined2 uStack_1e6; undefined4 uStack_1e4; undefined8 uStack_1d8; undefined8 uStack_1d0; undefined8 auStack_1c8 [48]; undefined8 *puStack_48; undefined8 *puStack_40; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1d8 = 0; uStack_1d0 = 0; puVar3 = auStack_1c8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1d8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1e8,0,0x10); uStack_1e8 = 2; uStack_1e4 = 0; uStack_1e6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1e8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } puStack_48 = puStack_18; puStack_40 = puStack_18; func_0x00400da0(&UNK_00401698,&UNK_00401698,&UNK_00401688,&UNK_00401678,puStack_18,0); return; }
['gcc']
14,940
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_34_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122286/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_34.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_34_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_34_good(void) { goodG2B(); return; }
['gcc']
14,941
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_badSink(wchar_t * data) { /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122287/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_badSink(undefined8 param_1) { func_0x00400da0(&UNK_004016a8,&UNK_004016a8,&UNK_00401698,&UNK_00401688,param_1,0); return; }
['gcc']
14,942
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_badSink(data); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122287/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_badSink(puStack_18); return; }
['gcc']
14,943
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_goodG2BSink(wchar_t * data) { /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122287/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401228,&UNK_00401228,&UNK_00401218,&UNK_00401208,param_1,0); return; }
['gcc']
14,944
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122287/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_41_good(void) { goodG2B(); return; }
['gcc']
14,945
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_42_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; data = badSource(data); /* wexecl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexecl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122288/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_42.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_42_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_42_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [49]; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400da0(&UNK_00401698,&UNK_00401698,&UNK_00401688,&UNK_00401678,puStack_10,0); return; }
['gcc']
14,946
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_42_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122288/CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_42.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_42_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execl_42_good(void) { goodG2B(); return; }
['gcc']
14,947
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_10_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalTrue) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122320/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_10.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_10_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_10_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; if (globalTrue != 0) { iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18, (99 - lStack_28) * 4,0), iStack_2c != -1 && (iStack_2c != 0)) )) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } } func_0x00400da0(&UNK_00401690,&UNK_00401690,&UNK_00401684,&UNK_00401674,puStack_18,0); return; }
['gcc']
14,948
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122320/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_10.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_10_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,949
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_11_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalReturnsTrue()) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122321/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_11.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_11_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_11_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18, (99 - lStack_28) * 4,0), iStack_2c != -1 && (iStack_2c != 0)) )) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } } func_0x00400da0(&UNK_00401690,&UNK_00401690,&UNK_00401684,&UNK_00401674,puStack_18,0); return; }
['gcc']
14,950
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122321/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_11.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_11_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,951
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_12_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalReturnsTrueOrFalse()) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } else { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* FIX: Append a fixed string to data (not user / external input) */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122322/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_12.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_12_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_12_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { func_0x00400cb0(puStack_18,&UNK_004016d4); } else { iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400d10(puStack_18); iStack_1c = func_0x00400e20(2,1,6); if (iStack_1c != -1) { func_0x00400d20(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400cf0(0x6987); iVar1 = func_0x00400dc0(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400db0(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400de0(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400cc0(iStack_c,lStack_28 * 4 + (long)puStack_18, (99 - lStack_28) * 4,0), iStack_2c != -1 && (iStack_2c != 0)) )) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400dd0(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400dd0(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400d30(iStack_1c); } if (iStack_c != -1) { func_0x00400d30(iStack_c); } } func_0x00400df0(&UNK_00401700,&UNK_00401700,&UNK_004016f4,&UNK_004016e4,puStack_18,0); return; }
['gcc']
14,952
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122322/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_12.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_12_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_12_good(void) { goodG2B(); return; }
['gcc']
14,953
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_13_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(GLOBAL_CONST_FIVE==5) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122323/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_13.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_13_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_13_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; if (GLOBAL_CONST_FIVE == 5) { iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18, (99 - lStack_28) * 4,0), iStack_2c != -1 && (iStack_2c != 0)) )) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } } func_0x00400da0(&UNK_00401690,&UNK_00401690,&UNK_00401684,&UNK_00401674,puStack_18,0); return; }
['gcc']
14,954
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122323/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_13.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_13_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,955
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_14_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; if(globalFive==5) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122324/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_14.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_14_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_14_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; if (globalFive == 5) { iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18, (99 - lStack_28) * 4,0), iStack_2c != -1 && (iStack_2c != 0)) )) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } } func_0x00400da0(&UNK_00401690,&UNK_00401690,&UNK_00401684,&UNK_00401674,puStack_18,0); return; }
['gcc']
14,956
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122324/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_14.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_14_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,957
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_15_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; switch(6) { case 6: { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122325/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_15.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_15_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_15_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } func_0x00400da0(&UNK_00401680,&UNK_00401680,&UNK_00401674,&UNK_00401664,puStack_18,0); return; }
['gcc']
14,958
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122325/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_15.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_15_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,959
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_16_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; while(1) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } break; } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122326/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_16.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_16_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_16_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } func_0x00400da0(&UNK_00401680,&UNK_00401680,&UNK_00401674,&UNK_00401664,puStack_18,0); return; }
['gcc']
14,960
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122326/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_16.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_16_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_16_good(void) { goodG2B(); return; }
['gcc']
14,961
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_17_bad() { int i; wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; for(i = 0; i < 1; i++) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122327/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_17.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_17_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_17_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_10; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { iStack_1c = 0xffffffff; iStack_10 = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_10 = func_0x00400d90(iStack_1c,0,0), iStack_10 != -1)) && ((iStack_2c = func_0x00400c70(iStack_10,lStack_28 * 4 + (long)puStack_18, (99 - lStack_28) * 4,0), iStack_2c != -1 && (iStack_2c != 0)) )) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_10 != -1) { func_0x00400ce0(iStack_10); } } func_0x00400da0(&UNK_004016a0,&UNK_004016a0,&UNK_00401694,&UNK_00401684,puStack_18,0); return; }
['gcc']
14,962
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122327/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_17.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_17_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_17_good(void) { goodG2B(); return; }
['gcc']
14,963
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_18_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; goto source; source: { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122328/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_18.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_18_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_18_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } func_0x00400da0(&UNK_00401680,&UNK_00401680,&UNK_00401674,&UNK_00401664,puStack_18,0); return; }
['gcc']
14,964
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_18_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122328/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_18.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_18_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_18_good(void) { goodG2B(); return; }
['gcc']
14,965
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_21_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; badStatic = 1; /* true */ data = badSource(data); /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* true */', '/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122329/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_21.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_21_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_21_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [49]; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; badStatic = 1; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400da0(&UNK_004016b0,&UNK_004016b0,&UNK_004016a4,&UNK_00401694,puStack_10,0); return; }
['gcc']
14,966
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122329/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_21.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_21_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
14,967
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51b_badSink(data); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122340/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51b_badSink(puStack_18); return; }
['gcc']
14,968
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122340/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51_good(void) { goodG2B(); return; }
['gcc']
14,969
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51b_badSink(wchar_t * data) { /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122340/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51b_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51b_badSink(undefined8 param_1) { func_0x00400da0(&UNK_004016a0,&UNK_004016a0,&UNK_00401694,&UNK_00401684,param_1,0); return; }
['gcc']
14,970
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51b_goodG2BSink(wchar_t * data) { /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122340/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_51b_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401220,&UNK_00401220,&UNK_00401214,&UNK_00401204,param_1,0); return; }
['gcc']
14,971
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52b_badSink(data); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122341/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52b_badSink(puStack_18); return; }
['gcc']
14,972
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122341/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52_good(void) { goodG2B(); return; }
['gcc']
14,973
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52b_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122341/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52b_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c_badSink(param_1); return; }
['gcc']
14,974
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52b_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122341/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c_goodG2BSink(param_1); return; }
['gcc']
14,975
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c_badSink(wchar_t * data) { /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122341/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c_badSink(undefined8 param_1) { func_0x00400da0(&UNK_004016b0,&UNK_004016b0,&UNK_004016a4,&UNK_00401694,param_1,0); return; }
['gcc']
14,976
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c_goodG2BSink(wchar_t * data) { /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122341/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_52c_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401230,&UNK_00401230,&UNK_00401224,&UNK_00401214,param_1,0); return; }
['gcc']
14,977
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53b_badSink(data); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122342/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53b_badSink(puStack_18); return; }
['gcc']
14,978
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122342/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53_good(void) { goodG2B(); return; }
['gcc']
14,979
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53b_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122342/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53b_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c_badSink(param_1); return; }
['gcc']
14,980
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53b_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122342/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c_goodG2BSink(param_1); return; }
['gcc']
14,981
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122342/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d_badSink(param_1); return; }
['gcc']
14,982
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122342/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53c_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d_goodG2BSink(param_1); return; }
['gcc']
14,983
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d_badSink(wchar_t * data) { /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122342/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d_badSink(undefined8 param_1) { func_0x00400da0(&UNK_004016d0,&UNK_004016d0,&UNK_004016c4,&UNK_004016b4,param_1,0); return; }
['gcc']
14,984
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d_goodG2BSink(wchar_t * data) { /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122342/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_53d_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401250,&UNK_00401250,&UNK_00401244,&UNK_00401234,param_1,0); return; }
['gcc']
14,985
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54b_badSink(data); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122343/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [48]; undefined4 *puStack_38; int iStack_2c; long lStack_28; int iStack_1c; undefined8 *puStack_18; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_18 = &uStack_1c8; iStack_1c = 0xffffffff; iStack_c = -1; lStack_28 = func_0x00400cc0(puStack_18); iStack_1c = func_0x00400dd0(2,1,6); if (iStack_1c != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_1c,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_1c,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_1c,0,0), iStack_c != -1)) && ((iStack_2c = func_0x00400c70(iStack_c,lStack_28 * 4 + (long)puStack_18,(99 - lStack_28) * 4, 0), iStack_2c != -1 && (iStack_2c != 0)))) { *(undefined4 *)((long)puStack_18 + (lStack_28 + ((ulong)(long)iStack_2c >> 2)) * 4) = 0; puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,0xd); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } puStack_38 = (undefined4 *)func_0x00400d80(puStack_18,10); if (puStack_38 != (undefined4 *)0x0) { *puStack_38 = 0; } } } if (iStack_1c != -1) { func_0x00400ce0(iStack_1c); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54b_badSink(puStack_18); return; }
['gcc']
14,986
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122343/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54_good(void) { goodG2B(); return; }
['gcc']
14,987
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54b_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122343/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54b_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c_badSink(param_1); return; }
['gcc']
14,988
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54b_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122343/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54b_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c_goodG2BSink(param_1); return; }
['gcc']
14,989
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122343/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d_badSink(param_1); return; }
['gcc']
14,990
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122343/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54c_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d_goodG2BSink(param_1); return; }
['gcc']
14,991
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d_badSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122343/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e_badSink(param_1); return; }
['gcc']
14,992
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d_goodG2BSink(wchar_t * data) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122343/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54d_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e_goodG2BSink(param_1); return; }
['gcc']
14,993
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e_badSink(wchar_t * data) { /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122343/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e_badSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e_badSink(undefined8 param_1) { func_0x00400da0(&UNK_004016f0,&UNK_004016f0,&UNK_004016e4,&UNK_004016d4,param_1,0); return; }
['gcc']
14,994
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e_goodG2BSink(wchar_t * data) { /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122343/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e_goodG2BSink
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_54e_goodG2BSink(undefined8 param_1) { func_0x00400ad0(&UNK_00401270,&UNK_00401270,&UNK_00401264,&UNK_00401254,param_1,0); return; }
['gcc']
14,995
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; data = CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61b_badSource(data); /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* wexeclp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122344/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61_bad(void) { long lVar1; undefined8 *puVar2; undefined8 uStack_1a8; undefined8 uStack_1a0; undefined8 auStack_198 [49]; undefined8 *puStack_10; uStack_1a8 = 0; uStack_1a0 = 0; puVar2 = auStack_198; for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar2 = 0; puVar2 = puVar2 + 1; } puStack_10 = &uStack_1a8; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61b_badSource(puStack_10); func_0x00400da0(&UNK_00401690,&UNK_00401690,&UNK_00401684,&UNK_00401674,puStack_10,0); return; }
['gcc']
14,996
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122344/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61_good
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61_good(void) { goodG2B(); return; }
['gcc']
14,997
wchar_t * CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61b_badSource(wchar_t * data) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } return data; }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122344/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61b_badSource
long CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61b_badSource(long param_1) { int iVar1; undefined2 uStack_38; undefined2 uStack_36; undefined4 uStack_34; undefined4 *puStack_28; int iStack_1c; long lStack_18; int iStack_10; int iStack_c; iStack_10 = 0xffffffff; iStack_c = -1; lStack_18 = func_0x00400cc0(param_1); iStack_10 = func_0x00400dd0(2,1,6); if (iStack_10 != -1) { func_0x00400cd0(&uStack_38,0,0x10); uStack_38 = 2; uStack_34 = 0; uStack_36 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_10,&uStack_38,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_10,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_10,0,0), iStack_c != -1)) && ((iStack_1c = func_0x00400c70(iStack_c,lStack_18 * 4 + param_1,(99 - lStack_18) * 4,0), iStack_1c != -1 && (iStack_1c != 0)))) { *(undefined4 *)(param_1 + (lStack_18 + ((ulong)(long)iStack_1c >> 2)) * 4) = 0; puStack_28 = (undefined4 *)func_0x00400d80(param_1,0xd); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } puStack_28 = (undefined4 *)func_0x00400d80(param_1,10); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } } } if (iStack_10 != -1) { func_0x00400ce0(iStack_10); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } return param_1; }
['gcc']
14,998
wchar_t * CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61b_goodG2BSource(wchar_t * data) { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); return data; }
['/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122344/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61b.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61b_goodG2BSource
undefined8 CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_61b_goodG2BSource(undefined8 param_1) { func_0x00400a20(param_1,&UNK_00401204); return param_1; }
['gcc']
14,999
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_63_bad() { wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_63b_badSink(&data); }
['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/122346/CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_63a.c
CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_63_bad
void CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_63_bad(void) { int iVar1; long lVar2; undefined8 *puVar3; undefined2 uStack_1d8; undefined2 uStack_1d6; undefined4 uStack_1d4; undefined8 uStack_1c8; undefined8 uStack_1c0; undefined8 auStack_1b8 [49]; undefined8 *puStack_30; undefined4 *puStack_28; int iStack_1c; long lStack_18; int iStack_10; int iStack_c; uStack_1c8 = 0; uStack_1c0 = 0; puVar3 = auStack_1b8; for (lVar2 = 0x30; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar3 = 0; puVar3 = puVar3 + 1; } puStack_30 = &uStack_1c8; iStack_10 = 0xffffffff; iStack_c = -1; lStack_18 = func_0x00400cc0(puStack_30); iStack_10 = func_0x00400dd0(2,1,6); if (iStack_10 != -1) { func_0x00400cd0(&uStack_1d8,0,0x10); uStack_1d8 = 2; uStack_1d4 = 0; uStack_1d6 = func_0x00400ca0(0x6987); iVar1 = func_0x00400d70(iStack_10,&uStack_1d8,0x10); if ((((iVar1 != -1) && (iVar1 = func_0x00400d60(iStack_10,5), iVar1 != -1)) && (iStack_c = func_0x00400d90(iStack_10,0,0), iStack_c != -1)) && ((iStack_1c = func_0x00400c70(iStack_c,(long)puStack_30 + lStack_18 * 4,(99 - lStack_18) * 4, 0), iStack_1c != -1 && (iStack_1c != 0)))) { *(undefined4 *)((long)puStack_30 + (lStack_18 + ((ulong)(long)iStack_1c >> 2)) * 4) = 0; puStack_28 = (undefined4 *)func_0x00400d80(puStack_30,0xd); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } puStack_28 = (undefined4 *)func_0x00400d80(puStack_30,10); if (puStack_28 != (undefined4 *)0x0) { *puStack_28 = 0; } } } if (iStack_10 != -1) { func_0x00400ce0(iStack_10); } if (iStack_c != -1) { func_0x00400ce0(iStack_c); } CWE78_OS_Command_Injection__wchar_t_listen_socket_execlp_63b_badSink(&puStack_30); return; }
['gcc']