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 |
|---|---|---|---|---|---|---|---|---|
1,700
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_53c_badSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_53d_badSink(data);
}
|
[]
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102791/CWE426_Untrusted_Search_Path__wchar_t_popen_53c.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_53c_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_53c_badSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_53d_badSink(param_1);
return;
}
|
['gcc']
|
1,701
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_53c_goodG2BSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_53d_goodG2BSink(data);
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102791/CWE426_Untrusted_Search_Path__wchar_t_popen_53c.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_53c_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_53c_goodG2BSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_53d_goodG2BSink(param_1);
return;
}
|
['gcc']
|
1,702
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_53d_badSink(wchar_t * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Executing the wpopen() function without specifying the full path to the executable
* can allow an attacker to run their own program */
pipe = POPEN(data, L"wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
}
|
['/* POTENTIAL FLAW: Executing the wpopen() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102791/CWE426_Untrusted_Search_Path__wchar_t_popen_53d.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_53d_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_53d_badSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400b20(param_1,&UNK_00401274);
if (lVar1 != 0) {
func_0x00400a90(lVar1);
}
return;
}
|
['gcc']
|
1,703
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_53d_goodG2BSink(wchar_t * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Executing the wpopen() function without specifying the full path to the executable
* can allow an attacker to run their own program */
pipe = POPEN(data, L"wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
}
|
['/* POTENTIAL FLAW: Executing the wpopen() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102791/CWE426_Untrusted_Search_Path__wchar_t_popen_53d.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_53d_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_53d_goodG2BSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400b20(param_1,&UNK_00401284);
if (lVar1 != 0) {
func_0x00400a90(lVar1);
}
return;
}
|
['gcc']
|
1,704
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
/* FLAW: the full path is not specified */
wcscpy(data, BAD_OS_COMMAND);
CWE426_Untrusted_Search_Path__wchar_t_popen_54b_badSink(data);
}
|
['/* FLAW: the full path is not specified */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102792/CWE426_Untrusted_Search_Path__wchar_t_popen_54a.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_54_bad
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54_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;
func_0x00400ad0(puStack_10,&UNK_00401284);
CWE426_Untrusted_Search_Path__wchar_t_popen_54b_badSink(puStack_10);
return;
}
|
['gcc']
|
1,705
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102792/CWE426_Untrusted_Search_Path__wchar_t_popen_54a.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_54_good
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,706
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54b_badSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54c_badSink(data);
}
|
[]
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102792/CWE426_Untrusted_Search_Path__wchar_t_popen_54b.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_54b_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54b_badSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54c_badSink(param_1);
return;
}
|
['gcc']
|
1,707
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54b_goodG2BSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54c_goodG2BSink(data);
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102792/CWE426_Untrusted_Search_Path__wchar_t_popen_54b.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_54b_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54b_goodG2BSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54c_goodG2BSink(param_1);
return;
}
|
['gcc']
|
1,708
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54c_badSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54d_badSink(data);
}
|
[]
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102792/CWE426_Untrusted_Search_Path__wchar_t_popen_54c.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_54c_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54c_badSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54d_badSink(param_1);
return;
}
|
['gcc']
|
1,709
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54c_goodG2BSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54d_goodG2BSink(data);
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102792/CWE426_Untrusted_Search_Path__wchar_t_popen_54c.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_54c_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54c_goodG2BSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54d_goodG2BSink(param_1);
return;
}
|
['gcc']
|
1,710
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54d_badSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54e_badSink(data);
}
|
[]
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102792/CWE426_Untrusted_Search_Path__wchar_t_popen_54d.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_54d_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54d_badSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54e_badSink(param_1);
return;
}
|
['gcc']
|
1,711
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54d_goodG2BSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54e_goodG2BSink(data);
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102792/CWE426_Untrusted_Search_Path__wchar_t_popen_54d.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_54d_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54d_goodG2BSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_popen_54e_goodG2BSink(param_1);
return;
}
|
['gcc']
|
1,712
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54e_badSink(wchar_t * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Executing the wpopen() function without specifying the full path to the executable
* can allow an attacker to run their own program */
pipe = POPEN(data, L"wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
}
|
['/* POTENTIAL FLAW: Executing the wpopen() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102792/CWE426_Untrusted_Search_Path__wchar_t_popen_54e.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_54e_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54e_badSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400b20(param_1,&UNK_00401284);
if (lVar1 != 0) {
func_0x00400a90(lVar1);
}
return;
}
|
['gcc']
|
1,713
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54e_goodG2BSink(wchar_t * data)
{
{
FILE *pipe;
/* POTENTIAL FLAW: Executing the wpopen() function without specifying the full path to the executable
* can allow an attacker to run their own program */
pipe = POPEN(data, L"wb");
if (pipe != NULL)
{
PCLOSE(pipe);
}
}
}
|
['/* POTENTIAL FLAW: Executing the wpopen() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102792/CWE426_Untrusted_Search_Path__wchar_t_popen_54e.c
|
CWE426_Untrusted_Search_Path__wchar_t_popen_54e_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_popen_54e_goodG2BSink(undefined8 param_1)
{
long lVar1;
lVar1 = func_0x00400b20(param_1,&UNK_004012a4);
if (lVar1 != 0) {
func_0x00400a90(lVar1);
}
return;
}
|
['gcc']
|
1,714
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
/* FLAW: the full path is not specified */
wcscpy(data, BAD_OS_COMMAND);
CWE426_Untrusted_Search_Path__wchar_t_system_52b_badSink(data);
}
|
['/* FLAW: the full path is not specified */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102838/CWE426_Untrusted_Search_Path__wchar_t_system_52a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_52_bad
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52_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;
func_0x00400ad0(puStack_10,&UNK_00401254);
CWE426_Untrusted_Search_Path__wchar_t_system_52b_badSink(puStack_10);
return;
}
|
['gcc']
|
1,715
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102838/CWE426_Untrusted_Search_Path__wchar_t_system_52a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_52_good
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,716
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52b_badSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_52c_badSink(data);
}
|
[]
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102838/CWE426_Untrusted_Search_Path__wchar_t_system_52b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_52b_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52b_badSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_52c_badSink(param_1);
return;
}
|
['gcc']
|
1,717
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52b_goodG2BSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_52c_goodG2BSink(data);
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102838/CWE426_Untrusted_Search_Path__wchar_t_system_52b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_52b_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52b_goodG2BSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_52c_goodG2BSink(param_1);
return;
}
|
['gcc']
|
1,718
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52c_badSink(wchar_t * data)
{
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102838/CWE426_Untrusted_Search_Path__wchar_t_system_52c.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_52c_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52c_badSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a80(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401254);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,719
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52c_goodG2BSink(wchar_t * data)
{
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102838/CWE426_Untrusted_Search_Path__wchar_t_system_52c.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_52c_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_52c_goodG2BSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a80(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401264);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,720
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
/* FLAW: the full path is not specified */
wcscpy(data, BAD_OS_COMMAND);
CWE426_Untrusted_Search_Path__wchar_t_system_53b_badSink(data);
}
|
['/* FLAW: the full path is not specified */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102839/CWE426_Untrusted_Search_Path__wchar_t_system_53a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_53_bad
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53_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;
func_0x00400ad0(puStack_10,&UNK_00401274);
CWE426_Untrusted_Search_Path__wchar_t_system_53b_badSink(puStack_10);
return;
}
|
['gcc']
|
1,721
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102839/CWE426_Untrusted_Search_Path__wchar_t_system_53a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_53_good
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,722
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53b_badSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_53c_badSink(data);
}
|
[]
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102839/CWE426_Untrusted_Search_Path__wchar_t_system_53b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_53b_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53b_badSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_53c_badSink(param_1);
return;
}
|
['gcc']
|
1,723
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53b_goodG2BSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_53c_goodG2BSink(data);
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102839/CWE426_Untrusted_Search_Path__wchar_t_system_53b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_53b_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53b_goodG2BSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_53c_goodG2BSink(param_1);
return;
}
|
['gcc']
|
1,724
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53c_badSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_53d_badSink(data);
}
|
[]
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102839/CWE426_Untrusted_Search_Path__wchar_t_system_53c.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_53c_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53c_badSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_53d_badSink(param_1);
return;
}
|
['gcc']
|
1,725
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53c_goodG2BSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_53d_goodG2BSink(data);
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102839/CWE426_Untrusted_Search_Path__wchar_t_system_53c.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_53c_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53c_goodG2BSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_53d_goodG2BSink(param_1);
return;
}
|
['gcc']
|
1,726
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53d_badSink(wchar_t * data)
{
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102839/CWE426_Untrusted_Search_Path__wchar_t_system_53d.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_53d_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53d_badSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a80(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401274);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,727
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53d_goodG2BSink(wchar_t * data)
{
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102839/CWE426_Untrusted_Search_Path__wchar_t_system_53d.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_53d_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_53d_goodG2BSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a80(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401284);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,728
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
/* FLAW: the full path is not specified */
wcscpy(data, BAD_OS_COMMAND);
CWE426_Untrusted_Search_Path__wchar_t_system_54b_badSink(data);
}
|
['/* FLAW: the full path is not specified */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102840/CWE426_Untrusted_Search_Path__wchar_t_system_54a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_54_bad
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54_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;
func_0x00400ad0(puStack_10,&UNK_00401284);
CWE426_Untrusted_Search_Path__wchar_t_system_54b_badSink(puStack_10);
return;
}
|
['gcc']
|
1,729
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102840/CWE426_Untrusted_Search_Path__wchar_t_system_54a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_54_good
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,730
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54b_badSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54c_badSink(data);
}
|
[]
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102840/CWE426_Untrusted_Search_Path__wchar_t_system_54b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_54b_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54b_badSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54c_badSink(param_1);
return;
}
|
['gcc']
|
1,731
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54b_goodG2BSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54c_goodG2BSink(data);
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102840/CWE426_Untrusted_Search_Path__wchar_t_system_54b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_54b_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54b_goodG2BSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54c_goodG2BSink(param_1);
return;
}
|
['gcc']
|
1,732
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54c_badSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54d_badSink(data);
}
|
[]
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102840/CWE426_Untrusted_Search_Path__wchar_t_system_54c.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_54c_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54c_badSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54d_badSink(param_1);
return;
}
|
['gcc']
|
1,733
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54c_goodG2BSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54d_goodG2BSink(data);
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102840/CWE426_Untrusted_Search_Path__wchar_t_system_54c.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_54c_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54c_goodG2BSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54d_goodG2BSink(param_1);
return;
}
|
['gcc']
|
1,734
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54d_badSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54e_badSink(data);
}
|
[]
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102840/CWE426_Untrusted_Search_Path__wchar_t_system_54d.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_54d_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54d_badSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54e_badSink(param_1);
return;
}
|
['gcc']
|
1,735
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54d_goodG2BSink(wchar_t * data)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54e_goodG2BSink(data);
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102840/CWE426_Untrusted_Search_Path__wchar_t_system_54d.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_54d_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54d_goodG2BSink(undefined8 param_1)
{
CWE426_Untrusted_Search_Path__wchar_t_system_54e_goodG2BSink(param_1);
return;
}
|
['gcc']
|
1,736
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54e_badSink(wchar_t * data)
{
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102840/CWE426_Untrusted_Search_Path__wchar_t_system_54e.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_54e_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54e_badSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a80(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401284);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,737
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54e_goodG2BSink(wchar_t * data)
{
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102840/CWE426_Untrusted_Search_Path__wchar_t_system_54e.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_54e_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_54e_goodG2BSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a80(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401294);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,738
|
void CWE426_Untrusted_Search_Path__wchar_t_system_64_bad()
{
wchar_t * data;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
/* FLAW: the full path is not specified */
wcscpy(data, BAD_OS_COMMAND);
CWE426_Untrusted_Search_Path__wchar_t_system_64b_badSink(&data);
}
|
['/* FLAW: the full path is not specified */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102844/CWE426_Untrusted_Search_Path__wchar_t_system_64a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_64_bad
|
void CWE426_Untrusted_Search_Path__wchar_t_system_64_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;
func_0x00400ad0(puStack_10,&UNK_00401244);
CWE426_Untrusted_Search_Path__wchar_t_system_64b_badSink(&puStack_10);
return;
}
|
['gcc']
|
1,739
|
void CWE426_Untrusted_Search_Path__wchar_t_system_64_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102844/CWE426_Untrusted_Search_Path__wchar_t_system_64a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_64_good
|
void CWE426_Untrusted_Search_Path__wchar_t_system_64_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,740
|
void CWE426_Untrusted_Search_Path__wchar_t_system_64b_badSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
wchar_t * * dataPtr = (wchar_t * *)dataVoidPtr;
/* dereference dataPtr into data */
wchar_t * data = (*dataPtr);
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102844/CWE426_Untrusted_Search_Path__wchar_t_system_64b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_64b_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_64b_badSink(undefined8 *param_1)
{
int iVar1;
iVar1 = func_0x00400a80(*param_1);
if (iVar1 < 1) {
printLine(&UNK_00401244);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,741
|
void CWE426_Untrusted_Search_Path__wchar_t_system_64b_goodG2BSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
wchar_t * * dataPtr = (wchar_t * *)dataVoidPtr;
/* dereference dataPtr into data */
wchar_t * data = (*dataPtr);
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102844/CWE426_Untrusted_Search_Path__wchar_t_system_64b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_64b_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_64b_goodG2BSink(undefined8 *param_1)
{
int iVar1;
iVar1 = func_0x00400a80(*param_1);
if (iVar1 < 1) {
printLine(&UNK_00401254);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,742
|
void CWE426_Untrusted_Search_Path__wchar_t_system_66_bad()
{
wchar_t * data;
wchar_t * dataArray[5];
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
/* FLAW: the full path is not specified */
wcscpy(data, BAD_OS_COMMAND);
/* put data in array */
dataArray[2] = data;
CWE426_Untrusted_Search_Path__wchar_t_system_66b_badSink(dataArray);
}
|
['/* FLAW: the full path is not specified */', '/* put data in array */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102846/CWE426_Untrusted_Search_Path__wchar_t_system_66a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_66_bad
|
void CWE426_Untrusted_Search_Path__wchar_t_system_66_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1c8;
undefined8 uStack_1c0;
undefined8 auStack_1b8 [48];
undefined auStack_38 [16];
undefined8 *puStack_28;
undefined8 *puStack_10;
uStack_1c8 = 0;
uStack_1c0 = 0;
puVar2 = auStack_1b8;
for (lVar1 = 0x30; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
puStack_10 = &uStack_1c8;
func_0x00400ad0(puStack_10,&UNK_00401244);
puStack_28 = puStack_10;
CWE426_Untrusted_Search_Path__wchar_t_system_66b_badSink(auStack_38);
return;
}
|
['gcc']
|
1,743
|
void CWE426_Untrusted_Search_Path__wchar_t_system_66_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102846/CWE426_Untrusted_Search_Path__wchar_t_system_66a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_66_good
|
void CWE426_Untrusted_Search_Path__wchar_t_system_66_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,744
|
void CWE426_Untrusted_Search_Path__wchar_t_system_66b_badSink(wchar_t * dataArray[])
{
/* copy data out of dataArray */
wchar_t * data = dataArray[2];
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* copy data out of dataArray */', '/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102846/CWE426_Untrusted_Search_Path__wchar_t_system_66b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_66b_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_66b_badSink(long param_1)
{
int iVar1;
iVar1 = func_0x00400a80(*(undefined8 *)(param_1 + 0x10));
if (iVar1 < 1) {
printLine(&UNK_00401244);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,745
|
void CWE426_Untrusted_Search_Path__wchar_t_system_66b_goodG2BSink(wchar_t * dataArray[])
{
wchar_t * data = dataArray[2];
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102846/CWE426_Untrusted_Search_Path__wchar_t_system_66b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_66b_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_66b_goodG2BSink(long param_1)
{
int iVar1;
iVar1 = func_0x00400a80(*(undefined8 *)(param_1 + 0x10));
if (iVar1 < 1) {
printLine(&UNK_00401254);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,746
|
void CWE426_Untrusted_Search_Path__wchar_t_system_67_bad()
{
wchar_t * data;
CWE426_Untrusted_Search_Path__wchar_t_system_67_structType myStruct;
wchar_t dataBuffer[100] = L"";
data = dataBuffer;
/* FLAW: the full path is not specified */
wcscpy(data, BAD_OS_COMMAND);
myStruct.structFirst = data;
CWE426_Untrusted_Search_Path__wchar_t_system_67b_badSink(myStruct);
}
|
['/* FLAW: the full path is not specified */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102847/CWE426_Untrusted_Search_Path__wchar_t_system_67a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_67_bad
|
void CWE426_Untrusted_Search_Path__wchar_t_system_67_bad(void)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_1a8;
undefined8 uStack_1a0;
undefined8 auStack_198 [48];
undefined8 *puStack_18;
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;
func_0x00400ad0(puStack_10,&UNK_00401244);
puStack_18 = puStack_10;
CWE426_Untrusted_Search_Path__wchar_t_system_67b_badSink(puStack_10);
return;
}
|
['gcc']
|
1,747
|
void CWE426_Untrusted_Search_Path__wchar_t_system_67_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102847/CWE426_Untrusted_Search_Path__wchar_t_system_67a.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_67_good
|
void CWE426_Untrusted_Search_Path__wchar_t_system_67_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,748
|
void CWE426_Untrusted_Search_Path__wchar_t_system_67b_badSink(CWE426_Untrusted_Search_Path__wchar_t_system_67_structType myStruct)
{
wchar_t * data = myStruct.structFirst;
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
|
['CWE426']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102847/CWE426_Untrusted_Search_Path__wchar_t_system_67b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_67b_badSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_67b_badSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a80(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401244);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,749
|
void CWE426_Untrusted_Search_Path__wchar_t_system_67b_goodG2BSink(CWE426_Untrusted_Search_Path__wchar_t_system_67_structType myStruct)
{
wchar_t * data = myStruct.structFirst;
/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable
* can allow an attacker to run their own program */
if (SYSTEM(data) <= 0)
{
printLine("command execution failed!");
exit(1);
}
}
|
['/* POTENTIAL FLAW: Executing the _wsystem() function without specifying the full path to the executable\r\n * can allow an attacker to run their own program */']
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102847/CWE426_Untrusted_Search_Path__wchar_t_system_67b.c
|
CWE426_Untrusted_Search_Path__wchar_t_system_67b_goodG2BSink
|
void CWE426_Untrusted_Search_Path__wchar_t_system_67b_goodG2BSink(undefined8 param_1)
{
int iVar1;
iVar1 = func_0x00400a80(param_1);
if (iVar1 < 1) {
printLine(&UNK_00401254);
func_0x00400b20(1);
}
return;
}
|
['gcc']
|
1,750
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_01_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102856/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_01.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_01_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_01_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_00401594);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,751
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_01_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102856/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_01.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_01_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_01_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,752
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_02_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(1)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102857/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_02.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_02_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_02_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_00401594);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,753
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_02_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102857/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_02.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_02_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_02_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,754
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_03_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(5==5)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102858/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_03.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_03_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_03_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_00401594);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,755
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_03_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102858/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_03.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_03_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_03_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,756
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_04_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(STATIC_CONST_TRUE)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102859/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_04.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_04_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_04_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015ac);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,757
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_04_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102859/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_04.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_04_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_04_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,758
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_05_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(staticTrue)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102860/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_05.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_05_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_05_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
if (staticTrue != 0) {
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015a4);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,759
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_05_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102860/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_05.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_05_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_05_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,760
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_06_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(STATIC_CONST_FIVE==5)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102861/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_06.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_06_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_06_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015a8);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,761
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_06_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102861/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_06.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_06_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_06_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,762
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_07_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(staticFive==5)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102862/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_07.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_07_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_07_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
if (staticFive == 5) {
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015a4);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,763
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_07_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102862/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_07.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_07_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_07_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,764
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_08_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(staticReturnsTrue())
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102863/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_08.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_08_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_08_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
iVar1 = staticReturnsTrue(puVar3,param_2,(undefined2 *)((long)puVar3 + 2));
if (iVar1 != 0) {
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10);
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015c4);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,765
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_08_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102863/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_08.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_08_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_08_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,766
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_09_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(GLOBAL_CONST_TRUE)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102864/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_09.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_09_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_09_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
if (GLOBAL_CONST_TRUE != 0) {
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015a4);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,767
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_09_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102864/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_09.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_09_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_09_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,768
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_10_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(globalTrue)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102865/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_10.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_10_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_10_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
if (globalTrue != 0) {
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015a4);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,769
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_10_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102865/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_10.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_10_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_10_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,770
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_11_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(globalReturnsTrue())
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102866/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_11.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_11_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_11_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
iVar1 = globalReturnsTrue(puVar3,param_2,(undefined2 *)((long)puVar3 + 2));
if (iVar1 != 0) {
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10);
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015a4);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,771
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_11_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102866/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_11.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_11_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_11_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,772
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_12_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(globalReturnsTrueOrFalse())
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
else
{
/* FIX: Set the path as the "system" path */
strcat(data, NEW_PATH);
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* FIX: Set the path as the "system" path */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102867/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_12.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_12_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_12_bad
(undefined8 param_1,undefined8 param_2)
{
char cVar1;
int iVar2;
undefined4 *puVar3;
long lVar4;
ulong uVar5;
undefined8 *puVar6;
byte bVar7;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
bVar7 = 0;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar6 = auStack_128;
for (lVar4 = 0x1d; lVar4 != 0; lVar4 = lVar4 + -1) {
*puVar6 = 0;
puVar6 = puVar6 + 1;
}
*(undefined2 *)puVar6 = 0;
puStack_10 = &uStack_138;
iVar2 = globalReturnsTrueOrFalse(puVar6,param_2,(undefined2 *)((long)puVar6 + 2));
if (iVar2 == 0) {
uVar5 = 0xffffffffffffffff;
puVar6 = puStack_10;
do {
if (uVar5 == 0) break;
uVar5 = uVar5 - 1;
cVar1 = *(char *)puVar6;
puVar6 = (undefined8 *)((long)puVar6 + (ulong)bVar7 * -2 + 1);
} while (cVar1 != '\0');
puVar3 = (undefined4 *)((long)puStack_10 + (~uVar5 - 1));
*puVar3 = 0x6e69622f;
*(undefined *)(puVar3 + 1) = 0;
}
else {
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10);
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015e4);
uStack_146 = func_0x00400c80(0x6987);
iVar2 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar2 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(char *)((long)puStack_10 + lStack_20),
0xf9 - lStack_20,0), iStack_24 != -1)) && (iStack_24 != 0)) {
*(char *)((long)puStack_10 + iStack_24 + lStack_20) = '\0';
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,773
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_12_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102867/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_12.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_12_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_12_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,774
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_13_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(GLOBAL_CONST_FIVE==5)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102868/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_13.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_13_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_13_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
if (GLOBAL_CONST_FIVE == 5) {
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015a4);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,775
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_13_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102868/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_13.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_13_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_13_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,776
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_14_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
if(globalFive==5)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102869/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_14.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_14_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_14_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
if (globalFive == 5) {
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015a4);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,777
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_14_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102869/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_14.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_14_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_14_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,778
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_15_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
switch(6)
{
case 6:
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102870/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_15.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_15_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_15_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_00401594);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,779
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_15_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102870/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_15.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_15_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_15_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,780
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_16_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
while(1)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
break;
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102871/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_16.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_16_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_16_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_00401594);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,781
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_16_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102871/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_16.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_16_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_16_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,782
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_17_bad()
{
int i;
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
for(i = 0; i < 1; i++)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102872/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_17.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_17_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_17_bad(void)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [30];
undefined *puStack_38;
int iStack_2c;
long lStack_28;
int iStack_1c;
undefined8 *puStack_18;
int iStack_c;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_18 = &uStack_138;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
iStack_1c = 0xffffffff;
lStack_28 = func_0x00400c70(puStack_18);
iStack_1c = func_0x00400d90(2,1,6);
if (iStack_1c != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_004015b4);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_1c,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_2c = func_0x00400c40(iStack_1c,(long)puStack_18 + lStack_28,0xf9 - lStack_28,0),
iStack_2c != -1)) && (iStack_2c != 0)) {
*(undefined *)((long)puStack_18 + iStack_2c + lStack_28) = 0;
puStack_38 = (undefined *)func_0x00400c90(puStack_18,0xd);
if (puStack_38 != (undefined *)0x0) {
*puStack_38 = 0;
}
puStack_38 = (undefined *)func_0x00400c90(puStack_18,10);
if (puStack_38 != (undefined *)0x0) {
*puStack_38 = 0;
}
}
}
if (iStack_1c != -1) {
func_0x00400cc0(iStack_1c);
}
}
func_0x00400d00(puStack_18);
return;
}
|
['gcc']
|
1,783
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_17_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102872/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_17.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_17_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_17_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,784
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_18_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
goto source;
source:
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102873/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_18.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_18_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_18_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_148;
undefined2 uStack_146;
undefined4 uStack_144;
undefined8 uStack_138;
undefined8 uStack_130;
undefined8 auStack_128 [31];
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_138 = 0x3d48544150;
uStack_130 = 0;
puVar3 = auStack_128;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_138;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_148,0,0x10);
uStack_148 = 2;
uStack_144 = func_0x00400d10(&UNK_00401594);
uStack_146 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_148,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,785
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_18_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102873/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_18.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_18_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_18_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,786
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_21_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
badStatic = 1; /* true */
data = badSource(data);
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* true */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102874/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_21.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_21_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_21_bad
(undefined8 param_1,undefined8 param_2)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_118;
undefined8 uStack_110;
undefined8 auStack_108 [31];
undefined8 *puStack_10;
uStack_118 = 0x3d48544150;
uStack_110 = 0;
puVar2 = auStack_108;
for (lVar1 = 0x1d; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
*(undefined2 *)puVar2 = 0;
puStack_10 = &uStack_118;
badStatic = 1;
puStack_10 = (undefined8 *)badSource(puStack_10,param_2,(undefined2 *)((long)puVar2 + 2));
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,787
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_21_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102874/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_21.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_21_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_21_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,788
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_badGlobal = 1; /* true */
data = CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_badSource(data);
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* true */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102875/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22a.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_bad
(undefined8 param_1,undefined8 param_2)
{
long lVar1;
undefined8 *puVar2;
undefined8 uStack_118;
undefined8 uStack_110;
undefined8 auStack_108 [31];
undefined8 *puStack_10;
uStack_118 = 0x3d48544150;
uStack_110 = 0;
puVar2 = auStack_108;
for (lVar1 = 0x1d; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar2 = 0;
puVar2 = puVar2 + 1;
}
*(undefined2 *)puVar2 = 0;
puStack_10 = &uStack_118;
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_badGlobal = 1;
puStack_10 = (undefined8 *)
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_badSource
(puStack_10,param_2,(undefined2 *)((long)puVar2 + 2));
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,789
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_good()
{
goodG2B1();
goodG2B2();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102875/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22a.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_good(void)
{
goodG2B1();
goodG2B2();
return;
}
|
['gcc']
|
1,790
|
char * CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_badSource(char * data)
{
if(CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_badGlobal)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
return data;
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102875/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22b.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_badSource
|
long CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_badSource(long param_1)
{
int iVar1;
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_c;
if (CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_badGlobal != 0) {
iStack_c = 0xffffffff;
lStack_18 = func_0x00400c70(param_1);
iStack_c = func_0x00400d90(2,1,6);
if (iStack_c != -1) {
func_0x00400cb0(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400d10(&UNK_004015c4);
uStack_36 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_1c = func_0x00400c40(iStack_c,param_1 + lStack_18,0xf9 - lStack_18,0),
iStack_1c != -1)) && (iStack_1c != 0)) {
*(undefined *)(param_1 + iStack_1c + lStack_18) = 0;
puStack_28 = (undefined *)func_0x00400c90(param_1,0xd);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined *)func_0x00400c90(param_1,10);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_c != -1) {
func_0x00400cc0(iStack_c);
}
}
return param_1;
}
|
['gcc']
|
1,791
|
char * CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_goodG2B1Source(char * data)
{
if(CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_goodG2B1Global)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
/* FIX: Set the path as the "system" path */
strcat(data, NEW_PATH);
}
return data;
}
|
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Set the path as the "system" path */']
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102875/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22b.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_goodG2B1Source
|
char * CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_goodG2B1Source(char *param_1)
{
char cVar1;
ulong uVar2;
char *pcVar3;
if (CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_goodG2B1Global == 0) {
uVar2 = 0xffffffffffffffff;
pcVar3 = param_1;
do {
if (uVar2 == 0) break;
uVar2 = uVar2 - 1;
cVar1 = *pcVar3;
pcVar3 = pcVar3 + 1;
} while (cVar1 != '\0');
*(undefined4 *)(param_1 + (~uVar2 - 1)) = 0x6e69622f;
*(undefined *)((long)(param_1 + (~uVar2 - 1)) + 4) = 0;
}
else {
printLine(&UNK_004012b4);
}
return param_1;
}
|
['gcc']
|
1,792
|
char * CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_goodG2B2Source(char * data)
{
if(CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_goodG2B2Global)
{
/* FIX: Set the path as the "system" path */
strcat(data, NEW_PATH);
}
return data;
}
|
['/* FIX: Set the path as the "system" path */']
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102875/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22b.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_goodG2B2Source
|
char * CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_goodG2B2Source(char *param_1)
{
char cVar1;
ulong uVar2;
char *pcVar3;
if (CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_22_goodG2B2Global != 0) {
uVar2 = 0xffffffffffffffff;
pcVar3 = param_1;
do {
if (uVar2 == 0) break;
uVar2 = uVar2 - 1;
cVar1 = *pcVar3;
pcVar3 = pcVar3 + 1;
} while (cVar1 != '\0');
*(undefined4 *)(param_1 + (~uVar2 - 1)) = 0x6e69622f;
*(undefined *)((long)(param_1 + (~uVar2 - 1)) + 4) = 0;
}
return param_1;
}
|
['gcc']
|
1,793
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_31_bad()
{
char * data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
{
char * dataCopy = data;
char * data = dataCopy;
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102876/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_31.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_31_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_31_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_158;
undefined2 uStack_156;
undefined4 uStack_154;
undefined8 uStack_148;
undefined8 uStack_140;
undefined8 auStack_138 [31];
undefined8 *puStack_40;
undefined8 *puStack_38;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_148 = 0x3d48544150;
uStack_140 = 0;
puVar3 = auStack_138;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_148;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_158,0,0x10);
uStack_158 = 2;
uStack_154 = func_0x00400d10(&UNK_004015a4);
uStack_156 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_158,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
puStack_38 = puStack_10;
puStack_40 = puStack_10;
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,794
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_31_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102876/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_31.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_31_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_31_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,795
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_32_bad()
{
char * data;
char * *dataPtr1 = &data;
char * *dataPtr2 = &data;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
{
char * data = *dataPtr1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
*dataPtr1 = data;
}
{
char * data = *dataPtr2;
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102877/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_32.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_32_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_32_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_168;
undefined2 uStack_166;
undefined4 uStack_164;
undefined8 uStack_158;
undefined8 uStack_150;
undefined8 auStack_148 [31];
undefined8 *puStack_50;
undefined8 *puStack_48;
undefined *puStack_40;
int iStack_34;
long lStack_30;
int iStack_24;
undefined8 *puStack_20;
undefined8 **ppuStack_18;
undefined8 **ppuStack_10;
ppuStack_10 = &puStack_50;
ppuStack_18 = &puStack_50;
uStack_158 = 0x3d48544150;
uStack_150 = 0;
puVar3 = auStack_148;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_50 = &uStack_158;
puStack_20 = *ppuStack_10;
iStack_24 = 0xffffffff;
lStack_30 = func_0x00400c70(puStack_20,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_24 = func_0x00400d90(2,1,6);
if (iStack_24 != -1) {
func_0x00400cb0(&uStack_168,0,0x10);
uStack_168 = 2;
uStack_164 = func_0x00400d10(&UNK_004015c4);
uStack_166 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_24,&uStack_168,0x10);
if (((iVar1 != -1) &&
(iStack_34 = func_0x00400c40(iStack_24,(long)puStack_20 + lStack_30,0xf9 - lStack_30,0),
iStack_34 != -1)) && (iStack_34 != 0)) {
*(undefined *)((long)puStack_20 + iStack_34 + lStack_30) = 0;
puStack_40 = (undefined *)func_0x00400c90(puStack_20,0xd);
if (puStack_40 != (undefined *)0x0) {
*puStack_40 = 0;
}
puStack_40 = (undefined *)func_0x00400c90(puStack_20,10);
if (puStack_40 != (undefined *)0x0) {
*puStack_40 = 0;
}
}
}
if (iStack_24 != -1) {
func_0x00400cc0(iStack_24);
}
*ppuStack_10 = puStack_20;
puStack_48 = *ppuStack_18;
func_0x00400d00(puStack_48);
return;
}
|
['gcc']
|
1,796
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_32_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102877/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_32.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_32_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_32_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,797
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_34_bad()
{
char * data;
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_34_unionType myUnion;
char dataBuffer[250] = "PATH=";
data = dataBuffer;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (250 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
myUnion.unionFirst = data;
{
char * data = myUnion.unionSecond;
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
}
|
['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102879/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_34.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_34_bad
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_34_bad
(undefined8 param_1,undefined8 param_2)
{
int iVar1;
long lVar2;
undefined8 *puVar3;
undefined2 uStack_158;
undefined2 uStack_156;
undefined4 uStack_154;
undefined8 uStack_148;
undefined8 uStack_140;
undefined8 auStack_138 [31];
undefined8 *puStack_40;
undefined8 *puStack_38;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_148 = 0x3d48544150;
uStack_140 = 0;
puVar3 = auStack_138;
for (lVar2 = 0x1d; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
*(undefined2 *)puVar3 = 0;
puStack_10 = &uStack_148;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c70(puStack_10,param_2,(undefined2 *)((long)puVar3 + 2));
iStack_14 = func_0x00400d90(2,1,6);
if (iStack_14 != -1) {
func_0x00400cb0(&uStack_158,0,0x10);
uStack_158 = 2;
uStack_154 = func_0x00400d10(&UNK_004015a4);
uStack_156 = func_0x00400c80(0x6987);
iVar1 = func_0x00400d60(iStack_14,&uStack_158,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c40(iStack_14,(long)puStack_10 + lStack_20,0xf9 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c90(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c90(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400cc0(iStack_14);
}
puStack_40 = puStack_10;
puStack_38 = puStack_10;
func_0x00400d00(puStack_10);
return;
}
|
['gcc']
|
1,798
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_34_good()
{
goodG2B();
}
|
[]
| null |
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102879/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_34.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_34_good
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_34_good(void)
{
goodG2B();
return;
}
|
['gcc']
|
1,799
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_41_badSink(char * data)
{
/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
PUTENV(data);
}
|
['/* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */']
|
['CWE427']
|
mvd
|
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/102880/CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_41.c
|
CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_41_badSink
|
void CWE427_Uncontrolled_Search_Path_Element__char_connect_socket_41_badSink(undefined8 param_1)
{
func_0x00400d00(param_1);
return;
}
|
['gcc']
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.