Unnamed: 0
int64
0
56k
source_code
stringlengths
55
5.98k
comments
stringlengths
2
1.76k
label
stringclasses
68 values
dataset_name
stringclasses
1 value
file_name
stringlengths
208
265
function
stringlengths
27
87
decompiled_code
stringlengths
68
3.97k
compiler_options
stringclasses
1 value
12,600
void CWE78_OS_Command_Injection__char_console_execl_53c_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_console_execl_53d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118454/CWE78_OS_Command_Injection__char_console_execl_53c.c
CWE78_OS_Command_Injection__char_console_execl_53c_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_53c_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execl_53d_goodG2BSink(param_1); return; }
['gcc']
12,601
void CWE78_OS_Command_Injection__char_console_execl_53d_badSink(char * data) { /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118454/CWE78_OS_Command_Injection__char_console_execl_53d.c
CWE78_OS_Command_Injection__char_console_execl_53d_badSink
void CWE78_OS_Command_Injection__char_console_execl_53d_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040137b,&UNK_0040137b,&UNK_00401378,&UNK_00401374,param_1,0); return; }
['gcc']
12,602
void CWE78_OS_Command_Injection__char_console_execl_53d_goodG2BSink(char * data) { /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118454/CWE78_OS_Command_Injection__char_console_execl_53d.c
CWE78_OS_Command_Injection__char_console_execl_53d_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_53d_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040123b,&UNK_0040123b,&UNK_00401238,&UNK_00401234,param_1,0); return; }
['gcc']
12,603
void CWE78_OS_Command_Injection__char_console_execl_54_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execl_54b_badSink(data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118455/CWE78_OS_Command_Injection__char_console_execl_54a.c
CWE78_OS_Command_Injection__char_console_execl_54_bad
void CWE78_OS_Command_Injection__char_console_execl_54_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401394); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execl_54b_badSink(puStack_10); return; }
['gcc']
12,604
void CWE78_OS_Command_Injection__char_console_execl_54_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118455/CWE78_OS_Command_Injection__char_console_execl_54a.c
CWE78_OS_Command_Injection__char_console_execl_54_good
void CWE78_OS_Command_Injection__char_console_execl_54_good(void) { goodG2B(); return; }
['gcc']
12,605
void CWE78_OS_Command_Injection__char_console_execl_54b_badSink(char * data) { CWE78_OS_Command_Injection__char_console_execl_54c_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118455/CWE78_OS_Command_Injection__char_console_execl_54b.c
CWE78_OS_Command_Injection__char_console_execl_54b_badSink
void CWE78_OS_Command_Injection__char_console_execl_54b_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execl_54c_badSink(param_1); return; }
['gcc']
12,606
void CWE78_OS_Command_Injection__char_console_execl_54b_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_console_execl_54c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118455/CWE78_OS_Command_Injection__char_console_execl_54b.c
CWE78_OS_Command_Injection__char_console_execl_54b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_54b_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execl_54c_goodG2BSink(param_1); return; }
['gcc']
12,607
void CWE78_OS_Command_Injection__char_console_execl_54c_badSink(char * data) { CWE78_OS_Command_Injection__char_console_execl_54d_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118455/CWE78_OS_Command_Injection__char_console_execl_54c.c
CWE78_OS_Command_Injection__char_console_execl_54c_badSink
void CWE78_OS_Command_Injection__char_console_execl_54c_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execl_54d_badSink(param_1); return; }
['gcc']
12,608
void CWE78_OS_Command_Injection__char_console_execl_54c_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_console_execl_54d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118455/CWE78_OS_Command_Injection__char_console_execl_54c.c
CWE78_OS_Command_Injection__char_console_execl_54c_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_54c_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execl_54d_goodG2BSink(param_1); return; }
['gcc']
12,609
void CWE78_OS_Command_Injection__char_console_execl_54d_badSink(char * data) { CWE78_OS_Command_Injection__char_console_execl_54e_badSink(data); }
[]
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118455/CWE78_OS_Command_Injection__char_console_execl_54d.c
CWE78_OS_Command_Injection__char_console_execl_54d_badSink
void CWE78_OS_Command_Injection__char_console_execl_54d_badSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execl_54e_badSink(param_1); return; }
['gcc']
12,610
void CWE78_OS_Command_Injection__char_console_execl_54d_goodG2BSink(char * data) { CWE78_OS_Command_Injection__char_console_execl_54e_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118455/CWE78_OS_Command_Injection__char_console_execl_54d.c
CWE78_OS_Command_Injection__char_console_execl_54d_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_54d_goodG2BSink(undefined8 param_1) { CWE78_OS_Command_Injection__char_console_execl_54e_goodG2BSink(param_1); return; }
['gcc']
12,611
void CWE78_OS_Command_Injection__char_console_execl_54e_badSink(char * data) { /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118455/CWE78_OS_Command_Injection__char_console_execl_54e.c
CWE78_OS_Command_Injection__char_console_execl_54e_badSink
void CWE78_OS_Command_Injection__char_console_execl_54e_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040139b,&UNK_0040139b,&UNK_00401398,&UNK_00401394,param_1,0); return; }
['gcc']
12,612
void CWE78_OS_Command_Injection__char_console_execl_54e_goodG2BSink(char * data) { /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118455/CWE78_OS_Command_Injection__char_console_execl_54e.c
CWE78_OS_Command_Injection__char_console_execl_54e_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_54e_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040125b,&UNK_0040125b,&UNK_00401258,&UNK_00401254,param_1,0); return; }
['gcc']
12,613
void CWE78_OS_Command_Injection__char_console_execl_61_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; data = CWE78_OS_Command_Injection__char_console_execl_61b_badSource(data); /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118456/CWE78_OS_Command_Injection__char_console_execl_61a.c
CWE78_OS_Command_Injection__char_console_execl_61_bad
void CWE78_OS_Command_Injection__char_console_execl_61_bad(void) { undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; undefined8 *puStack_10; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; puStack_10 = &uStack_78; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__char_console_execl_61b_badSource(puStack_10); func_0x00400b50(&UNK_0040134b,&UNK_0040134b,&UNK_00401348,&UNK_00401344,puStack_10,0); return; }
['gcc']
12,614
void CWE78_OS_Command_Injection__char_console_execl_61_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118456/CWE78_OS_Command_Injection__char_console_execl_61a.c
CWE78_OS_Command_Injection__char_console_execl_61_good
void CWE78_OS_Command_Injection__char_console_execl_61_good(void) { goodG2B(); return; }
['gcc']
12,615
char * CWE78_OS_Command_Injection__char_console_execl_61b_badSource(char * data) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } return data; }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118456/CWE78_OS_Command_Injection__char_console_execl_61b.c
CWE78_OS_Command_Injection__char_console_execl_61b_badSource
long CWE78_OS_Command_Injection__char_console_execl_61b_badSource(long param_1) { long lVar1; long lVar2; lVar1 = func_0x00400ab0(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400af0(param_1 + lVar1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401344); *(undefined *)(lVar1 + param_1) = 0; } else { lVar1 = func_0x00400ab0(param_1); if ((lVar1 != 0) && (*(char *)(param_1 + lVar1 + -1) == '\n')) { *(undefined *)(param_1 + lVar1 + -1) = 0; } } } return param_1; }
['gcc']
12,616
char * CWE78_OS_Command_Injection__char_console_execl_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/118456/CWE78_OS_Command_Injection__char_console_execl_61b.c
CWE78_OS_Command_Injection__char_console_execl_61b_goodG2BSource
char * CWE78_OS_Command_Injection__char_console_execl_61b_goodG2BSource(char *param_1) { char cVar1; ulong uVar2; char *pcVar3; uVar2 = 0xffffffffffffffff; pcVar3 = param_1; do { if (uVar2 == 0) break; uVar2 = uVar2 - 1; cVar1 = *pcVar3; pcVar3 = pcVar3 + 1; } while (cVar1 != '\0'); *(undefined4 *)(param_1 + (~uVar2 - 1)) = 0x2a2e2a; return param_1; }
['gcc']
12,617
void CWE78_OS_Command_Injection__char_console_execl_63_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execl_63b_badSink(&data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118458/CWE78_OS_Command_Injection__char_console_execl_63a.c
CWE78_OS_Command_Injection__char_console_execl_63_bad
void CWE78_OS_Command_Injection__char_console_execl_63_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; undefined8 *puStack_18; long lStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_10 = func_0x00400ab0(puStack_18); if (1 < 100U - lStack_10) { lVar1 = func_0x00400af0((long)puStack_18 + lStack_10,100 - (int)lStack_10,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_10 + (long)puStack_18) = 0; } else { lStack_10 = func_0x00400ab0(puStack_18); if ((lStack_10 != 0) && (*(char *)((long)puStack_18 + lStack_10 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_10 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execl_63b_badSink(&puStack_18); return; }
['gcc']
12,618
void CWE78_OS_Command_Injection__char_console_execl_63_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118458/CWE78_OS_Command_Injection__char_console_execl_63a.c
CWE78_OS_Command_Injection__char_console_execl_63_good
void CWE78_OS_Command_Injection__char_console_execl_63_good(void) { goodG2B(); return; }
['gcc']
12,619
void CWE78_OS_Command_Injection__char_console_execl_63b_badSink(char * * dataPtr) { char * data = *dataPtr; /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118458/CWE78_OS_Command_Injection__char_console_execl_63b.c
CWE78_OS_Command_Injection__char_console_execl_63b_badSink
void CWE78_OS_Command_Injection__char_console_execl_63b_badSink(undefined8 *param_1) { func_0x00400b50(&UNK_0040134b,&UNK_0040134b,&UNK_00401348,&UNK_00401344,*param_1,0); return; }
['gcc']
12,620
void CWE78_OS_Command_Injection__char_console_execl_63b_goodG2BSink(char * * dataPtr) { char * data = *dataPtr; /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118458/CWE78_OS_Command_Injection__char_console_execl_63b.c
CWE78_OS_Command_Injection__char_console_execl_63b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_63b_goodG2BSink(undefined8 *param_1) { func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,*param_1,0); return; }
['gcc']
12,621
void CWE78_OS_Command_Injection__char_console_execl_64_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execl_64b_badSink(&data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118459/CWE78_OS_Command_Injection__char_console_execl_64a.c
CWE78_OS_Command_Injection__char_console_execl_64_bad
void CWE78_OS_Command_Injection__char_console_execl_64_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; undefined8 *puStack_18; long lStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_10 = func_0x00400ab0(puStack_18); if (1 < 100U - lStack_10) { lVar1 = func_0x00400af0((long)puStack_18 + lStack_10,100 - (int)lStack_10,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); *(undefined *)(lStack_10 + (long)puStack_18) = 0; } else { lStack_10 = func_0x00400ab0(puStack_18); if ((lStack_10 != 0) && (*(char *)((long)puStack_18 + lStack_10 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_10 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execl_64b_badSink(&puStack_18); return; }
['gcc']
12,622
void CWE78_OS_Command_Injection__char_console_execl_64_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118459/CWE78_OS_Command_Injection__char_console_execl_64a.c
CWE78_OS_Command_Injection__char_console_execl_64_good
void CWE78_OS_Command_Injection__char_console_execl_64_good(void) { goodG2B(); return; }
['gcc']
12,623
void CWE78_OS_Command_Injection__char_console_execl_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); /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118459/CWE78_OS_Command_Injection__char_console_execl_64b.c
CWE78_OS_Command_Injection__char_console_execl_64b_badSink
void CWE78_OS_Command_Injection__char_console_execl_64b_badSink(undefined8 *param_1) { func_0x00400b50(&UNK_0040135b,&UNK_0040135b,&UNK_00401358,&UNK_00401354,*param_1,0); return; }
['gcc']
12,624
void CWE78_OS_Command_Injection__char_console_execl_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); /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118459/CWE78_OS_Command_Injection__char_console_execl_64b.c
CWE78_OS_Command_Injection__char_console_execl_64b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_64b_goodG2BSink(undefined8 *param_1) { func_0x00400a80(&UNK_0040121b,&UNK_0040121b,&UNK_00401218,&UNK_00401214,*param_1,0); return; }
['gcc']
12,625
void CWE78_OS_Command_Injection__char_console_execl_65_bad() { char * data; /* define a function pointer */ void (*funcPtr) (char *) = CWE78_OS_Command_Injection__char_console_execl_65b_badSink; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* use the function pointer */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118460/CWE78_OS_Command_Injection__char_console_execl_65a.c
CWE78_OS_Command_Injection__char_console_execl_65_bad
void CWE78_OS_Command_Injection__char_console_execl_65_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; undefined8 *puStack_18; code *pcStack_10; pcStack_10 = CWE78_OS_Command_Injection__char_console_execl_65b_badSink; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_20 = func_0x00400ab0(puStack_18); if (1 < 100U - lStack_20) { lVar1 = func_0x00400af0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_20 + (long)puStack_18) = 0; } else { lStack_20 = func_0x00400ab0(puStack_18); if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_20 + -1) = 0; } } } (*pcStack_10)(puStack_18); return; }
['gcc']
12,626
void CWE78_OS_Command_Injection__char_console_execl_65_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118460/CWE78_OS_Command_Injection__char_console_execl_65a.c
CWE78_OS_Command_Injection__char_console_execl_65_good
void CWE78_OS_Command_Injection__char_console_execl_65_good(void) { goodG2B(); return; }
['gcc']
12,627
void CWE78_OS_Command_Injection__char_console_execl_65b_badSink(char * data) { /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118460/CWE78_OS_Command_Injection__char_console_execl_65b.c
CWE78_OS_Command_Injection__char_console_execl_65b_badSink
void CWE78_OS_Command_Injection__char_console_execl_65b_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040134b,&UNK_0040134b,&UNK_00401348,&UNK_00401344,param_1,0); return; }
['gcc']
12,628
void CWE78_OS_Command_Injection__char_console_execl_65b_goodG2BSink(char * data) { /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118460/CWE78_OS_Command_Injection__char_console_execl_65b.c
CWE78_OS_Command_Injection__char_console_execl_65b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_65b_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,param_1,0); return; }
['gcc']
12,629
void CWE78_OS_Command_Injection__char_console_execl_66_bad() { char * data; char * dataArray[5]; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } /* put data in array */ dataArray[2] = data; CWE78_OS_Command_Injection__char_console_execl_66b_badSink(dataArray); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* put data in array */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118461/CWE78_OS_Command_Injection__char_console_execl_66a.c
CWE78_OS_Command_Injection__char_console_execl_66_bad
void CWE78_OS_Command_Injection__char_console_execl_66_bad(void) { long lVar1; undefined8 uStack_b8; undefined8 uStack_b0; undefined8 uStack_a8; undefined8 uStack_a0; undefined8 uStack_98; undefined8 uStack_90; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined4 uStack_58; undefined auStack_48 [16]; undefined8 *puStack_38; long lStack_18; undefined8 *puStack_10; uStack_b8 = 0; uStack_b0 = 0; uStack_a8 = 0; uStack_a0 = 0; uStack_98 = 0; uStack_90 = 0; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; puStack_10 = &uStack_b8; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401364); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } puStack_38 = puStack_10; CWE78_OS_Command_Injection__char_console_execl_66b_badSink(auStack_48); return; }
['gcc']
12,630
void CWE78_OS_Command_Injection__char_console_execl_66_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118461/CWE78_OS_Command_Injection__char_console_execl_66a.c
CWE78_OS_Command_Injection__char_console_execl_66_good
void CWE78_OS_Command_Injection__char_console_execl_66_good(void) { goodG2B(); return; }
['gcc']
12,631
void CWE78_OS_Command_Injection__char_console_execl_66b_badSink(char * dataArray[]) { /* copy data out of dataArray */ char * data = dataArray[2]; /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* copy data out of dataArray */', '/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118461/CWE78_OS_Command_Injection__char_console_execl_66b.c
CWE78_OS_Command_Injection__char_console_execl_66b_badSink
void CWE78_OS_Command_Injection__char_console_execl_66b_badSink(long param_1) { func_0x00400b50(&UNK_0040136b,&UNK_0040136b,&UNK_00401368,&UNK_00401364, *(undefined8 *)(param_1 + 0x10),0); return; }
['gcc']
12,632
void CWE78_OS_Command_Injection__char_console_execl_66b_goodG2BSink(char * dataArray[]) { char * data = dataArray[2]; /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118461/CWE78_OS_Command_Injection__char_console_execl_66b.c
CWE78_OS_Command_Injection__char_console_execl_66b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_66b_goodG2BSink(long param_1) { func_0x00400a80(&UNK_0040122b,&UNK_0040122b,&UNK_00401228,&UNK_00401224, *(undefined8 *)(param_1 + 0x10),0); return; }
['gcc']
12,633
void CWE78_OS_Command_Injection__char_console_execl_67_bad() { char * data; CWE78_OS_Command_Injection__char_console_execl_67_structType myStruct; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } myStruct.structFirst = data; CWE78_OS_Command_Injection__char_console_execl_67b_badSink(myStruct); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118462/CWE78_OS_Command_Injection__char_console_execl_67a.c
CWE78_OS_Command_Injection__char_console_execl_67_bad
void CWE78_OS_Command_Injection__char_console_execl_67_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; undefined8 *puStack_20; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } puStack_20 = puStack_10; CWE78_OS_Command_Injection__char_console_execl_67b_badSink(puStack_10); return; }
['gcc']
12,634
void CWE78_OS_Command_Injection__char_console_execl_67_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118462/CWE78_OS_Command_Injection__char_console_execl_67a.c
CWE78_OS_Command_Injection__char_console_execl_67_good
void CWE78_OS_Command_Injection__char_console_execl_67_good(void) { goodG2B(); return; }
['gcc']
12,635
void CWE78_OS_Command_Injection__char_console_execl_67b_badSink(CWE78_OS_Command_Injection__char_console_execl_67_structType myStruct) { char * data = myStruct.structFirst; /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118462/CWE78_OS_Command_Injection__char_console_execl_67b.c
CWE78_OS_Command_Injection__char_console_execl_67b_badSink
void CWE78_OS_Command_Injection__char_console_execl_67b_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040135b,&UNK_0040135b,&UNK_00401358,&UNK_00401354,param_1,0); return; }
['gcc']
12,636
void CWE78_OS_Command_Injection__char_console_execl_67b_goodG2BSink(CWE78_OS_Command_Injection__char_console_execl_67_structType myStruct) { char * data = myStruct.structFirst; /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118462/CWE78_OS_Command_Injection__char_console_execl_67b.c
CWE78_OS_Command_Injection__char_console_execl_67b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_67b_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040121b,&UNK_0040121b,&UNK_00401218,&UNK_00401214,param_1,0); return; }
['gcc']
12,637
void CWE78_OS_Command_Injection__char_console_execl_68_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execl_68_badData = data; CWE78_OS_Command_Injection__char_console_execl_68b_badSink(); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118463/CWE78_OS_Command_Injection__char_console_execl_68a.c
CWE78_OS_Command_Injection__char_console_execl_68_bad
void CWE78_OS_Command_Injection__char_console_execl_68_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401354); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execl_68_badData = puStack_10; CWE78_OS_Command_Injection__char_console_execl_68b_badSink(); return; }
['gcc']
12,638
void CWE78_OS_Command_Injection__char_console_execl_68_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118463/CWE78_OS_Command_Injection__char_console_execl_68a.c
CWE78_OS_Command_Injection__char_console_execl_68_good
void CWE78_OS_Command_Injection__char_console_execl_68_good(void) { goodG2B(); return; }
['gcc']
12,639
void CWE78_OS_Command_Injection__char_console_execl_68b_badSink() { char * data = CWE78_OS_Command_Injection__char_console_execl_68_badData; /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118463/CWE78_OS_Command_Injection__char_console_execl_68b.c
CWE78_OS_Command_Injection__char_console_execl_68b_badSink
void CWE78_OS_Command_Injection__char_console_execl_68b_badSink(void) { func_0x00400b50(&UNK_0040135b,&UNK_0040135b,&UNK_00401358,&UNK_00401354, CWE78_OS_Command_Injection__char_console_execl_68_badData,0); return; }
['gcc']
12,640
void CWE78_OS_Command_Injection__char_console_execl_68b_goodG2BSink() { char * data = CWE78_OS_Command_Injection__char_console_execl_68_goodG2BData; /* execl - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECL(COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); }
['/* execl - specify the path where the command is located */', '/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118463/CWE78_OS_Command_Injection__char_console_execl_68b.c
CWE78_OS_Command_Injection__char_console_execl_68b_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execl_68b_goodG2BSink(void) { func_0x00400a80(&UNK_0040121b,&UNK_0040121b,&UNK_00401218,&UNK_00401214, CWE78_OS_Command_Injection__char_console_execl_68_goodG2BData,0); return; }
['gcc']
12,641
void CWE78_OS_Command_Injection__char_console_execlp_01_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118471/CWE78_OS_Command_Injection__char_console_execlp_01.c
CWE78_OS_Command_Injection__char_console_execlp_01_bad
void CWE78_OS_Command_Injection__char_console_execlp_01_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0); return; }
['gcc']
12,642
void CWE78_OS_Command_Injection__char_console_execlp_01_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118471/CWE78_OS_Command_Injection__char_console_execlp_01.c
CWE78_OS_Command_Injection__char_console_execlp_01_good
void CWE78_OS_Command_Injection__char_console_execlp_01_good(void) { goodG2B(); return; }
['gcc']
12,643
void CWE78_OS_Command_Injection__char_console_execlp_02_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(1) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118472/CWE78_OS_Command_Injection__char_console_execlp_02.c
CWE78_OS_Command_Injection__char_console_execlp_02_bad
void CWE78_OS_Command_Injection__char_console_execlp_02_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0); return; }
['gcc']
12,644
void CWE78_OS_Command_Injection__char_console_execlp_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118472/CWE78_OS_Command_Injection__char_console_execlp_02.c
CWE78_OS_Command_Injection__char_console_execlp_02_good
void CWE78_OS_Command_Injection__char_console_execlp_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,645
void CWE78_OS_Command_Injection__char_console_execlp_03_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(5==5) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118473/CWE78_OS_Command_Injection__char_console_execlp_03.c
CWE78_OS_Command_Injection__char_console_execlp_03_bad
void CWE78_OS_Command_Injection__char_console_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_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0); return; }
['gcc']
12,646
void CWE78_OS_Command_Injection__char_console_execlp_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118473/CWE78_OS_Command_Injection__char_console_execlp_03.c
CWE78_OS_Command_Injection__char_console_execlp_03_good
void CWE78_OS_Command_Injection__char_console_execlp_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,647
void CWE78_OS_Command_Injection__char_console_execlp_04_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(STATIC_CONST_TRUE) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118474/CWE78_OS_Command_Injection__char_console_execlp_04.c
CWE78_OS_Command_Injection__char_console_execlp_04_bad
void CWE78_OS_Command_Injection__char_console_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_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_0040133c); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } func_0x00400b50(&UNK_00401352,&UNK_00401352,&UNK_0040134f,&UNK_0040134b,puStack_10,0); return; }
['gcc']
12,648
void CWE78_OS_Command_Injection__char_console_execlp_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118474/CWE78_OS_Command_Injection__char_console_execlp_04.c
CWE78_OS_Command_Injection__char_console_execlp_04_good
void CWE78_OS_Command_Injection__char_console_execlp_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,649
void CWE78_OS_Command_Injection__char_console_execlp_05_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(staticTrue) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118475/CWE78_OS_Command_Injection__char_console_execlp_05.c
CWE78_OS_Command_Injection__char_console_execlp_05_bad
void CWE78_OS_Command_Injection__char_console_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_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } } func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0); return; }
['gcc']
12,650
void CWE78_OS_Command_Injection__char_console_execlp_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118475/CWE78_OS_Command_Injection__char_console_execlp_05.c
CWE78_OS_Command_Injection__char_console_execlp_05_good
void CWE78_OS_Command_Injection__char_console_execlp_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,651
void CWE78_OS_Command_Injection__char_console_execlp_06_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(STATIC_CONST_FIVE==5) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118476/CWE78_OS_Command_Injection__char_console_execlp_06.c
CWE78_OS_Command_Injection__char_console_execlp_06_bad
void CWE78_OS_Command_Injection__char_console_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_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401338); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } func_0x00400b50(&UNK_0040134e,&UNK_0040134e,&UNK_0040134b,&UNK_00401347,puStack_10,0); return; }
['gcc']
12,652
void CWE78_OS_Command_Injection__char_console_execlp_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118476/CWE78_OS_Command_Injection__char_console_execlp_06.c
CWE78_OS_Command_Injection__char_console_execlp_06_good
void CWE78_OS_Command_Injection__char_console_execlp_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,653
void CWE78_OS_Command_Injection__char_console_execlp_07_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(staticFive==5) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118477/CWE78_OS_Command_Injection__char_console_execlp_07.c
CWE78_OS_Command_Injection__char_console_execlp_07_bad
void CWE78_OS_Command_Injection__char_console_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_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } } func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0); return; }
['gcc']
12,654
void CWE78_OS_Command_Injection__char_console_execlp_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118477/CWE78_OS_Command_Injection__char_console_execlp_07.c
CWE78_OS_Command_Injection__char_console_execlp_07_good
void CWE78_OS_Command_Injection__char_console_execlp_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,655
void CWE78_OS_Command_Injection__char_console_execlp_08_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(staticReturnsTrue()) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118478/CWE78_OS_Command_Injection__char_console_execlp_08.c
CWE78_OS_Command_Injection__char_console_execlp_08_bad
void CWE78_OS_Command_Injection__char_console_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_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } } func_0x00400b50(&UNK_0040135a,&UNK_0040135a,&UNK_00401357,&UNK_00401353,puStack_10,0); return; }
['gcc']
12,656
void CWE78_OS_Command_Injection__char_console_execlp_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118478/CWE78_OS_Command_Injection__char_console_execlp_08.c
CWE78_OS_Command_Injection__char_console_execlp_08_good
void CWE78_OS_Command_Injection__char_console_execlp_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,657
void CWE78_OS_Command_Injection__char_console_execlp_09_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(GLOBAL_CONST_TRUE) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118479/CWE78_OS_Command_Injection__char_console_execlp_09.c
CWE78_OS_Command_Injection__char_console_execlp_09_bad
void CWE78_OS_Command_Injection__char_console_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_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } } func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0); return; }
['gcc']
12,658
void CWE78_OS_Command_Injection__char_console_execlp_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118479/CWE78_OS_Command_Injection__char_console_execlp_09.c
CWE78_OS_Command_Injection__char_console_execlp_09_good
void CWE78_OS_Command_Injection__char_console_execlp_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,659
void CWE78_OS_Command_Injection__char_console_execlp_10_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(globalTrue) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118480/CWE78_OS_Command_Injection__char_console_execlp_10.c
CWE78_OS_Command_Injection__char_console_execlp_10_bad
void CWE78_OS_Command_Injection__char_console_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_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } } func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0); return; }
['gcc']
12,660
void CWE78_OS_Command_Injection__char_console_execlp_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118480/CWE78_OS_Command_Injection__char_console_execlp_10.c
CWE78_OS_Command_Injection__char_console_execlp_10_good
void CWE78_OS_Command_Injection__char_console_execlp_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,661
void CWE78_OS_Command_Injection__char_console_execlp_11_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(globalReturnsTrue()) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118481/CWE78_OS_Command_Injection__char_console_execlp_11.c
CWE78_OS_Command_Injection__char_console_execlp_11_bad
void CWE78_OS_Command_Injection__char_console_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_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar2 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar2 == 0) { printLine(&UNK_00401334); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } } func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0); return; }
['gcc']
12,662
void CWE78_OS_Command_Injection__char_console_execlp_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118481/CWE78_OS_Command_Injection__char_console_execlp_11.c
CWE78_OS_Command_Injection__char_console_execlp_11_good
void CWE78_OS_Command_Injection__char_console_execlp_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,663
void CWE78_OS_Command_Injection__char_console_execlp_12_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(globalReturnsTrueOrFalse()) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } else { /* FIX: Append a fixed string to data (not user / external input) */ strcat(data, "*.*"); } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* FIX: Append a fixed string to data (not user / external input) */', '/* 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/118482/CWE78_OS_Command_Injection__char_console_execlp_12.c
CWE78_OS_Command_Injection__char_console_execlp_12_bad
void CWE78_OS_Command_Injection__char_console_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_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar3 = func_0x00400af0((char *)((long)puStack_10 + lStack_18),100 - (int)lStack_18,stdin); if (lVar3 == 0) { printLine(&UNK_00401364); *(char *)(lStack_18 + (long)puStack_10) = '\0'; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(char *)((long)puStack_10 + lStack_18 + -1) = '\0'; } } } } func_0x00400b50(&UNK_0040137a,&UNK_0040137a,&UNK_00401377,&UNK_00401373,puStack_10,0); return; }
['gcc']
12,664
void CWE78_OS_Command_Injection__char_console_execlp_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118482/CWE78_OS_Command_Injection__char_console_execlp_12.c
CWE78_OS_Command_Injection__char_console_execlp_12_good
void CWE78_OS_Command_Injection__char_console_execlp_12_good(void) { goodG2B(); return; }
['gcc']
12,665
void CWE78_OS_Command_Injection__char_console_execlp_13_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(GLOBAL_CONST_FIVE==5) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118483/CWE78_OS_Command_Injection__char_console_execlp_13.c
CWE78_OS_Command_Injection__char_console_execlp_13_bad
void CWE78_OS_Command_Injection__char_console_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_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } } func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0); return; }
['gcc']
12,666
void CWE78_OS_Command_Injection__char_console_execlp_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118483/CWE78_OS_Command_Injection__char_console_execlp_13.c
CWE78_OS_Command_Injection__char_console_execlp_13_good
void CWE78_OS_Command_Injection__char_console_execlp_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,667
void CWE78_OS_Command_Injection__char_console_execlp_14_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; if(globalFive==5) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118484/CWE78_OS_Command_Injection__char_console_execlp_14.c
CWE78_OS_Command_Injection__char_console_execlp_14_bad
void CWE78_OS_Command_Injection__char_console_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_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401334); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } } func_0x00400b50(&UNK_0040134a,&UNK_0040134a,&UNK_00401347,&UNK_00401343,puStack_10,0); return; }
['gcc']
12,668
void CWE78_OS_Command_Injection__char_console_execlp_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118484/CWE78_OS_Command_Injection__char_console_execlp_14.c
CWE78_OS_Command_Injection__char_console_execlp_14_good
void CWE78_OS_Command_Injection__char_console_execlp_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,669
void CWE78_OS_Command_Injection__char_console_execlp_15_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; switch(6) { case 6: { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* 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/118485/CWE78_OS_Command_Injection__char_console_execlp_15.c
CWE78_OS_Command_Injection__char_console_execlp_15_bad
void CWE78_OS_Command_Injection__char_console_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_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0); return; }
['gcc']
12,670
void CWE78_OS_Command_Injection__char_console_execlp_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118485/CWE78_OS_Command_Injection__char_console_execlp_15.c
CWE78_OS_Command_Injection__char_console_execlp_15_good
void CWE78_OS_Command_Injection__char_console_execlp_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,671
void CWE78_OS_Command_Injection__char_console_execlp_16_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; while(1) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } break; } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118486/CWE78_OS_Command_Injection__char_console_execlp_16.c
CWE78_OS_Command_Injection__char_console_execlp_16_bad
void CWE78_OS_Command_Injection__char_console_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_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0); return; }
['gcc']
12,672
void CWE78_OS_Command_Injection__char_console_execlp_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118486/CWE78_OS_Command_Injection__char_console_execlp_16.c
CWE78_OS_Command_Injection__char_console_execlp_16_good
void CWE78_OS_Command_Injection__char_console_execlp_16_good(void) { goodG2B(); return; }
['gcc']
12,673
void CWE78_OS_Command_Injection__char_console_execlp_17_bad() { int i; char * data; char dataBuffer[100] = ""; data = dataBuffer; for(i = 0; i < 1; i++) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118487/CWE78_OS_Command_Injection__char_console_execlp_17.c
CWE78_OS_Command_Injection__char_console_execlp_17_bad
void CWE78_OS_Command_Injection__char_console_execlp_17_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; undefined8 *puStack_18; int iStack_c; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { lStack_20 = func_0x00400ab0(puStack_18); if (1 < 100U - lStack_20) { lVar1 = func_0x00400af0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_20 + (long)puStack_18) = 0; } else { lStack_20 = func_0x00400ab0(puStack_18); if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_20 + -1) = 0; } } } } func_0x00400b50(&UNK_0040135a,&UNK_0040135a,&UNK_00401357,&UNK_00401353,puStack_18,0); return; }
['gcc']
12,674
void CWE78_OS_Command_Injection__char_console_execlp_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118487/CWE78_OS_Command_Injection__char_console_execlp_17.c
CWE78_OS_Command_Injection__char_console_execlp_17_good
void CWE78_OS_Command_Injection__char_console_execlp_17_good(void) { goodG2B(); return; }
['gcc']
12,675
void CWE78_OS_Command_Injection__char_console_execlp_18_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; goto source; source: { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118488/CWE78_OS_Command_Injection__char_console_execlp_18.c
CWE78_OS_Command_Injection__char_console_execlp_18_bad
void CWE78_OS_Command_Injection__char_console_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_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401324); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } func_0x00400b50(&UNK_0040133a,&UNK_0040133a,&UNK_00401337,&UNK_00401333,puStack_10,0); return; }
['gcc']
12,676
void CWE78_OS_Command_Injection__char_console_execlp_18_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118488/CWE78_OS_Command_Injection__char_console_execlp_18.c
CWE78_OS_Command_Injection__char_console_execlp_18_good
void CWE78_OS_Command_Injection__char_console_execlp_18_good(void) { goodG2B(); return; }
['gcc']
12,677
void CWE78_OS_Command_Injection__char_console_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/118489/CWE78_OS_Command_Injection__char_console_execlp_21.c
CWE78_OS_Command_Injection__char_console_execlp_21_bad
void CWE78_OS_Command_Injection__char_console_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_0x00400b50(&UNK_0040137a,&UNK_0040137a,&UNK_00401377,&UNK_00401373,puStack_10,0); return; }
['gcc']
12,678
void CWE78_OS_Command_Injection__char_console_execlp_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118489/CWE78_OS_Command_Injection__char_console_execlp_21.c
CWE78_OS_Command_Injection__char_console_execlp_21_good
void CWE78_OS_Command_Injection__char_console_execlp_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,679
void CWE78_OS_Command_Injection__char_console_execlp_22_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; CWE78_OS_Command_Injection__char_console_execlp_22_badGlobal = 1; /* true */ data = CWE78_OS_Command_Injection__char_console_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/118490/CWE78_OS_Command_Injection__char_console_execlp_22a.c
CWE78_OS_Command_Injection__char_console_execlp_22_bad
void CWE78_OS_Command_Injection__char_console_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_console_execlp_22_badGlobal = 1; puStack_10 = (undefined8 *) CWE78_OS_Command_Injection__char_console_execlp_22_badSource(puStack_10); func_0x00400b50(&UNK_0040136b,&UNK_0040136b,&UNK_00401368,&UNK_00401364,puStack_10,0); return; }
['gcc']
12,680
void CWE78_OS_Command_Injection__char_console_execlp_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118490/CWE78_OS_Command_Injection__char_console_execlp_22a.c
CWE78_OS_Command_Injection__char_console_execlp_22_good
void CWE78_OS_Command_Injection__char_console_execlp_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
12,681
char * CWE78_OS_Command_Injection__char_console_execlp_22_badSource(char * data) { if(CWE78_OS_Command_Injection__char_console_execlp_22_badGlobal) { { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } } return data; }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118490/CWE78_OS_Command_Injection__char_console_execlp_22b.c
CWE78_OS_Command_Injection__char_console_execlp_22_badSource
long CWE78_OS_Command_Injection__char_console_execlp_22_badSource(long param_1) { long lVar1; long lVar2; if (CWE78_OS_Command_Injection__char_console_execlp_22_badGlobal != 0) { lVar1 = func_0x00400ab0(param_1); if (1 < 100U - lVar1) { lVar2 = func_0x00400af0(param_1 + lVar1,100 - (int)lVar1,stdin); if (lVar2 == 0) { printLine(&UNK_00401364); *(undefined *)(lVar1 + param_1) = 0; } else { lVar1 = func_0x00400ab0(param_1); if ((lVar1 != 0) && (*(char *)(param_1 + lVar1 + -1) == '\n')) { *(undefined *)(param_1 + lVar1 + -1) = 0; } } } } return param_1; }
['gcc']
12,682
char * CWE78_OS_Command_Injection__char_console_execlp_22_goodG2B1Source(char * data) { if(CWE78_OS_Command_Injection__char_console_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/118490/CWE78_OS_Command_Injection__char_console_execlp_22b.c
CWE78_OS_Command_Injection__char_console_execlp_22_goodG2B1Source
char * CWE78_OS_Command_Injection__char_console_execlp_22_goodG2B1Source(char *param_1) { char cVar1; ulong uVar2; char *pcVar3; if (CWE78_OS_Command_Injection__char_console_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']
12,683
char * CWE78_OS_Command_Injection__char_console_execlp_22_goodG2B2Source(char * data) { if(CWE78_OS_Command_Injection__char_console_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/118490/CWE78_OS_Command_Injection__char_console_execlp_22b.c
CWE78_OS_Command_Injection__char_console_execlp_22_goodG2B2Source
char * CWE78_OS_Command_Injection__char_console_execlp_22_goodG2B2Source(char *param_1) { char cVar1; ulong uVar2; char *pcVar3; if (CWE78_OS_Command_Injection__char_console_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']
12,684
void CWE78_OS_Command_Injection__char_console_execlp_31_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } { 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118491/CWE78_OS_Command_Injection__char_console_execlp_31.c
CWE78_OS_Command_Injection__char_console_execlp_31_bad
void CWE78_OS_Command_Injection__char_console_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_28; undefined8 *puStack_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } puStack_20 = puStack_10; puStack_28 = puStack_10; func_0x00400b50(&UNK_0040135a,&UNK_0040135a,&UNK_00401357,&UNK_00401353,puStack_10,0); return; }
['gcc']
12,685
void CWE78_OS_Command_Injection__char_console_execlp_31_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118491/CWE78_OS_Command_Injection__char_console_execlp_31.c
CWE78_OS_Command_Injection__char_console_execlp_31_good
void CWE78_OS_Command_Injection__char_console_execlp_31_good(void) { goodG2B(); return; }
['gcc']
12,686
void CWE78_OS_Command_Injection__char_console_execlp_32_bad() { char * data; char * *dataPtr1 = &data; char * *dataPtr2 = &data; char dataBuffer[100] = ""; data = dataBuffer; { char * data = *dataPtr1; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } *dataPtr1 = data; } { char * data = *dataPtr2; /* 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118492/CWE78_OS_Command_Injection__char_console_execlp_32.c
CWE78_OS_Command_Injection__char_console_execlp_32_bad
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void CWE78_OS_Command_Injection__char_console_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_38; undefined8 *puStack_30; long lStack_28; undefined8 *puStack_20; undefined8 **ppuStack_18; undefined8 **ppuStack_10; ppuStack_10 = &puStack_38; ppuStack_18 = &puStack_38; 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_38 = &uStack_a8; puStack_20 = puStack_38; lStack_28 = func_0x00400ab0(puStack_38); if (1 < 100U - lStack_28) { lVar1 = func_0x00400af0((long)puStack_20 + lStack_28,100 - (int)lStack_28,stdin); if (lVar1 == 0) { printLine(&UNK_00401364); *(undefined *)(lStack_28 + (long)puStack_20) = 0; } else { lStack_28 = func_0x00400ab0(puStack_20); if ((lStack_28 != 0) && (*(char *)((long)puStack_20 + lStack_28 + -1) == '\n')) { *(undefined *)((long)puStack_20 + lStack_28 + -1) = 0; } } } *ppuStack_10 = puStack_20; puStack_30 = *ppuStack_18; func_0x00400b50(&UNK_0040137a,&UNK_0040137a,&UNK_00401377,&UNK_00401373,puStack_30,0); return; }
['gcc']
12,687
void CWE78_OS_Command_Injection__char_console_execlp_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118492/CWE78_OS_Command_Injection__char_console_execlp_32.c
CWE78_OS_Command_Injection__char_console_execlp_32_good
void CWE78_OS_Command_Injection__char_console_execlp_32_good(void) { goodG2B(); return; }
['gcc']
12,688
void CWE78_OS_Command_Injection__char_console_execlp_34_bad() { char * data; CWE78_OS_Command_Injection__char_console_execlp_34_unionType myUnion; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } 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 the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* 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/118494/CWE78_OS_Command_Injection__char_console_execlp_34.c
CWE78_OS_Command_Injection__char_console_execlp_34_bad
void CWE78_OS_Command_Injection__char_console_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_28; undefined8 *puStack_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_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } puStack_28 = puStack_10; puStack_20 = puStack_10; func_0x00400b50(&UNK_0040135a,&UNK_0040135a,&UNK_00401357,&UNK_00401353,puStack_10,0); return; }
['gcc']
12,689
void CWE78_OS_Command_Injection__char_console_execlp_34_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118494/CWE78_OS_Command_Injection__char_console_execlp_34.c
CWE78_OS_Command_Injection__char_console_execlp_34_good
void CWE78_OS_Command_Injection__char_console_execlp_34_good(void) { goodG2B(); return; }
['gcc']
12,690
void CWE78_OS_Command_Injection__char_console_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/118495/CWE78_OS_Command_Injection__char_console_execlp_41.c
CWE78_OS_Command_Injection__char_console_execlp_41_badSink
void CWE78_OS_Command_Injection__char_console_execlp_41_badSink(undefined8 param_1) { func_0x00400b50(&UNK_0040134b,&UNK_0040134b,&UNK_00401348,&UNK_00401344,param_1,0); return; }
['gcc']
12,691
void CWE78_OS_Command_Injection__char_console_execlp_41_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execlp_41_badSink(data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118495/CWE78_OS_Command_Injection__char_console_execlp_41.c
CWE78_OS_Command_Injection__char_console_execlp_41_bad
void CWE78_OS_Command_Injection__char_console_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_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_0040134e); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execlp_41_badSink(puStack_10); return; }
['gcc']
12,692
void CWE78_OS_Command_Injection__char_console_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/118495/CWE78_OS_Command_Injection__char_console_execlp_41.c
CWE78_OS_Command_Injection__char_console_execlp_41_goodG2BSink
void CWE78_OS_Command_Injection__char_console_execlp_41_goodG2BSink(undefined8 param_1) { func_0x00400a80(&UNK_0040120b,&UNK_0040120b,&UNK_00401208,&UNK_00401204,param_1,0); return; }
['gcc']
12,693
void CWE78_OS_Command_Injection__char_console_execlp_41_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118495/CWE78_OS_Command_Injection__char_console_execlp_41.c
CWE78_OS_Command_Injection__char_console_execlp_41_good
void CWE78_OS_Command_Injection__char_console_execlp_41_good(void) { goodG2B(); return; }
['gcc']
12,694
void CWE78_OS_Command_Injection__char_console_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/118496/CWE78_OS_Command_Injection__char_console_execlp_42.c
CWE78_OS_Command_Injection__char_console_execlp_42_bad
void CWE78_OS_Command_Injection__char_console_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_0x00400b50(&UNK_0040135a,&UNK_0040135a,&UNK_00401357,&UNK_00401353,puStack_10,0); return; }
['gcc']
12,695
void CWE78_OS_Command_Injection__char_console_execlp_44_bad() { char * data; /* define a function pointer */ void (*funcPtr) (char *) = badSink; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* use the function pointer */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118498/CWE78_OS_Command_Injection__char_console_execlp_44.c
CWE78_OS_Command_Injection__char_console_execlp_44_bad
void CWE78_OS_Command_Injection__char_console_execlp_44_bad(void) { long lVar1; undefined8 uStack_88; undefined8 uStack_80; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined4 uStack_28; long lStack_20; undefined8 *puStack_18; code *pcStack_10; pcStack_10 = badSink; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_18 = &uStack_88; lStack_20 = func_0x00400ab0(puStack_18); if (1 < 100U - lStack_20) { lVar1 = func_0x00400af0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin); if (lVar1 == 0) { printLine(&UNK_0040134e); *(undefined *)(lStack_20 + (long)puStack_18) = 0; } else { lStack_20 = func_0x00400ab0(puStack_18); if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) { *(undefined *)((long)puStack_18 + lStack_20 + -1) = 0; } } } (*pcStack_10)(puStack_18); return; }
['gcc']
12,696
void CWE78_OS_Command_Injection__char_console_execlp_44_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118498/CWE78_OS_Command_Injection__char_console_execlp_44.c
CWE78_OS_Command_Injection__char_console_execlp_44_good
void CWE78_OS_Command_Injection__char_console_execlp_44_good(void) { goodG2B(); return; }
['gcc']
12,697
void CWE78_OS_Command_Injection__char_console_execlp_45_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execlp_45_badData = data; badSink(); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118499/CWE78_OS_Command_Injection__char_console_execlp_45.c
CWE78_OS_Command_Injection__char_console_execlp_45_bad
void CWE78_OS_Command_Injection__char_console_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_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_0040135e); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execlp_45_badData = puStack_10; badSink(); return; }
['gcc']
12,698
void CWE78_OS_Command_Injection__char_console_execlp_45_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118499/CWE78_OS_Command_Injection__char_console_execlp_45.c
CWE78_OS_Command_Injection__char_console_execlp_45_good
void CWE78_OS_Command_Injection__char_console_execlp_45_good(void) { goodG2B(); return; }
['gcc']
12,699
void CWE78_OS_Command_Injection__char_console_execlp_51_bad() { char * data; char dataBuffer[100] = ""; data = dataBuffer; { /* Read input from the console */ size_t dataLen = strlen(data); /* if there is room in data, read into it from the console */ if (100-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgets() */ dataLen = strlen(data); if (dataLen > 0 && data[dataLen-1] == '\n') { data[dataLen-1] = '\0'; } } else { printLine("fgets() failed"); /* Restore NUL terminator if fgets fails */ data[dataLen] = '\0'; } } } CWE78_OS_Command_Injection__char_console_execlp_51b_badSink(data); }
['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */']
['CWE78']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/118500/CWE78_OS_Command_Injection__char_console_execlp_51a.c
CWE78_OS_Command_Injection__char_console_execlp_51_bad
void CWE78_OS_Command_Injection__char_console_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_18; undefined8 *puStack_10; uStack_88 = 0; uStack_80 = 0; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; puStack_10 = &uStack_88; lStack_18 = func_0x00400ab0(puStack_10); if (1 < 100U - lStack_18) { lVar1 = func_0x00400af0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin); if (lVar1 == 0) { printLine(&UNK_00401344); *(undefined *)(lStack_18 + (long)puStack_10) = 0; } else { lStack_18 = func_0x00400ab0(puStack_10); if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) { *(undefined *)((long)puStack_10 + lStack_18 + -1) = 0; } } } CWE78_OS_Command_Injection__char_console_execlp_51b_badSink(puStack_10); return; }
['gcc']