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
13,400
void CWE78_OS_Command_Injection__char_file_execlp_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119432/CWE78_OS_Command_Injection__char_file_execlp_02.c
CWE78_OS_Command_Injection__char_file_execlp_02_good
void CWE78_OS_Command_Injection__char_file_execlp_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,401
void CWE78_OS_Command_Injection__char_file_execlp_03_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(5==5) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119433/CWE78_OS_Command_Injection__char_file_execlp_03.c
CWE78_OS_Command_Injection__char_file_execlp_03_bad
void CWE78_OS_Command_Injection__char_file_execlp_03_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013a6,&UNK_004013a4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013b4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } func_0x00400bf0(&UNK_004013ca,&UNK_004013ca,&UNK_004013c7,&UNK_004013c3,puStack_10,0); return; }
['gcc']
13,402
void CWE78_OS_Command_Injection__char_file_execlp_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119433/CWE78_OS_Command_Injection__char_file_execlp_03.c
CWE78_OS_Command_Injection__char_file_execlp_03_good
void CWE78_OS_Command_Injection__char_file_execlp_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,403
void CWE78_OS_Command_Injection__char_file_execlp_04_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(STATIC_CONST_TRUE) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119434/CWE78_OS_Command_Injection__char_file_execlp_04.c
CWE78_OS_Command_Injection__char_file_execlp_04_bad
void CWE78_OS_Command_Injection__char_file_execlp_04_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if ((1 < 100U - lStack_18) && (lStack_20 = func_0x00400be0(&UNK_004013be,&UNK_004013bc), lStack_20 != 0)) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013cc); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } func_0x00400bf0(&UNK_004013e2,&UNK_004013e2,&UNK_004013df,&UNK_004013db,puStack_10,0); return; }
['gcc']
13,404
void CWE78_OS_Command_Injection__char_file_execlp_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119434/CWE78_OS_Command_Injection__char_file_execlp_04.c
CWE78_OS_Command_Injection__char_file_execlp_04_good
void CWE78_OS_Command_Injection__char_file_execlp_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,405
void CWE78_OS_Command_Injection__char_file_execlp_05_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(staticTrue) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119435/CWE78_OS_Command_Injection__char_file_execlp_05.c
CWE78_OS_Command_Injection__char_file_execlp_05_bad
void CWE78_OS_Command_Injection__char_file_execlp_05_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; if (staticTrue != 0) { lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013b6,&UNK_004013b4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013c4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } } func_0x00400bf0(&UNK_004013da,&UNK_004013da,&UNK_004013d7,&UNK_004013d3,puStack_10,0); return; }
['gcc']
13,406
void CWE78_OS_Command_Injection__char_file_execlp_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119435/CWE78_OS_Command_Injection__char_file_execlp_05.c
CWE78_OS_Command_Injection__char_file_execlp_05_good
void CWE78_OS_Command_Injection__char_file_execlp_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,407
void CWE78_OS_Command_Injection__char_file_execlp_06_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(STATIC_CONST_FIVE==5) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119436/CWE78_OS_Command_Injection__char_file_execlp_06.c
CWE78_OS_Command_Injection__char_file_execlp_06_bad
void CWE78_OS_Command_Injection__char_file_execlp_06_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if ((1 < 100U - lStack_18) && (lStack_20 = func_0x00400be0(&UNK_004013ba,&UNK_004013b8), lStack_20 != 0)) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013c8); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } func_0x00400bf0(&UNK_004013de,&UNK_004013de,&UNK_004013db,&UNK_004013d7,puStack_10,0); return; }
['gcc']
13,408
void CWE78_OS_Command_Injection__char_file_execlp_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119436/CWE78_OS_Command_Injection__char_file_execlp_06.c
CWE78_OS_Command_Injection__char_file_execlp_06_good
void CWE78_OS_Command_Injection__char_file_execlp_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,409
void CWE78_OS_Command_Injection__char_file_execlp_07_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(staticFive==5) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119437/CWE78_OS_Command_Injection__char_file_execlp_07.c
CWE78_OS_Command_Injection__char_file_execlp_07_bad
void CWE78_OS_Command_Injection__char_file_execlp_07_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; if (staticFive == 5) { lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013b6,&UNK_004013b4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013c4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } } func_0x00400bf0(&UNK_004013da,&UNK_004013da,&UNK_004013d7,&UNK_004013d3,puStack_10,0); return; }
['gcc']
13,410
void CWE78_OS_Command_Injection__char_file_execlp_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119437/CWE78_OS_Command_Injection__char_file_execlp_07.c
CWE78_OS_Command_Injection__char_file_execlp_07_good
void CWE78_OS_Command_Injection__char_file_execlp_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,411
void CWE78_OS_Command_Injection__char_file_execlp_08_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(staticReturnsTrue()) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119438/CWE78_OS_Command_Injection__char_file_execlp_08.c
CWE78_OS_Command_Injection__char_file_execlp_08_bad
void CWE78_OS_Command_Injection__char_file_execlp_08_bad(void) { int iVar1; long lVar2; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013c6,&UNK_004013c4); if (lStack_20 != 0) { lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar2 == 0) { printLine(&UNK_004013d4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } } func_0x00400bf0(&UNK_004013ea,&UNK_004013ea,&UNK_004013e7,&UNK_004013e3,puStack_10,0); return; }
['gcc']
13,412
void CWE78_OS_Command_Injection__char_file_execlp_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119438/CWE78_OS_Command_Injection__char_file_execlp_08.c
CWE78_OS_Command_Injection__char_file_execlp_08_good
void CWE78_OS_Command_Injection__char_file_execlp_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,413
void CWE78_OS_Command_Injection__char_file_execlp_09_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(GLOBAL_CONST_TRUE) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119439/CWE78_OS_Command_Injection__char_file_execlp_09.c
CWE78_OS_Command_Injection__char_file_execlp_09_bad
void CWE78_OS_Command_Injection__char_file_execlp_09_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; if (GLOBAL_CONST_TRUE != 0) { lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013b6,&UNK_004013b4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013c4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } } func_0x00400bf0(&UNK_004013da,&UNK_004013da,&UNK_004013d7,&UNK_004013d3,puStack_10,0); return; }
['gcc']
13,414
void CWE78_OS_Command_Injection__char_file_execlp_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119439/CWE78_OS_Command_Injection__char_file_execlp_09.c
CWE78_OS_Command_Injection__char_file_execlp_09_good
void CWE78_OS_Command_Injection__char_file_execlp_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,415
void CWE78_OS_Command_Injection__char_file_execlp_10_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(globalTrue) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119440/CWE78_OS_Command_Injection__char_file_execlp_10.c
CWE78_OS_Command_Injection__char_file_execlp_10_bad
void CWE78_OS_Command_Injection__char_file_execlp_10_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; if (globalTrue != 0) { lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013b6,&UNK_004013b4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013c4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } } func_0x00400bf0(&UNK_004013da,&UNK_004013da,&UNK_004013d7,&UNK_004013d3,puStack_10,0); return; }
['gcc']
13,416
void CWE78_OS_Command_Injection__char_file_execlp_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119440/CWE78_OS_Command_Injection__char_file_execlp_10.c
CWE78_OS_Command_Injection__char_file_execlp_10_good
void CWE78_OS_Command_Injection__char_file_execlp_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,417
void CWE78_OS_Command_Injection__char_file_execlp_11_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(globalReturnsTrue()) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119441/CWE78_OS_Command_Injection__char_file_execlp_11.c
CWE78_OS_Command_Injection__char_file_execlp_11_bad
void CWE78_OS_Command_Injection__char_file_execlp_11_bad(void) { int iVar1; long lVar2; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013b6,&UNK_004013b4); if (lStack_20 != 0) { lVar2 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar2 == 0) { printLine(&UNK_004013c4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } } func_0x00400bf0(&UNK_004013da,&UNK_004013da,&UNK_004013d7,&UNK_004013d3,puStack_10,0); return; }
['gcc']
13,418
void CWE78_OS_Command_Injection__char_file_execlp_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119441/CWE78_OS_Command_Injection__char_file_execlp_11.c
CWE78_OS_Command_Injection__char_file_execlp_11_good
void CWE78_OS_Command_Injection__char_file_execlp_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,419
void CWE78_OS_Command_Injection__char_file_execlp_12_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(globalReturnsTrueOrFalse()) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } else { /* FIX: Append a fixed string to data (not user / external input) */ strcat(data, "*.*"); } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* FIX: Append a fixed string to data (not user / external input) */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119442/CWE78_OS_Command_Injection__char_file_execlp_12.c
CWE78_OS_Command_Injection__char_file_execlp_12_bad
void CWE78_OS_Command_Injection__char_file_execlp_12_bad(void) { char cVar1; int iVar2; long lVar3; ulong uVar4; undefined8 *puVar5; byte bVar6; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; bVar6 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; iVar2 = globalReturnsTrueOrFalse(); if (iVar2 == 0) { uVar4 = 0xffffffffffffffff; puVar5 = puStack_10; do { if (uVar4 == 0) break; uVar4 = uVar4 - 1; cVar1 = *(char *)puVar5; puVar5 = (undefined8 *)((long)puVar5 + (ulong)bVar6 * -2 + 1); } while (cVar1 != '\0'); *(undefined4 *)((long)puStack_10 + (~uVar4 - 1)) = 0x2a2e2a; } else { lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013f6,&UNK_004013f4); if (lStack_20 != 0) { lVar3 = func_0x00400b80((char *)((long)puStack_10 + lStack_18),100 - (int)lStack_18, lStack_20); if (lVar3 == 0) { printLine(&UNK_00401404); *(char *)(lStack_18 + (long)puStack_10) = '\0'; } func_0x00400b30(lStack_20); } } } func_0x00400bf0(&UNK_0040141a,&UNK_0040141a,&UNK_00401417,&UNK_00401413,puStack_10,0); return; }
['gcc']
13,420
void CWE78_OS_Command_Injection__char_file_execlp_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119442/CWE78_OS_Command_Injection__char_file_execlp_12.c
CWE78_OS_Command_Injection__char_file_execlp_12_good
void CWE78_OS_Command_Injection__char_file_execlp_12_good(void) { goodG2B(); return; }
['gcc']
13,421
void CWE78_OS_Command_Injection__char_file_execlp_13_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(GLOBAL_CONST_FIVE==5) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119443/CWE78_OS_Command_Injection__char_file_execlp_13.c
CWE78_OS_Command_Injection__char_file_execlp_13_bad
void CWE78_OS_Command_Injection__char_file_execlp_13_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; if (GLOBAL_CONST_FIVE == 5) { lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013b6,&UNK_004013b4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013c4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } } func_0x00400bf0(&UNK_004013da,&UNK_004013da,&UNK_004013d7,&UNK_004013d3,puStack_10,0); return; }
['gcc']
13,422
void CWE78_OS_Command_Injection__char_file_execlp_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119443/CWE78_OS_Command_Injection__char_file_execlp_13.c
CWE78_OS_Command_Injection__char_file_execlp_13_good
void CWE78_OS_Command_Injection__char_file_execlp_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,423
void CWE78_OS_Command_Injection__char_file_execlp_14_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(globalFive==5) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119444/CWE78_OS_Command_Injection__char_file_execlp_14.c
CWE78_OS_Command_Injection__char_file_execlp_14_bad
void CWE78_OS_Command_Injection__char_file_execlp_14_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; if (globalFive == 5) { lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013b6,&UNK_004013b4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013c4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } } func_0x00400bf0(&UNK_004013da,&UNK_004013da,&UNK_004013d7,&UNK_004013d3,puStack_10,0); return; }
['gcc']
13,424
void CWE78_OS_Command_Injection__char_file_execlp_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119444/CWE78_OS_Command_Injection__char_file_execlp_14.c
CWE78_OS_Command_Injection__char_file_execlp_14_good
void CWE78_OS_Command_Injection__char_file_execlp_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,425
void CWE78_OS_Command_Injection__char_file_execlp_15_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; switch(6) { case 6: { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119445/CWE78_OS_Command_Injection__char_file_execlp_15.c
CWE78_OS_Command_Injection__char_file_execlp_15_bad
void CWE78_OS_Command_Injection__char_file_execlp_15_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013a6,&UNK_004013a4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013b4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } func_0x00400bf0(&UNK_004013ca,&UNK_004013ca,&UNK_004013c7,&UNK_004013c3,puStack_10,0); return; }
['gcc']
13,426
void CWE78_OS_Command_Injection__char_file_execlp_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119445/CWE78_OS_Command_Injection__char_file_execlp_15.c
CWE78_OS_Command_Injection__char_file_execlp_15_good
void CWE78_OS_Command_Injection__char_file_execlp_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,427
void CWE78_OS_Command_Injection__char_file_execlp_16_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; while(1) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } break; } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119446/CWE78_OS_Command_Injection__char_file_execlp_16.c
CWE78_OS_Command_Injection__char_file_execlp_16_bad
void CWE78_OS_Command_Injection__char_file_execlp_16_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013a6,&UNK_004013a4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013b4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } func_0x00400bf0(&UNK_004013ca,&UNK_004013ca,&UNK_004013c7,&UNK_004013c3,puStack_10,0); return; }
['gcc']
13,428
void CWE78_OS_Command_Injection__char_file_execlp_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119446/CWE78_OS_Command_Injection__char_file_execlp_16.c
CWE78_OS_Command_Injection__char_file_execlp_16_good
void CWE78_OS_Command_Injection__char_file_execlp_16_good(void) { goodG2B(); return; }
['gcc']
13,429
void CWE78_OS_Command_Injection__char_file_execlp_17_bad() { int i; char * data; char dataBuffer[100] = ""; data = dataBuffer; for(i = 0; i < 1; i++) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119447/CWE78_OS_Command_Injection__char_file_execlp_17.c
CWE78_OS_Command_Injection__char_file_execlp_17_bad
void CWE78_OS_Command_Injection__char_file_execlp_17_bad(void) { long lVar1; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; long lStack_28; long lStack_20; undefined8 *puStack_18; int iStack_c; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { lStack_20 = func_0x00400b40(puStack_18); if (1 < 100U - lStack_20) { lStack_28 = func_0x00400be0(&UNK_004013c6,&UNK_004013c4); if (lStack_28 != 0) { lVar1 = func_0x00400b80((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28); if (lVar1 == 0) { printLine(&UNK_004013d4); *(undefined *)(lStack_20 + (long)puStack_18) = 0; } func_0x00400b30(lStack_28); } } } func_0x00400bf0(&UNK_004013ea,&UNK_004013ea,&UNK_004013e7,&UNK_004013e3,puStack_18,0); return; }
['gcc']
13,430
void CWE78_OS_Command_Injection__char_file_execlp_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119447/CWE78_OS_Command_Injection__char_file_execlp_17.c
CWE78_OS_Command_Injection__char_file_execlp_17_good
void CWE78_OS_Command_Injection__char_file_execlp_17_good(void) { goodG2B(); return; }
['gcc']
13,431
void CWE78_OS_Command_Injection__char_file_execlp_18_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; goto source; source: { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119448/CWE78_OS_Command_Injection__char_file_execlp_18.c
CWE78_OS_Command_Injection__char_file_execlp_18_bad
void CWE78_OS_Command_Injection__char_file_execlp_18_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013a6,&UNK_004013a4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013b4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } func_0x00400bf0(&UNK_004013ca,&UNK_004013ca,&UNK_004013c7,&UNK_004013c3,puStack_10,0); return; }
['gcc']
13,432
void CWE78_OS_Command_Injection__char_file_execlp_18_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119448/CWE78_OS_Command_Injection__char_file_execlp_18.c
CWE78_OS_Command_Injection__char_file_execlp_18_good
void CWE78_OS_Command_Injection__char_file_execlp_18_good(void) { goodG2B(); return; }
['gcc']
13,433
void CWE78_OS_Command_Injection__char_file_execlp_21_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; badStatic = 1; /* true */ data = badSource(data); /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* true */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119449/CWE78_OS_Command_Injection__char_file_execlp_21.c
CWE78_OS_Command_Injection__char_file_execlp_21_bad
void CWE78_OS_Command_Injection__char_file_execlp_21_bad(void) { undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; undefined8 *puStack_10; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; puStack_10 = &uStack_78; badStatic = 1; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400bf0(&UNK_004013fa,&UNK_004013fa,&UNK_004013f7,&UNK_004013f3,puStack_10,0); return; }
['gcc']
13,434
void CWE78_OS_Command_Injection__char_file_execlp_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119449/CWE78_OS_Command_Injection__char_file_execlp_21.c
CWE78_OS_Command_Injection__char_file_execlp_21_good
void CWE78_OS_Command_Injection__char_file_execlp_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,435
void CWE78_OS_Command_Injection__char_file_execlp_22_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; CWE78_OS_Command_Injection__char_file_execlp_22_badGlobal = 1; /* true */ data = CWE78_OS_Command_Injection__char_file_execlp_22_badSource(data); /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* true */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119450/CWE78_OS_Command_Injection__char_file_execlp_22a.c
CWE78_OS_Command_Injection__char_file_execlp_22_bad
void CWE78_OS_Command_Injection__char_file_execlp_22_bad(void) { undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; undefined8 *puStack_10; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; puStack_10 = &uStack_78; CWE78_OS_Command_Injection__char_file_execlp_22_badGlobal = 1; puStack_10 = (undefined8 *)CWE78_OS_Command_Injection__char_file_execlp_22_badSource(puStack_10); func_0x00400bf0(&UNK_004013db,&UNK_004013db,&UNK_004013d8,&UNK_004013d4,puStack_10,0); return; }
['gcc']
13,436
void CWE78_OS_Command_Injection__char_file_execlp_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119450/CWE78_OS_Command_Injection__char_file_execlp_22a.c
CWE78_OS_Command_Injection__char_file_execlp_22_good
void CWE78_OS_Command_Injection__char_file_execlp_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
13,437
char * CWE78_OS_Command_Injection__char_file_execlp_22_badSource(char * data) { if(CWE78_OS_Command_Injection__char_file_execlp_22_badGlobal) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } } return data; }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119450/CWE78_OS_Command_Injection__char_file_execlp_22b.c
CWE78_OS_Command_Injection__char_file_execlp_22_badSource
long CWE78_OS_Command_Injection__char_file_execlp_22_badSource(long param_1) { long lVar1; long lVar2; long lVar3; if (CWE78_OS_Command_Injection__char_file_execlp_22_badGlobal != 0) { lVar1 = func_0x00400b40(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400be0(&UNK_004013d6,&UNK_004013d4); if (lVar2 != 0) { lVar3 = func_0x00400b80(param_1 + lVar1,100 - (int)lVar1,lVar2); if (lVar3 == 0) { printLine(&UNK_004013e4); *(undefined *)(lVar1 + param_1) = 0; } func_0x00400b30(lVar2); } } } return param_1; }
['gcc']
13,438
char * CWE78_OS_Command_Injection__char_file_execlp_22_goodG2B1Source(char * data) { if(CWE78_OS_Command_Injection__char_file_execlp_22_goodG2B1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Append a fixed string to data (not user / external input) */ strcat(data, "*.*"); } return data; }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119450/CWE78_OS_Command_Injection__char_file_execlp_22b.c
CWE78_OS_Command_Injection__char_file_execlp_22_goodG2B1Source
char * CWE78_OS_Command_Injection__char_file_execlp_22_goodG2B1Source(char *param_1) { char cVar1; ulong uVar2; char *pcVar3; if (CWE78_OS_Command_Injection__char_file_execlp_22_goodG2B1Global == 0) { uVar2 = 0xffffffffffffffff; pcVar3 = param_1; do { if (uVar2 == 0) break; uVar2 = uVar2 - 1; cVar1 = *pcVar3; pcVar3 = pcVar3 + 1; } while (cVar1 != '\0'); *(undefined4 *)(param_1 + (~uVar2 - 1)) = 0x2a2e2a; } else { printLine(&UNK_00401334); } return param_1; }
['gcc']
13,439
char * CWE78_OS_Command_Injection__char_file_execlp_22_goodG2B2Source(char * data) { if(CWE78_OS_Command_Injection__char_file_execlp_22_goodG2B2Global) { /* FIX: Append a fixed string to data (not user / external input) */ strcat(data, "*.*"); } return data; }
['/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119450/CWE78_OS_Command_Injection__char_file_execlp_22b.c
CWE78_OS_Command_Injection__char_file_execlp_22_goodG2B2Source
char * CWE78_OS_Command_Injection__char_file_execlp_22_goodG2B2Source(char *param_1) { char cVar1; ulong uVar2; char *pcVar3; if (CWE78_OS_Command_Injection__char_file_execlp_22_goodG2B2Global != 0) { uVar2 = 0xffffffffffffffff; pcVar3 = param_1; do { if (uVar2 == 0) break; uVar2 = uVar2 - 1; cVar1 = *pcVar3; pcVar3 = pcVar3 + 1; } while (cVar1 != '\0'); *(undefined4 *)(param_1 + (~uVar2 - 1)) = 0x2a2e2a; } return param_1; }
['gcc']
13,440
void CWE78_OS_Command_Injection__char_file_execlp_31_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } { char * dataCopy = data; char * data = dataCopy; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119451/CWE78_OS_Command_Injection__char_file_execlp_31.c
CWE78_OS_Command_Injection__char_file_execlp_31_bad
void CWE78_OS_Command_Injection__char_file_execlp_31_bad(void) { long lVar1; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; undefined8 *puStack_30; undefined8 *puStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_10 = &uStack_98; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013c6,&UNK_004013c4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013d4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } puStack_28 = puStack_10; puStack_30 = puStack_10; func_0x00400bf0(&UNK_004013ea,&UNK_004013ea,&UNK_004013e7,&UNK_004013e3,puStack_10,0); return; }
['gcc']
13,441
void CWE78_OS_Command_Injection__char_file_execlp_31_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119451/CWE78_OS_Command_Injection__char_file_execlp_31.c
CWE78_OS_Command_Injection__char_file_execlp_31_good
void CWE78_OS_Command_Injection__char_file_execlp_31_good(void) { goodG2B(); return; }
['gcc']
13,442
void CWE78_OS_Command_Injection__char_file_execlp_32_bad() { char * data; char * *dataPtr1 = &data; char * *dataPtr2 = &data; char dataBuffer[100] = ""; data = dataBuffer; { char * data = *dataPtr1; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } *dataPtr1 = data; } { char * data = *dataPtr2; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119452/CWE78_OS_Command_Injection__char_file_execlp_32.c
CWE78_OS_Command_Injection__char_file_execlp_32_bad
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void CWE78_OS_Command_Injection__char_file_execlp_32_bad(void) { long lVar1; undefined8 uStack_a8; undefined8 uStack_a0; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined4 uStack_48; undefined8 *puStack_40; undefined8 *puStack_38; long lStack_30; long lStack_28; undefined8 *puStack_20; undefined8 **ppuStack_18; undefined8 **ppuStack_10; ppuStack_10 = &puStack_40; ppuStack_18 = &puStack_40; uStack_a8 = 0; uStack_a0 = 0; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; puStack_40 = &uStack_a8; puStack_20 = puStack_40; lStack_28 = func_0x00400b40(puStack_40); if (1 < 100U - lStack_28) { lStack_30 = func_0x00400be0(&UNK_004013e6,&UNK_004013e4); if (lStack_30 != 0) { lVar1 = func_0x00400b80((long)puStack_20 + lStack_28,100 - (int)lStack_28,lStack_30); if (lVar1 == 0) { printLine(&UNK_004013f4); *(undefined *)(lStack_28 + (long)puStack_20) = 0; } func_0x00400b30(lStack_30); } } *ppuStack_10 = puStack_20; puStack_38 = *ppuStack_18; func_0x00400bf0(&UNK_0040140a,&UNK_0040140a,&UNK_00401407,&UNK_00401403,puStack_38,0); return; }
['gcc']
13,443
void CWE78_OS_Command_Injection__char_file_execlp_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119452/CWE78_OS_Command_Injection__char_file_execlp_32.c
CWE78_OS_Command_Injection__char_file_execlp_32_good
void CWE78_OS_Command_Injection__char_file_execlp_32_good(void) { goodG2B(); return; }
['gcc']
13,444
void CWE78_OS_Command_Injection__char_file_execlp_34_bad() { char * data; CWE78_OS_Command_Injection__char_file_execlp_34_unionType myUnion; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } myUnion.unionFirst = data; { char * data = myUnion.unionSecond; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); } }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119454/CWE78_OS_Command_Injection__char_file_execlp_34.c
CWE78_OS_Command_Injection__char_file_execlp_34_bad
void CWE78_OS_Command_Injection__char_file_execlp_34_bad(void) { long lVar1; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; undefined8 *puStack_30; undefined8 *puStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_10 = &uStack_98; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013c6,&UNK_004013c4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013d4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } puStack_30 = puStack_10; puStack_28 = puStack_10; func_0x00400bf0(&UNK_004013ea,&UNK_004013ea,&UNK_004013e7,&UNK_004013e3,puStack_10,0); return; }
['gcc']
13,445
void CWE78_OS_Command_Injection__char_file_execlp_34_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119454/CWE78_OS_Command_Injection__char_file_execlp_34.c
CWE78_OS_Command_Injection__char_file_execlp_34_good
void CWE78_OS_Command_Injection__char_file_execlp_34_good(void) { goodG2B(); return; }
['gcc']
13,446
void CWE78_OS_Command_Injection__char_file_execlp_41_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119455/CWE78_OS_Command_Injection__char_file_execlp_41.c
CWE78_OS_Command_Injection__char_file_execlp_41_badSink
void CWE78_OS_Command_Injection__char_file_execlp_41_badSink(undefined8 param_1) { func_0x00400bf0(&UNK_004013cb,&UNK_004013cb,&UNK_004013c8,&UNK_004013c4,param_1,0); return; }
['gcc']
13,447
void CWE78_OS_Command_Injection__char_file_execlp_41_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } CWE78_OS_Command_Injection__char_file_execlp_41_badSink(data); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119455/CWE78_OS_Command_Injection__char_file_execlp_41.c
CWE78_OS_Command_Injection__char_file_execlp_41_bad
void CWE78_OS_Command_Injection__char_file_execlp_41_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013d0,&UNK_004013ce); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013de); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } CWE78_OS_Command_Injection__char_file_execlp_41_badSink(puStack_10); return; }
['gcc']
13,448
void CWE78_OS_Command_Injection__char_file_execlp_41_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119455/CWE78_OS_Command_Injection__char_file_execlp_41.c
CWE78_OS_Command_Injection__char_file_execlp_41_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_41_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,param_1,0); return; }
['gcc']
13,449
void CWE78_OS_Command_Injection__char_file_execlp_41_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119455/CWE78_OS_Command_Injection__char_file_execlp_41.c
CWE78_OS_Command_Injection__char_file_execlp_41_good
void CWE78_OS_Command_Injection__char_file_execlp_41_good(void) { goodG2B(); return; }
['gcc']
13,450
void CWE78_OS_Command_Injection__char_file_execlp_42_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; data = badSource(data); /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119456/CWE78_OS_Command_Injection__char_file_execlp_42.c
CWE78_OS_Command_Injection__char_file_execlp_42_bad
void CWE78_OS_Command_Injection__char_file_execlp_42_bad(void) { undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; undefined8 *puStack_10; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; puStack_10 = &uStack_78; puStack_10 = (undefined8 *)badSource(puStack_10); func_0x00400bf0(&UNK_004013ea,&UNK_004013ea,&UNK_004013e7,&UNK_004013e3,puStack_10,0); return; }
['gcc']
13,451
void CWE78_OS_Command_Injection__char_file_execlp_42_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119456/CWE78_OS_Command_Injection__char_file_execlp_42.c
CWE78_OS_Command_Injection__char_file_execlp_42_good
void CWE78_OS_Command_Injection__char_file_execlp_42_good(void) { goodG2B(); return; }
['gcc']
13,452
void CWE78_OS_Command_Injection__char_file_execlp_44_bad() { char * data; /* define a function pointer */ void (*funcPtr) (char *) = badSink; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* use the function pointer */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119458/CWE78_OS_Command_Injection__char_file_execlp_44.c
CWE78_OS_Command_Injection__char_file_execlp_44_bad
void CWE78_OS_Command_Injection__char_file_execlp_44_bad(void) { long lVar1; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; long lStack_28; long lStack_20; undefined8 *puStack_18; code *pcStack_10; pcStack_10 = badSink; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; lStack_20 = func_0x00400b40(puStack_18); if (1 < 100U - lStack_20) { lStack_28 = func_0x00400be0(&UNK_004013e0,&UNK_004013de); if (lStack_28 != 0) { lVar1 = func_0x00400b80((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28); if (lVar1 == 0) { printLine(&UNK_004013ee); *(undefined *)(lStack_20 + (long)puStack_18) = 0; } func_0x00400b30(lStack_28); } } (*pcStack_10)(puStack_18); return; }
['gcc']
13,453
void CWE78_OS_Command_Injection__char_file_execlp_44_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119458/CWE78_OS_Command_Injection__char_file_execlp_44.c
CWE78_OS_Command_Injection__char_file_execlp_44_good
void CWE78_OS_Command_Injection__char_file_execlp_44_good(void) { goodG2B(); return; }
['gcc']
13,454
void CWE78_OS_Command_Injection__char_file_execlp_45_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } CWE78_OS_Command_Injection__char_file_execlp_45_badData = data; badSink(); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119459/CWE78_OS_Command_Injection__char_file_execlp_45.c
CWE78_OS_Command_Injection__char_file_execlp_45_bad
void CWE78_OS_Command_Injection__char_file_execlp_45_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013e0,&UNK_004013de); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013ee); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } CWE78_OS_Command_Injection__char_file_execlp_45_badData = puStack_10; badSink(); return; }
['gcc']
13,455
void CWE78_OS_Command_Injection__char_file_execlp_45_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119459/CWE78_OS_Command_Injection__char_file_execlp_45.c
CWE78_OS_Command_Injection__char_file_execlp_45_good
void CWE78_OS_Command_Injection__char_file_execlp_45_good(void) { goodG2B(); return; }
['gcc']
13,456
void CWE78_OS_Command_Injection__char_file_execlp_51_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } CWE78_OS_Command_Injection__char_file_execlp_51b_badSink(data); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119460/CWE78_OS_Command_Injection__char_file_execlp_51a.c
CWE78_OS_Command_Injection__char_file_execlp_51_bad
void CWE78_OS_Command_Injection__char_file_execlp_51_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013c6,&UNK_004013c4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013d4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } CWE78_OS_Command_Injection__char_file_execlp_51b_badSink(puStack_10); return; }
['gcc']
13,457
void CWE78_OS_Command_Injection__char_file_execlp_51_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119460/CWE78_OS_Command_Injection__char_file_execlp_51a.c
CWE78_OS_Command_Injection__char_file_execlp_51_good
void CWE78_OS_Command_Injection__char_file_execlp_51_good(void) { goodG2B(); return; }
['gcc']
13,458
void CWE78_OS_Command_Injection__char_file_execlp_51b_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119460/CWE78_OS_Command_Injection__char_file_execlp_51b.c
CWE78_OS_Command_Injection__char_file_execlp_51b_badSink
void CWE78_OS_Command_Injection__char_file_execlp_51b_badSink(undefined8 param_1) { func_0x00400bf0(&UNK_004013cb,&UNK_004013cb,&UNK_004013c8,&UNK_004013c4,param_1,0); return; }
['gcc']
13,459
void CWE78_OS_Command_Injection__char_file_execlp_51b_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119460/CWE78_OS_Command_Injection__char_file_execlp_51b.c
CWE78_OS_Command_Injection__char_file_execlp_51b_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_51b_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,param_1,0); return; }
['gcc']
13,460
void CWE78_OS_Command_Injection__char_file_execlp_52_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } CWE78_OS_Command_Injection__char_file_execlp_52b_badSink(data); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119461/CWE78_OS_Command_Injection__char_file_execlp_52a.c
CWE78_OS_Command_Injection__char_file_execlp_52_bad
void CWE78_OS_Command_Injection__char_file_execlp_52_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013d6,&UNK_004013d4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_004013e4); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } CWE78_OS_Command_Injection__char_file_execlp_52b_badSink(puStack_10); return; }
['gcc']
13,461
void CWE78_OS_Command_Injection__char_file_execlp_52_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119461/CWE78_OS_Command_Injection__char_file_execlp_52a.c
CWE78_OS_Command_Injection__char_file_execlp_52_good
void CWE78_OS_Command_Injection__char_file_execlp_52_good(void) { goodG2B(); return; }
['gcc']
13,462
void CWE78_OS_Command_Injection__char_file_execlp_52b_badSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_52c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119461/CWE78_OS_Command_Injection__char_file_execlp_52b.c
CWE78_OS_Command_Injection__char_file_execlp_52b_badSink
void CWE78_OS_Command_Injection__char_file_execlp_52b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_52c_badSink(param_1); return; }
['gcc']
13,463
void CWE78_OS_Command_Injection__char_file_execlp_52b_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_52c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119461/CWE78_OS_Command_Injection__char_file_execlp_52b.c
CWE78_OS_Command_Injection__char_file_execlp_52b_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_52b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_52c_goodG2BSink(param_1); return; }
['gcc']
13,464
void CWE78_OS_Command_Injection__char_file_execlp_52c_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119461/CWE78_OS_Command_Injection__char_file_execlp_52c.c
CWE78_OS_Command_Injection__char_file_execlp_52c_badSink
void CWE78_OS_Command_Injection__char_file_execlp_52c_badSink(undefined8 param_1) { func_0x00400bf0(&UNK_004013db,&UNK_004013db,&UNK_004013d8,&UNK_004013d4,param_1,0); return; }
['gcc']
13,465
void CWE78_OS_Command_Injection__char_file_execlp_52c_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119461/CWE78_OS_Command_Injection__char_file_execlp_52c.c
CWE78_OS_Command_Injection__char_file_execlp_52c_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_52c_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040121b,&UNK_0040121b,&UNK_00401218,&UNK_00401214,param_1,0); return; }
['gcc']
13,466
void CWE78_OS_Command_Injection__char_file_execlp_53_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } CWE78_OS_Command_Injection__char_file_execlp_53b_badSink(data); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119462/CWE78_OS_Command_Injection__char_file_execlp_53a.c
CWE78_OS_Command_Injection__char_file_execlp_53_bad
void CWE78_OS_Command_Injection__char_file_execlp_53_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_004013f6,&UNK_004013f4); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_00401404); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } CWE78_OS_Command_Injection__char_file_execlp_53b_badSink(puStack_10); return; }
['gcc']
13,467
void CWE78_OS_Command_Injection__char_file_execlp_53_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119462/CWE78_OS_Command_Injection__char_file_execlp_53a.c
CWE78_OS_Command_Injection__char_file_execlp_53_good
void CWE78_OS_Command_Injection__char_file_execlp_53_good(void) { goodG2B(); return; }
['gcc']
13,468
void CWE78_OS_Command_Injection__char_file_execlp_53b_badSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_53c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119462/CWE78_OS_Command_Injection__char_file_execlp_53b.c
CWE78_OS_Command_Injection__char_file_execlp_53b_badSink
void CWE78_OS_Command_Injection__char_file_execlp_53b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_53c_badSink(param_1); return; }
['gcc']
13,469
void CWE78_OS_Command_Injection__char_file_execlp_53b_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_53c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119462/CWE78_OS_Command_Injection__char_file_execlp_53b.c
CWE78_OS_Command_Injection__char_file_execlp_53b_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_53b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_53c_goodG2BSink(param_1); return; }
['gcc']
13,470
void CWE78_OS_Command_Injection__char_file_execlp_53c_badSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_53d_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119462/CWE78_OS_Command_Injection__char_file_execlp_53c.c
CWE78_OS_Command_Injection__char_file_execlp_53c_badSink
void CWE78_OS_Command_Injection__char_file_execlp_53c_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_53d_badSink(param_1); return; }
['gcc']
13,471
void CWE78_OS_Command_Injection__char_file_execlp_53c_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_53d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119462/CWE78_OS_Command_Injection__char_file_execlp_53c.c
CWE78_OS_Command_Injection__char_file_execlp_53c_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_53c_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_53d_goodG2BSink(param_1); return; }
['gcc']
13,472
void CWE78_OS_Command_Injection__char_file_execlp_53d_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119462/CWE78_OS_Command_Injection__char_file_execlp_53d.c
CWE78_OS_Command_Injection__char_file_execlp_53d_badSink
void CWE78_OS_Command_Injection__char_file_execlp_53d_badSink(undefined8 param_1) { func_0x00400bf0(&UNK_004013fb,&UNK_004013fb,&UNK_004013f8,&UNK_004013f4,param_1,0); return; }
['gcc']
13,473
void CWE78_OS_Command_Injection__char_file_execlp_53d_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119462/CWE78_OS_Command_Injection__char_file_execlp_53d.c
CWE78_OS_Command_Injection__char_file_execlp_53d_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_53d_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040123b,&UNK_0040123b,&UNK_00401238,&UNK_00401234,param_1,0); return; }
['gcc']
13,474
void CWE78_OS_Command_Injection__char_file_execlp_54_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } CWE78_OS_Command_Injection__char_file_execlp_54b_badSink(data); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119463/CWE78_OS_Command_Injection__char_file_execlp_54a.c
CWE78_OS_Command_Injection__char_file_execlp_54_bad
void CWE78_OS_Command_Injection__char_file_execlp_54_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400b40(puStack_10); if (1 < 100U - lStack_18) { lStack_20 = func_0x00400be0(&UNK_00401416,&UNK_00401414); if (lStack_20 != 0) { lVar1 = func_0x00400b80((long)puStack_10 + lStack_18,100 - (int)lStack_18,lStack_20); if (lVar1 == 0) { printLine(&UNK_00401424); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } func_0x00400b30(lStack_20); } } CWE78_OS_Command_Injection__char_file_execlp_54b_badSink(puStack_10); return; }
['gcc']
13,475
void CWE78_OS_Command_Injection__char_file_execlp_54_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119463/CWE78_OS_Command_Injection__char_file_execlp_54a.c
CWE78_OS_Command_Injection__char_file_execlp_54_good
void CWE78_OS_Command_Injection__char_file_execlp_54_good(void) { goodG2B(); return; }
['gcc']
13,476
void CWE78_OS_Command_Injection__char_file_execlp_54b_badSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_54c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119463/CWE78_OS_Command_Injection__char_file_execlp_54b.c
CWE78_OS_Command_Injection__char_file_execlp_54b_badSink
void CWE78_OS_Command_Injection__char_file_execlp_54b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_54c_badSink(param_1); return; }
['gcc']
13,477
void CWE78_OS_Command_Injection__char_file_execlp_54b_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_54c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119463/CWE78_OS_Command_Injection__char_file_execlp_54b.c
CWE78_OS_Command_Injection__char_file_execlp_54b_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_54b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_54c_goodG2BSink(param_1); return; }
['gcc']
13,478
void CWE78_OS_Command_Injection__char_file_execlp_54c_badSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_54d_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119463/CWE78_OS_Command_Injection__char_file_execlp_54c.c
CWE78_OS_Command_Injection__char_file_execlp_54c_badSink
void CWE78_OS_Command_Injection__char_file_execlp_54c_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_54d_badSink(param_1); return; }
['gcc']
13,479
void CWE78_OS_Command_Injection__char_file_execlp_54c_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_54d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119463/CWE78_OS_Command_Injection__char_file_execlp_54c.c
CWE78_OS_Command_Injection__char_file_execlp_54c_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_54c_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_54d_goodG2BSink(param_1); return; }
['gcc']
13,480
void CWE78_OS_Command_Injection__char_file_execlp_54d_badSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_54e_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119463/CWE78_OS_Command_Injection__char_file_execlp_54d.c
CWE78_OS_Command_Injection__char_file_execlp_54d_badSink
void CWE78_OS_Command_Injection__char_file_execlp_54d_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_54e_badSink(param_1); return; }
['gcc']
13,481
void CWE78_OS_Command_Injection__char_file_execlp_54d_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_file_execlp_54e_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119463/CWE78_OS_Command_Injection__char_file_execlp_54d.c
CWE78_OS_Command_Injection__char_file_execlp_54d_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_54d_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_file_execlp_54e_goodG2BSink(param_1); return; }
['gcc']
13,482
void CWE78_OS_Command_Injection__char_file_execlp_54e_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119463/CWE78_OS_Command_Injection__char_file_execlp_54e.c
CWE78_OS_Command_Injection__char_file_execlp_54e_badSink
void CWE78_OS_Command_Injection__char_file_execlp_54e_badSink(undefined8 param_1) { func_0x00400bf0(&UNK_0040141b,&UNK_0040141b,&UNK_00401418,&UNK_00401414,param_1,0); return; }
['gcc']
13,483
void CWE78_OS_Command_Injection__char_file_execlp_54e_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119463/CWE78_OS_Command_Injection__char_file_execlp_54e.c
CWE78_OS_Command_Injection__char_file_execlp_54e_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_54e_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040125b,&UNK_0040125b,&UNK_00401258,&UNK_00401254,param_1,0); return; }
['gcc']
13,484
void CWE78_OS_Command_Injection__char_file_execlp_61_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; data = CWE78_OS_Command_Injection__char_file_execlp_61b_badSource(data); /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119464/CWE78_OS_Command_Injection__char_file_execlp_61a.c
CWE78_OS_Command_Injection__char_file_execlp_61_bad
void CWE78_OS_Command_Injection__char_file_execlp_61_bad(void) { undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; undefined8 *puStack_10; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; puStack_10 = &uStack_78; puStack_10 = (undefined8 *)CWE78_OS_Command_Injection__char_file_execlp_61b_badSource(puStack_10); func_0x00400bf0(&UNK_004013cb,&UNK_004013cb,&UNK_004013c8,&UNK_004013c4,puStack_10,0); return; }
['gcc']
13,485
void CWE78_OS_Command_Injection__char_file_execlp_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119464/CWE78_OS_Command_Injection__char_file_execlp_61a.c
CWE78_OS_Command_Injection__char_file_execlp_61_good
void CWE78_OS_Command_Injection__char_file_execlp_61_good(void) { goodG2B(); return; }
['gcc']
13,486
char * CWE78_OS_Command_Injection__char_file_execlp_61b_badSource(char * data) { { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } return data; }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119464/CWE78_OS_Command_Injection__char_file_execlp_61b.c
CWE78_OS_Command_Injection__char_file_execlp_61b_badSource
long CWE78_OS_Command_Injection__char_file_execlp_61b_badSource(long param_1) { long lVar1; long lVar2; long lVar3; lVar1 = func_0x00400b40(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400be0(&UNK_004013c6,&UNK_004013c4); if (lVar2 != 0) { lVar3 = func_0x00400b80(param_1 + lVar1,100 - (int)lVar1,lVar2); if (lVar3 == 0) { printLine(&UNK_004013d4); *(undefined *)(lVar1 + param_1) = 0; } func_0x00400b30(lVar2); } } return param_1; }
['gcc']
13,487
char * CWE78_OS_Command_Injection__char_file_execlp_61b_goodG2BSource(char * data) { /* FIX: Append a fixed string to data (not user / external input) */ strcat(data, "*.*"); return data; }
['/* FIX: Append a fixed string to data (not user / external input) */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119464/CWE78_OS_Command_Injection__char_file_execlp_61b.c
CWE78_OS_Command_Injection__char_file_execlp_61b_goodG2BSource
char * CWE78_OS_Command_Injection__char_file_execlp_61b_goodG2BSource(char *param_1) { char cVar1; ulong uVar2; char *pcVar3; uVar2 = 0xffffffffffffffff; pcVar3 = param_1; do { if (uVar2 == 0) break; uVar2 = uVar2 - 1; cVar1 = *pcVar3; pcVar3 = pcVar3 + 1; } while (cVar1 != '\0'); *(undefined4 *)(param_1 + (~uVar2 - 1)) = 0x2a2e2a; return param_1; }
['gcc']
13,488
void CWE78_OS_Command_Injection__char_file_execlp_63_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } CWE78_OS_Command_Injection__char_file_execlp_63b_badSink(&data); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119466/CWE78_OS_Command_Injection__char_file_execlp_63a.c
CWE78_OS_Command_Injection__char_file_execlp_63_bad
void CWE78_OS_Command_Injection__char_file_execlp_63_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; undefined8 *puStack_20; long lStack_18; long lStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_20 = &uStack_88; lStack_10 = func_0x00400b40(puStack_20); if (1 < 100U - lStack_10) { lStack_18 = func_0x00400be0(&UNK_004013c6,&UNK_004013c4); if (lStack_18 != 0) { lVar1 = func_0x00400b80((long)puStack_20 + lStack_10,100 - (int)lStack_10,lStack_18); if (lVar1 == 0) { printLine(&UNK_004013d4); *(undefined *)(lStack_10 + (long)puStack_20) = 0; } func_0x00400b30(lStack_18); } } CWE78_OS_Command_Injection__char_file_execlp_63b_badSink(&puStack_20); return; }
['gcc']
13,489
void CWE78_OS_Command_Injection__char_file_execlp_63_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119466/CWE78_OS_Command_Injection__char_file_execlp_63a.c
CWE78_OS_Command_Injection__char_file_execlp_63_good
void CWE78_OS_Command_Injection__char_file_execlp_63_good(void) { goodG2B(); return; }
['gcc']
13,490
void CWE78_OS_Command_Injection__char_file_execlp_63b_badSink(char * * dataPtr) { char * data = *dataPtr; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119466/CWE78_OS_Command_Injection__char_file_execlp_63b.c
CWE78_OS_Command_Injection__char_file_execlp_63b_badSink
void CWE78_OS_Command_Injection__char_file_execlp_63b_badSink(undefined8 *param_1) { func_0x00400bf0(&UNK_004013cb,&UNK_004013cb,&UNK_004013c8,&UNK_004013c4,*param_1,0); return; }
['gcc']
13,491
void CWE78_OS_Command_Injection__char_file_execlp_63b_goodG2BSink(char * * dataPtr) { char * data = *dataPtr; /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119466/CWE78_OS_Command_Injection__char_file_execlp_63b.c
CWE78_OS_Command_Injection__char_file_execlp_63b_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_63b_goodG2BSink(undefined8 *param_1) { func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,*param_1,0); return; }
['gcc']
13,492
void CWE78_OS_Command_Injection__char_file_execlp_64_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } CWE78_OS_Command_Injection__char_file_execlp_64b_badSink(&data); }
['/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119467/CWE78_OS_Command_Injection__char_file_execlp_64a.c
CWE78_OS_Command_Injection__char_file_execlp_64_bad
void CWE78_OS_Command_Injection__char_file_execlp_64_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; undefined8 *puStack_20; long lStack_18; long lStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_20 = &uStack_88; lStack_10 = func_0x00400b40(puStack_20); if (1 < 100U - lStack_10) { lStack_18 = func_0x00400be0(&UNK_004013d6,&UNK_004013d4); if (lStack_18 != 0) { lVar1 = func_0x00400b80((long)puStack_20 + lStack_10,100 - (int)lStack_10,lStack_18); if (lVar1 == 0) { printLine(&UNK_004013e4); *(undefined *)(lStack_10 + (long)puStack_20) = 0; } func_0x00400b30(lStack_18); } } CWE78_OS_Command_Injection__char_file_execlp_64b_badSink(&puStack_20); return; }
['gcc']
13,493
void CWE78_OS_Command_Injection__char_file_execlp_64_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119467/CWE78_OS_Command_Injection__char_file_execlp_64a.c
CWE78_OS_Command_Injection__char_file_execlp_64_good
void CWE78_OS_Command_Injection__char_file_execlp_64_good(void) { goodG2B(); return; }
['gcc']
13,494
void CWE78_OS_Command_Injection__char_file_execlp_64b_badSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ char * * dataPtr = (char * *)dataVoidPtr; /* dereference dataPtr into data */ char * data = (*dataPtr); /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119467/CWE78_OS_Command_Injection__char_file_execlp_64b.c
CWE78_OS_Command_Injection__char_file_execlp_64b_badSink
void CWE78_OS_Command_Injection__char_file_execlp_64b_badSink(undefined8 *param_1) { func_0x00400bf0(&UNK_004013db,&UNK_004013db,&UNK_004013d8,&UNK_004013d4,*param_1,0); return; }
['gcc']
13,495
void CWE78_OS_Command_Injection__char_file_execlp_64b_goodG2BSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ char * * dataPtr = (char * *)dataVoidPtr; /* dereference dataPtr into data */ char * data = (*dataPtr); /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119467/CWE78_OS_Command_Injection__char_file_execlp_64b.c
CWE78_OS_Command_Injection__char_file_execlp_64b_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_64b_goodG2BSink(undefined8 *param_1) { func_0x00400a80(&UNK_0040121b,&UNK_0040121b,&UNK_00401218,&UNK_00401214,*param_1,0); return; }
['gcc']
13,496
void CWE78_OS_Command_Injection__char_file_execlp_65_bad() { char * data; /* define a function pointer */ void (*funcPtr) (char *) = CWE78_OS_Command_Injection__char_file_execlp_65b_badSink; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from a file */ size_t dataLen = strlen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgets(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } fclose(pFile); } } } /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Read input from a file */', '/* if there is room in data, attempt to read the input from a file */', '/* POTENTIAL FLAW: Read data from a file */', '/* Restore NUL terminator if fgets fails */', '/* use the function pointer */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119468/CWE78_OS_Command_Injection__char_file_execlp_65a.c
CWE78_OS_Command_Injection__char_file_execlp_65_bad
void CWE78_OS_Command_Injection__char_file_execlp_65_bad(void) { long lVar1; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined4 uStack_38; long lStack_28; long lStack_20; undefined8 *puStack_18; code *pcStack_10; pcStack_10 = CWE78_OS_Command_Injection__char_file_execlp_65b_badSink; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; puStack_18 = &uStack_98; lStack_20 = func_0x00400b40(puStack_18); if (1 < 100U - lStack_20) { lStack_28 = func_0x00400be0(&UNK_004013d6,&UNK_004013d4); if (lStack_28 != 0) { lVar1 = func_0x00400b80((long)puStack_18 + lStack_20,100 - (int)lStack_20,lStack_28); if (lVar1 == 0) { printLine(&UNK_004013e4); *(undefined *)(lStack_20 + (long)puStack_18) = 0; } func_0x00400b30(lStack_28); } } (*pcStack_10)(puStack_18); return; }
['gcc']
13,497
void CWE78_OS_Command_Injection__char_file_execlp_65_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119468/CWE78_OS_Command_Injection__char_file_execlp_65a.c
CWE78_OS_Command_Injection__char_file_execlp_65_good
void CWE78_OS_Command_Injection__char_file_execlp_65_good(void) { goodG2B(); return; }
['gcc']
13,498
void CWE78_OS_Command_Injection__char_file_execlp_65b_badSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119468/CWE78_OS_Command_Injection__char_file_execlp_65b.c
CWE78_OS_Command_Injection__char_file_execlp_65b_badSink
void CWE78_OS_Command_Injection__char_file_execlp_65b_badSink(undefined8 param_1) { func_0x00400bf0(&UNK_004013db,&UNK_004013db,&UNK_004013d8,&UNK_004013d4,param_1,0); return; }
['gcc']
13,499
void CWE78_OS_Command_Injection__char_file_execlp_65b_goodG2BSink(char * data) { /* execlp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execlp - searches for the location of the command among\r\n * the directories specified by the PATH environment variable */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/119468/CWE78_OS_Command_Injection__char_file_execlp_65b.c
CWE78_OS_Command_Injection__char_file_execlp_65b_goodG2BSink
void CWE78_OS_Command_Injection__char_file_execlp_65b_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,param_1,0); return; }
['gcc']