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
54,300
void CWE400_Resource_Exhaustion__fgets_sleep_12_bad() { int count; /* Initialize count */ count = -1; if(globalReturnsTrueOrFalse()) { { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read count from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ count = atoi(inputBuffer); } else { printLine("fgets() failed."); } } } else { /* FIX: Use a relatively small number */ count = 20; } if(globalReturnsTrueOrFalse()) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } else { /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fgets() */', '/* Convert to int */', '/* FIX: Use a relatively small number */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */', '/* FIX: Validate count before using it as a parameter in the sleep function */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98732/CWE400_Resource_Exhaustion__fgets_sleep_12.c
CWE400_Resource_Exhaustion__fgets_sleep_12_bad
void CWE400_Resource_Exhaustion__fgets_sleep_12_bad(void) { int iVar1; long lVar2; undefined8 uStack_1a; undefined4 uStack_12; undefined2 uStack_e; int iStack_c; iStack_c = -1; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { iStack_c = 0x14; } else { uStack_1a = 0; uStack_12 = 0; uStack_e = 0; lVar2 = func_0x00400ae0(&uStack_1a,0xe,stdin); if (lVar2 == 0) { printLine(&UNK_00401294); } else { iStack_c = func_0x00400b40(&uStack_1a); } } iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { if ((iStack_c < 1) || (2000 < iStack_c)) { printLine(&UNK_004012cf); } else { func_0x00400b70(iStack_c); printLine(&UNK_004012c1); } } else { func_0x00400b70(iStack_c); printLine(&UNK_004012a4); } return; }
['gcc']
54,301
void CWE400_Resource_Exhaustion__fgets_sleep_12_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98732/CWE400_Resource_Exhaustion__fgets_sleep_12.c
CWE400_Resource_Exhaustion__fgets_sleep_12_good
void CWE400_Resource_Exhaustion__fgets_sleep_12_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,302
void CWE400_Resource_Exhaustion__fgets_sleep_52_bad() { int count; /* Initialize count */ count = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read count from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ count = atoi(inputBuffer); } else { printLine("fgets() failed."); } } CWE400_Resource_Exhaustion__fgets_sleep_52b_badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fgets() */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98751/CWE400_Resource_Exhaustion__fgets_sleep_52a.c
CWE400_Resource_Exhaustion__fgets_sleep_52_bad
void CWE400_Resource_Exhaustion__fgets_sleep_52_bad(void) { long lVar1; undefined8 uStack_1a; undefined4 uStack_12; undefined2 uStack_e; undefined4 uStack_c; uStack_c = 0xffffffff; uStack_1a = 0; uStack_12 = 0; uStack_e = 0; lVar1 = func_0x00400ae0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401274); } else { uStack_c = func_0x00400b40(&uStack_1a); } CWE400_Resource_Exhaustion__fgets_sleep_52b_badSink(uStack_c); return; }
['gcc']
54,303
void CWE400_Resource_Exhaustion__fgets_sleep_52_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98751/CWE400_Resource_Exhaustion__fgets_sleep_52a.c
CWE400_Resource_Exhaustion__fgets_sleep_52_good
void CWE400_Resource_Exhaustion__fgets_sleep_52_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,304
void CWE400_Resource_Exhaustion__fgets_sleep_52b_badSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_52c_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98751/CWE400_Resource_Exhaustion__fgets_sleep_52b.c
CWE400_Resource_Exhaustion__fgets_sleep_52b_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_52b_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_52c_badSink(param_1); return; }
['gcc']
54,305
void CWE400_Resource_Exhaustion__fgets_sleep_52b_goodG2BSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_52c_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98751/CWE400_Resource_Exhaustion__fgets_sleep_52b.c
CWE400_Resource_Exhaustion__fgets_sleep_52b_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_52b_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_52c_goodG2BSink(param_1); return; }
['gcc']
54,306
void CWE400_Resource_Exhaustion__fgets_sleep_52b_goodB2GSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_52c_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98751/CWE400_Resource_Exhaustion__fgets_sleep_52b.c
CWE400_Resource_Exhaustion__fgets_sleep_52b_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_52b_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_52c_goodB2GSink(param_1); return; }
['gcc']
54,307
void CWE400_Resource_Exhaustion__fgets_sleep_52c_badSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98751/CWE400_Resource_Exhaustion__fgets_sleep_52c.c
CWE400_Resource_Exhaustion__fgets_sleep_52c_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_52c_badSink(undefined4 param_1) { func_0x00400b70(param_1); printLine(&UNK_00401274); return; }
['gcc']
54,308
void CWE400_Resource_Exhaustion__fgets_sleep_52c_goodG2BSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98751/CWE400_Resource_Exhaustion__fgets_sleep_52c.c
CWE400_Resource_Exhaustion__fgets_sleep_52c_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_52c_goodG2BSink(undefined4 param_1) { func_0x00400b70(param_1); printLine(&UNK_00401304); return; }
['gcc']
54,309
void CWE400_Resource_Exhaustion__fgets_sleep_52c_goodB2GSink(int count) { /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } }
['/* FIX: Validate count before using it as a parameter in the sleep function */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98751/CWE400_Resource_Exhaustion__fgets_sleep_52c.c
CWE400_Resource_Exhaustion__fgets_sleep_52c_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_52c_goodB2GSink(int param_1) { if ((param_1 < 1) || (2000 < param_1)) { printLine(&UNK_0040132f); } else { func_0x00400b70(param_1); printLine(&UNK_00401321); } return; }
['gcc']
54,310
void CWE400_Resource_Exhaustion__fgets_sleep_53_bad() { int count; /* Initialize count */ count = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read count from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ count = atoi(inputBuffer); } else { printLine("fgets() failed."); } } CWE400_Resource_Exhaustion__fgets_sleep_53b_badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fgets() */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53a.c
CWE400_Resource_Exhaustion__fgets_sleep_53_bad
void CWE400_Resource_Exhaustion__fgets_sleep_53_bad(void) { long lVar1; undefined8 uStack_1a; undefined4 uStack_12; undefined2 uStack_e; undefined4 uStack_c; uStack_c = 0xffffffff; uStack_1a = 0; uStack_12 = 0; uStack_e = 0; lVar1 = func_0x00400ae0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401284); } else { uStack_c = func_0x00400b40(&uStack_1a); } CWE400_Resource_Exhaustion__fgets_sleep_53b_badSink(uStack_c); return; }
['gcc']
54,311
void CWE400_Resource_Exhaustion__fgets_sleep_53_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53a.c
CWE400_Resource_Exhaustion__fgets_sleep_53_good
void CWE400_Resource_Exhaustion__fgets_sleep_53_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,312
void CWE400_Resource_Exhaustion__fgets_sleep_53b_badSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_53c_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53b.c
CWE400_Resource_Exhaustion__fgets_sleep_53b_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_53b_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_53c_badSink(param_1); return; }
['gcc']
54,313
void CWE400_Resource_Exhaustion__fgets_sleep_53b_goodG2BSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_53c_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53b.c
CWE400_Resource_Exhaustion__fgets_sleep_53b_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_53b_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_53c_goodG2BSink(param_1); return; }
['gcc']
54,314
void CWE400_Resource_Exhaustion__fgets_sleep_53b_goodB2GSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_53c_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53b.c
CWE400_Resource_Exhaustion__fgets_sleep_53b_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_53b_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_53c_goodB2GSink(param_1); return; }
['gcc']
54,315
void CWE400_Resource_Exhaustion__fgets_sleep_53c_badSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_53d_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53c.c
CWE400_Resource_Exhaustion__fgets_sleep_53c_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_53c_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_53d_badSink(param_1); return; }
['gcc']
54,316
void CWE400_Resource_Exhaustion__fgets_sleep_53c_goodG2BSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_53d_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53c.c
CWE400_Resource_Exhaustion__fgets_sleep_53c_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_53c_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_53d_goodG2BSink(param_1); return; }
['gcc']
54,317
void CWE400_Resource_Exhaustion__fgets_sleep_53c_goodB2GSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_53d_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53c.c
CWE400_Resource_Exhaustion__fgets_sleep_53c_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_53c_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_53d_goodB2GSink(param_1); return; }
['gcc']
54,318
void CWE400_Resource_Exhaustion__fgets_sleep_53d_badSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53d.c
CWE400_Resource_Exhaustion__fgets_sleep_53d_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_53d_badSink(undefined4 param_1) { func_0x00400b70(param_1); printLine(&UNK_00401284); return; }
['gcc']
54,319
void CWE400_Resource_Exhaustion__fgets_sleep_53d_goodG2BSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53d.c
CWE400_Resource_Exhaustion__fgets_sleep_53d_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_53d_goodG2BSink(undefined4 param_1) { func_0x00400b70(param_1); printLine(&UNK_00401334); return; }
['gcc']
54,320
void CWE400_Resource_Exhaustion__fgets_sleep_53d_goodB2GSink(int count) { /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } }
['/* FIX: Validate count before using it as a parameter in the sleep function */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98752/CWE400_Resource_Exhaustion__fgets_sleep_53d.c
CWE400_Resource_Exhaustion__fgets_sleep_53d_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_53d_goodB2GSink(int param_1) { if ((param_1 < 1) || (2000 < param_1)) { printLine(&UNK_0040135f); } else { func_0x00400b70(param_1); printLine(&UNK_00401351); } return; }
['gcc']
54,321
void CWE400_Resource_Exhaustion__fgets_sleep_54_bad() { int count; /* Initialize count */ count = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read count from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ count = atoi(inputBuffer); } else { printLine("fgets() failed."); } } CWE400_Resource_Exhaustion__fgets_sleep_54b_badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fgets() */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54a.c
CWE400_Resource_Exhaustion__fgets_sleep_54_bad
void CWE400_Resource_Exhaustion__fgets_sleep_54_bad(void) { long lVar1; undefined8 uStack_1a; undefined4 uStack_12; undefined2 uStack_e; undefined4 uStack_c; uStack_c = 0xffffffff; uStack_1a = 0; uStack_12 = 0; uStack_e = 0; lVar1 = func_0x00400ae0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_004012a4); } else { uStack_c = func_0x00400b40(&uStack_1a); } CWE400_Resource_Exhaustion__fgets_sleep_54b_badSink(uStack_c); return; }
['gcc']
54,322
void CWE400_Resource_Exhaustion__fgets_sleep_54_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54a.c
CWE400_Resource_Exhaustion__fgets_sleep_54_good
void CWE400_Resource_Exhaustion__fgets_sleep_54_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,323
void CWE400_Resource_Exhaustion__fgets_sleep_54b_badSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_54c_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54b.c
CWE400_Resource_Exhaustion__fgets_sleep_54b_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_54b_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_54c_badSink(param_1); return; }
['gcc']
54,324
void CWE400_Resource_Exhaustion__fgets_sleep_54b_goodG2BSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_54c_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54b.c
CWE400_Resource_Exhaustion__fgets_sleep_54b_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_54b_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_54c_goodG2BSink(param_1); return; }
['gcc']
54,325
void CWE400_Resource_Exhaustion__fgets_sleep_54b_goodB2GSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_54c_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54b.c
CWE400_Resource_Exhaustion__fgets_sleep_54b_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_54b_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_54c_goodB2GSink(param_1); return; }
['gcc']
54,326
void CWE400_Resource_Exhaustion__fgets_sleep_54c_badSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_54d_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54c.c
CWE400_Resource_Exhaustion__fgets_sleep_54c_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_54c_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_54d_badSink(param_1); return; }
['gcc']
54,327
void CWE400_Resource_Exhaustion__fgets_sleep_54c_goodG2BSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_54d_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54c.c
CWE400_Resource_Exhaustion__fgets_sleep_54c_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_54c_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_54d_goodG2BSink(param_1); return; }
['gcc']
54,328
void CWE400_Resource_Exhaustion__fgets_sleep_54c_goodB2GSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_54d_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54c.c
CWE400_Resource_Exhaustion__fgets_sleep_54c_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_54c_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_54d_goodB2GSink(param_1); return; }
['gcc']
54,329
void CWE400_Resource_Exhaustion__fgets_sleep_54d_badSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_54e_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54d.c
CWE400_Resource_Exhaustion__fgets_sleep_54d_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_54d_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_54e_badSink(param_1); return; }
['gcc']
54,330
void CWE400_Resource_Exhaustion__fgets_sleep_54d_goodG2BSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_54e_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54d.c
CWE400_Resource_Exhaustion__fgets_sleep_54d_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_54d_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_54e_goodG2BSink(param_1); return; }
['gcc']
54,331
void CWE400_Resource_Exhaustion__fgets_sleep_54d_goodB2GSink(int count) { CWE400_Resource_Exhaustion__fgets_sleep_54e_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54d.c
CWE400_Resource_Exhaustion__fgets_sleep_54d_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_54d_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__fgets_sleep_54e_goodB2GSink(param_1); return; }
['gcc']
54,332
void CWE400_Resource_Exhaustion__fgets_sleep_54e_badSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54e.c
CWE400_Resource_Exhaustion__fgets_sleep_54e_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_54e_badSink(undefined4 param_1) { func_0x00400b70(param_1); printLine(&UNK_004012a4); return; }
['gcc']
54,333
void CWE400_Resource_Exhaustion__fgets_sleep_54e_goodG2BSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54e.c
CWE400_Resource_Exhaustion__fgets_sleep_54e_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_54e_goodG2BSink(undefined4 param_1) { func_0x00400b70(param_1); printLine(&UNK_00401364); return; }
['gcc']
54,334
void CWE400_Resource_Exhaustion__fgets_sleep_54e_goodB2GSink(int count) { /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } }
['/* FIX: Validate count before using it as a parameter in the sleep function */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98753/CWE400_Resource_Exhaustion__fgets_sleep_54e.c
CWE400_Resource_Exhaustion__fgets_sleep_54e_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_54e_goodB2GSink(int param_1) { if ((param_1 < 1) || (2000 < param_1)) { printLine(&UNK_0040138f); } else { func_0x00400b70(param_1); printLine(&UNK_00401381); } return; }
['gcc']
54,335
void CWE400_Resource_Exhaustion__fgets_sleep_64_bad() { int count; /* Initialize count */ count = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read count from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ count = atoi(inputBuffer); } else { printLine("fgets() failed."); } } CWE400_Resource_Exhaustion__fgets_sleep_64b_badSink(&count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fgets() */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98757/CWE400_Resource_Exhaustion__fgets_sleep_64a.c
CWE400_Resource_Exhaustion__fgets_sleep_64_bad
void CWE400_Resource_Exhaustion__fgets_sleep_64_bad(void) { long lVar1; undefined8 uStack_1a; undefined4 uStack_12; undefined2 uStack_e; undefined4 uStack_c; uStack_c = 0xffffffff; uStack_1a = 0; uStack_12 = 0; uStack_e = 0; lVar1 = func_0x00400ae0(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401274); } else { uStack_c = func_0x00400b40(&uStack_1a); } CWE400_Resource_Exhaustion__fgets_sleep_64b_badSink(&uStack_c); return; }
['gcc']
54,336
void CWE400_Resource_Exhaustion__fgets_sleep_64_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98757/CWE400_Resource_Exhaustion__fgets_sleep_64a.c
CWE400_Resource_Exhaustion__fgets_sleep_64_good
void CWE400_Resource_Exhaustion__fgets_sleep_64_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,337
void CWE400_Resource_Exhaustion__fgets_sleep_64b_badSink(void * countVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ int * countPtr = (int *)countVoidPtr; /* dereference countPtr into count */ int count = (*countPtr); /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference countPtr into count */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98757/CWE400_Resource_Exhaustion__fgets_sleep_64b.c
CWE400_Resource_Exhaustion__fgets_sleep_64b_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_64b_badSink(undefined4 *param_1) { func_0x00400b70(*param_1); printLine(&UNK_00401274); return; }
['gcc']
54,338
void CWE400_Resource_Exhaustion__fgets_sleep_64b_goodG2BSink(void * countVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ int * countPtr = (int *)countVoidPtr; /* dereference countPtr into count */ int count = (*countPtr); /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference countPtr into count */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98757/CWE400_Resource_Exhaustion__fgets_sleep_64b.c
CWE400_Resource_Exhaustion__fgets_sleep_64b_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_64b_goodG2BSink(undefined4 *param_1) { func_0x00400b70(*param_1); printLine(&UNK_00401304); return; }
['gcc']
54,339
void CWE400_Resource_Exhaustion__fgets_sleep_64b_goodB2GSink(void * countVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ int * countPtr = (int *)countVoidPtr; /* dereference countPtr into count */ int count = (*countPtr); /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference countPtr into count */', '/* FIX: Validate count before using it as a parameter in the sleep function */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98757/CWE400_Resource_Exhaustion__fgets_sleep_64b.c
CWE400_Resource_Exhaustion__fgets_sleep_64b_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_64b_goodB2GSink(int *param_1) { int iVar1; iVar1 = *param_1; if ((iVar1 < 1) || (2000 < iVar1)) { printLine(&UNK_0040132f); } else { func_0x00400b70(iVar1); printLine(&UNK_00401321); } return; }
['gcc']
54,340
void CWE400_Resource_Exhaustion__fgets_sleep_66_bad() { int count; int countArray[5]; /* Initialize count */ count = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read count from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ count = atoi(inputBuffer); } else { printLine("fgets() failed."); } } /* put count in array */ countArray[2] = count; CWE400_Resource_Exhaustion__fgets_sleep_66b_badSink(countArray); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fgets() */', '/* Convert to int */', '/* put count in array */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98759/CWE400_Resource_Exhaustion__fgets_sleep_66a.c
CWE400_Resource_Exhaustion__fgets_sleep_66_bad
void CWE400_Resource_Exhaustion__fgets_sleep_66_bad(void) { long lVar1; undefined8 uStack_36; undefined4 uStack_2e; undefined2 uStack_2a; undefined auStack_28 [8]; undefined4 uStack_20; undefined4 uStack_c; uStack_c = 0xffffffff; uStack_36 = 0; uStack_2e = 0; uStack_2a = 0; lVar1 = func_0x00400ae0(&uStack_36,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401274); } else { uStack_c = func_0x00400b40(&uStack_36); } uStack_20 = uStack_c; CWE400_Resource_Exhaustion__fgets_sleep_66b_badSink(auStack_28); return; }
['gcc']
54,341
void CWE400_Resource_Exhaustion__fgets_sleep_66_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98759/CWE400_Resource_Exhaustion__fgets_sleep_66a.c
CWE400_Resource_Exhaustion__fgets_sleep_66_good
void CWE400_Resource_Exhaustion__fgets_sleep_66_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,342
void CWE400_Resource_Exhaustion__fgets_sleep_66b_badSink(int countArray[]) { /* copy count out of countArray */ int count = countArray[2]; /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* copy count out of countArray */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98759/CWE400_Resource_Exhaustion__fgets_sleep_66b.c
CWE400_Resource_Exhaustion__fgets_sleep_66b_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_66b_badSink(long param_1) { func_0x00400b70(*(undefined4 *)(param_1 + 8)); printLine(&UNK_00401274); return; }
['gcc']
54,343
void CWE400_Resource_Exhaustion__fgets_sleep_66b_goodG2BSink(int countArray[]) { int count = countArray[2]; /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98759/CWE400_Resource_Exhaustion__fgets_sleep_66b.c
CWE400_Resource_Exhaustion__fgets_sleep_66b_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_66b_goodG2BSink(long param_1) { func_0x00400b70(*(undefined4 *)(param_1 + 8)); printLine(&UNK_00401304); return; }
['gcc']
54,344
void CWE400_Resource_Exhaustion__fgets_sleep_66b_goodB2GSink(int countArray[]) { int count = countArray[2]; /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } }
['/* FIX: Validate count before using it as a parameter in the sleep function */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98759/CWE400_Resource_Exhaustion__fgets_sleep_66b.c
CWE400_Resource_Exhaustion__fgets_sleep_66b_goodB2GSink
void CWE400_Resource_Exhaustion__fgets_sleep_66b_goodB2GSink(long param_1) { int iVar1; iVar1 = *(int *)(param_1 + 8); if ((iVar1 < 1) || (2000 < iVar1)) { printLine(&UNK_0040132f); } else { func_0x00400b70(iVar1); printLine(&UNK_00401321); } return; }
['gcc']
54,345
void CWE400_Resource_Exhaustion__fgets_sleep_67_bad() { int count; CWE400_Resource_Exhaustion__fgets_sleep_67_structType myStruct; /* Initialize count */ count = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read count from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ count = atoi(inputBuffer); } else { printLine("fgets() failed."); } } myStruct.structFirst = count; CWE400_Resource_Exhaustion__fgets_sleep_67b_badSink(myStruct); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fgets() */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98760/CWE400_Resource_Exhaustion__fgets_sleep_67a.c
CWE400_Resource_Exhaustion__fgets_sleep_67_bad
void CWE400_Resource_Exhaustion__fgets_sleep_67_bad(void) { long lVar1; undefined8 uStack_1e; undefined4 uStack_16; undefined2 uStack_12; undefined4 uStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; uStack_1e = 0; uStack_16 = 0; uStack_12 = 0; lVar1 = func_0x00400ae0(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_00401264); } else { uStack_c = func_0x00400b40(&uStack_1e); } uStack_10 = uStack_c; CWE400_Resource_Exhaustion__fgets_sleep_67b_badSink(uStack_c); return; }
['gcc']
54,346
void CWE400_Resource_Exhaustion__fgets_sleep_67_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98760/CWE400_Resource_Exhaustion__fgets_sleep_67a.c
CWE400_Resource_Exhaustion__fgets_sleep_67_good
void CWE400_Resource_Exhaustion__fgets_sleep_67_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,347
void CWE400_Resource_Exhaustion__fgets_sleep_67b_badSink(CWE400_Resource_Exhaustion__fgets_sleep_67_structType myStruct) { int count = myStruct.structFirst; /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98760/CWE400_Resource_Exhaustion__fgets_sleep_67b.c
CWE400_Resource_Exhaustion__fgets_sleep_67b_badSink
void CWE400_Resource_Exhaustion__fgets_sleep_67b_badSink(undefined4 param_1) { func_0x00400b70(param_1); printLine(&UNK_00401264); return; }
['gcc']
54,348
void CWE400_Resource_Exhaustion__fgets_sleep_67b_goodG2BSink(CWE400_Resource_Exhaustion__fgets_sleep_67_structType myStruct) { int count = myStruct.structFirst; /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98760/CWE400_Resource_Exhaustion__fgets_sleep_67b.c
CWE400_Resource_Exhaustion__fgets_sleep_67b_goodG2BSink
void CWE400_Resource_Exhaustion__fgets_sleep_67b_goodG2BSink(undefined4 param_1) { func_0x00400b70(param_1); printLine(&UNK_004012f4); return; }
['gcc']
54,349
void CWE400_Resource_Exhaustion__fscanf_fwrite_01_bad() { int count; /* Initialize count */ count = -1; /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98817/CWE400_Resource_Exhaustion__fscanf_fwrite_01.c
CWE400_Resource_Exhaustion__fscanf_fwrite_01_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_01_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; func_0x00400b50(stdin,&UNK_00401378,&iStack_24); uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040137b; lStack_18 = func_0x00400c10(&UNK_0040137b,&UNK_0040138a); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_00401390,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } return; }
['gcc']
54,350
void CWE400_Resource_Exhaustion__fscanf_fwrite_01_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98817/CWE400_Resource_Exhaustion__fscanf_fwrite_01.c
CWE400_Resource_Exhaustion__fscanf_fwrite_01_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_01_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,351
void CWE400_Resource_Exhaustion__fscanf_fwrite_02_bad() { int count; /* Initialize count */ count = -1; if(1) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(1) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98818/CWE400_Resource_Exhaustion__fscanf_fwrite_02.c
CWE400_Resource_Exhaustion__fscanf_fwrite_02_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_02_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; func_0x00400b50(stdin,&UNK_00401378,&iStack_24); uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040137b; lStack_18 = func_0x00400c10(&UNK_0040137b,&UNK_0040138a); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_00401390,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } return; }
['gcc']
54,352
void CWE400_Resource_Exhaustion__fscanf_fwrite_02_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98818/CWE400_Resource_Exhaustion__fscanf_fwrite_02.c
CWE400_Resource_Exhaustion__fscanf_fwrite_02_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_02_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,353
void CWE400_Resource_Exhaustion__fscanf_fwrite_03_bad() { int count; /* Initialize count */ count = -1; if(5==5) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(5==5) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98819/CWE400_Resource_Exhaustion__fscanf_fwrite_03.c
CWE400_Resource_Exhaustion__fscanf_fwrite_03_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_03_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; func_0x00400b50(stdin,&UNK_00401378,&iStack_24); uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040137b; lStack_18 = func_0x00400c10(&UNK_0040137b,&UNK_0040138a); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_00401390,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } return; }
['gcc']
54,354
void CWE400_Resource_Exhaustion__fscanf_fwrite_03_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98819/CWE400_Resource_Exhaustion__fscanf_fwrite_03.c
CWE400_Resource_Exhaustion__fscanf_fwrite_03_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_03_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,355
void CWE400_Resource_Exhaustion__fscanf_fwrite_04_bad() { int count; /* Initialize count */ count = -1; if(STATIC_CONST_TRUE) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(STATIC_CONST_TRUE) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98820/CWE400_Resource_Exhaustion__fscanf_fwrite_04.c
CWE400_Resource_Exhaustion__fscanf_fwrite_04_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_04_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; func_0x00400b50(stdin,&UNK_00401390,&iStack_24); uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_00401393; lStack_18 = func_0x00400c10(&UNK_00401393,&UNK_004013a2); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013a8,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } return; }
['gcc']
54,356
void CWE400_Resource_Exhaustion__fscanf_fwrite_04_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98820/CWE400_Resource_Exhaustion__fscanf_fwrite_04.c
CWE400_Resource_Exhaustion__fscanf_fwrite_04_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_04_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,357
void CWE400_Resource_Exhaustion__fscanf_fwrite_05_bad() { int count; /* Initialize count */ count = -1; if(staticTrue) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(staticTrue) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98821/CWE400_Resource_Exhaustion__fscanf_fwrite_05.c
CWE400_Resource_Exhaustion__fscanf_fwrite_05_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_05_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; if (staticTrue != 0) { func_0x00400b50(stdin,&UNK_00401398,&iStack_24); } if (staticTrue != 0) { uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040139b; lStack_18 = func_0x00400c10(&UNK_0040139b,&UNK_004013aa); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013b0,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } } return; }
['gcc']
54,358
void CWE400_Resource_Exhaustion__fscanf_fwrite_05_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98821/CWE400_Resource_Exhaustion__fscanf_fwrite_05.c
CWE400_Resource_Exhaustion__fscanf_fwrite_05_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_05_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,359
void CWE400_Resource_Exhaustion__fscanf_fwrite_06_bad() { int count; /* Initialize count */ count = -1; if(STATIC_CONST_FIVE==5) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(STATIC_CONST_FIVE==5) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98822/CWE400_Resource_Exhaustion__fscanf_fwrite_06.c
CWE400_Resource_Exhaustion__fscanf_fwrite_06_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_06_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; func_0x00400b50(stdin,&UNK_0040139c,&iStack_24); uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040139f; lStack_18 = func_0x00400c10(&UNK_0040139f,&UNK_004013ae); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013b8,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } return; }
['gcc']
54,360
void CWE400_Resource_Exhaustion__fscanf_fwrite_06_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98822/CWE400_Resource_Exhaustion__fscanf_fwrite_06.c
CWE400_Resource_Exhaustion__fscanf_fwrite_06_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_06_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,361
void CWE400_Resource_Exhaustion__fscanf_fwrite_07_bad() { int count; /* Initialize count */ count = -1; if(staticFive==5) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(staticFive==5) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98823/CWE400_Resource_Exhaustion__fscanf_fwrite_07.c
CWE400_Resource_Exhaustion__fscanf_fwrite_07_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_07_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; if (staticFive == 5) { func_0x00400b50(stdin,&UNK_00401398,&iStack_24); } if (staticFive == 5) { uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040139b; lStack_18 = func_0x00400c10(&UNK_0040139b,&UNK_004013aa); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013b0,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } } return; }
['gcc']
54,362
void CWE400_Resource_Exhaustion__fscanf_fwrite_07_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98823/CWE400_Resource_Exhaustion__fscanf_fwrite_07.c
CWE400_Resource_Exhaustion__fscanf_fwrite_07_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_07_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,363
void CWE400_Resource_Exhaustion__fscanf_fwrite_08_bad() { int count; /* Initialize count */ count = -1; if(staticReturnsTrue()) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(staticReturnsTrue()) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98824/CWE400_Resource_Exhaustion__fscanf_fwrite_08.c
CWE400_Resource_Exhaustion__fscanf_fwrite_08_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_08_bad(void) { int iVar1; long lVar2; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { func_0x00400b50(stdin,&UNK_004013a8,&iStack_24); } iVar1 = staticReturnsTrue(); if (iVar1 != 0) { uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_004013ab; lStack_18 = func_0x00400c10(&UNK_004013ab,&UNK_004013ba); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar2 = func_0x00400c30(&UNK_004013c0,1,0x32,lStack_18); if (lVar2 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } } return; }
['gcc']
54,364
void CWE400_Resource_Exhaustion__fscanf_fwrite_08_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98824/CWE400_Resource_Exhaustion__fscanf_fwrite_08.c
CWE400_Resource_Exhaustion__fscanf_fwrite_08_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_08_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,365
void CWE400_Resource_Exhaustion__fscanf_fwrite_09_bad() { int count; /* Initialize count */ count = -1; if(GLOBAL_CONST_TRUE) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(GLOBAL_CONST_TRUE) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98825/CWE400_Resource_Exhaustion__fscanf_fwrite_09.c
CWE400_Resource_Exhaustion__fscanf_fwrite_09_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_09_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; if (GLOBAL_CONST_TRUE != 0) { func_0x00400b50(stdin,&UNK_00401398,&iStack_24); } if (GLOBAL_CONST_TRUE != 0) { uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040139b; lStack_18 = func_0x00400c10(&UNK_0040139b,&UNK_004013aa); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013b0,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } } return; }
['gcc']
54,366
void CWE400_Resource_Exhaustion__fscanf_fwrite_09_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98825/CWE400_Resource_Exhaustion__fscanf_fwrite_09.c
CWE400_Resource_Exhaustion__fscanf_fwrite_09_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_09_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,367
void CWE400_Resource_Exhaustion__fscanf_fwrite_10_bad() { int count; /* Initialize count */ count = -1; if(globalTrue) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(globalTrue) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98826/CWE400_Resource_Exhaustion__fscanf_fwrite_10.c
CWE400_Resource_Exhaustion__fscanf_fwrite_10_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_10_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; if (globalTrue != 0) { func_0x00400b50(stdin,&UNK_00401398,&iStack_24); } if (globalTrue != 0) { uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040139b; lStack_18 = func_0x00400c10(&UNK_0040139b,&UNK_004013aa); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013b0,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } } return; }
['gcc']
54,368
void CWE400_Resource_Exhaustion__fscanf_fwrite_10_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98826/CWE400_Resource_Exhaustion__fscanf_fwrite_10.c
CWE400_Resource_Exhaustion__fscanf_fwrite_10_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_10_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,369
void CWE400_Resource_Exhaustion__fscanf_fwrite_11_bad() { int count; /* Initialize count */ count = -1; if(globalReturnsTrue()) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(globalReturnsTrue()) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98827/CWE400_Resource_Exhaustion__fscanf_fwrite_11.c
CWE400_Resource_Exhaustion__fscanf_fwrite_11_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_11_bad(void) { int iVar1; long lVar2; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { func_0x00400b50(stdin,&UNK_00401398,&iStack_24); } iVar1 = globalReturnsTrue(); if (iVar1 != 0) { uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040139b; lStack_18 = func_0x00400c10(&UNK_0040139b,&UNK_004013aa); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar2 = func_0x00400c30(&UNK_004013b0,1,0x32,lStack_18); if (lVar2 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } } return; }
['gcc']
54,370
void CWE400_Resource_Exhaustion__fscanf_fwrite_11_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98827/CWE400_Resource_Exhaustion__fscanf_fwrite_11.c
CWE400_Resource_Exhaustion__fscanf_fwrite_11_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_11_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,371
void CWE400_Resource_Exhaustion__fscanf_fwrite_12_bad() { int count; /* Initialize count */ count = -1; if(globalReturnsTrueOrFalse()) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } else { /* FIX: Use a relatively small number */ count = 20; } if(globalReturnsTrueOrFalse()) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } else { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_good.txt"; /* FIX: Validate count before using it as the for loop variant to write to a file */ if (count > 0 && count <= 20) { pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) exit(1); } if (pFile) { fclose(pFile); } } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* FIX: Use a relatively small number */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */', '/* FIX: Validate count before using it as the for loop variant to write to a file */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98828/CWE400_Resource_Exhaustion__fscanf_fwrite_12.c
CWE400_Resource_Exhaustion__fscanf_fwrite_12_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_12_bad(void) { int iVar1; long lVar2; int iStack_3c; undefined *puStack_38; long lStack_30; undefined *puStack_28; long lStack_20; ulong uStack_18; ulong uStack_10; iStack_3c = -1; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { iStack_3c = 0x14; } else { func_0x00400b50(stdin,&UNK_00401458,&iStack_3c); } iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { uStack_18 = 0; lStack_20 = 0; puStack_28 = &UNK_004014a3; if ((0 < iStack_3c) && (iStack_3c < 0x15)) { lStack_20 = func_0x00400c10(&UNK_004014a3,&UNK_0040146a); if (lStack_20 == 0) { func_0x00400c20(1); } for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_3c; uStack_18 = uStack_18 + 1) { lVar2 = func_0x00400c30(&UNK_00401470,1,0x32,lStack_20); if (lVar2 != 0x32) { func_0x00400c20(1); } } if (lStack_20 != 0) { func_0x00400b80(lStack_20); } } } else { uStack_10 = 0; lStack_30 = 0; puStack_38 = &UNK_0040145b; lStack_30 = func_0x00400c10(&UNK_0040145b,&UNK_0040146a); if (lStack_30 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_3c; uStack_10 = uStack_10 + 1) { lVar2 = func_0x00400c30(&UNK_00401470,1,0x32,lStack_30); if (lVar2 != 0x32) { func_0x00400c20(1); } } if (lStack_30 != 0) { func_0x00400b80(lStack_30); } } return; }
['gcc']
54,372
void CWE400_Resource_Exhaustion__fscanf_fwrite_12_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98828/CWE400_Resource_Exhaustion__fscanf_fwrite_12.c
CWE400_Resource_Exhaustion__fscanf_fwrite_12_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_12_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,373
void CWE400_Resource_Exhaustion__fscanf_fwrite_13_bad() { int count; /* Initialize count */ count = -1; if(GLOBAL_CONST_FIVE==5) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(GLOBAL_CONST_FIVE==5) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98829/CWE400_Resource_Exhaustion__fscanf_fwrite_13.c
CWE400_Resource_Exhaustion__fscanf_fwrite_13_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_13_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; if (GLOBAL_CONST_FIVE == 5) { func_0x00400b50(stdin,&UNK_00401398,&iStack_24); } if (GLOBAL_CONST_FIVE == 5) { uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040139b; lStack_18 = func_0x00400c10(&UNK_0040139b,&UNK_004013aa); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013b0,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } } return; }
['gcc']
54,374
void CWE400_Resource_Exhaustion__fscanf_fwrite_13_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98829/CWE400_Resource_Exhaustion__fscanf_fwrite_13.c
CWE400_Resource_Exhaustion__fscanf_fwrite_13_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_13_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,375
void CWE400_Resource_Exhaustion__fscanf_fwrite_14_bad() { int count; /* Initialize count */ count = -1; if(globalFive==5) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } if(globalFive==5) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98830/CWE400_Resource_Exhaustion__fscanf_fwrite_14.c
CWE400_Resource_Exhaustion__fscanf_fwrite_14_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_14_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; if (globalFive == 5) { func_0x00400b50(stdin,&UNK_00401398,&iStack_24); } if (globalFive == 5) { uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040139b; lStack_18 = func_0x00400c10(&UNK_0040139b,&UNK_004013aa); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013b0,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } } return; }
['gcc']
54,376
void CWE400_Resource_Exhaustion__fscanf_fwrite_14_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98830/CWE400_Resource_Exhaustion__fscanf_fwrite_14.c
CWE400_Resource_Exhaustion__fscanf_fwrite_14_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_14_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,377
void CWE400_Resource_Exhaustion__fscanf_fwrite_15_bad() { int count; /* Initialize count */ count = -1; switch(6) { case 6: /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } switch(7) { case 7: { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98831/CWE400_Resource_Exhaustion__fscanf_fwrite_15.c
CWE400_Resource_Exhaustion__fscanf_fwrite_15_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_15_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; func_0x00400b50(stdin,&UNK_00401378,&iStack_24); uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040137b; lStack_18 = func_0x00400c10(&UNK_0040137b,&UNK_0040138a); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_00401390,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } return; }
['gcc']
54,378
void CWE400_Resource_Exhaustion__fscanf_fwrite_15_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98831/CWE400_Resource_Exhaustion__fscanf_fwrite_15.c
CWE400_Resource_Exhaustion__fscanf_fwrite_15_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_15_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,379
void CWE400_Resource_Exhaustion__fscanf_fwrite_16_bad() { int count; /* Initialize count */ count = -1; while(1) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); break; } while(1) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } break; } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98832/CWE400_Resource_Exhaustion__fscanf_fwrite_16.c
CWE400_Resource_Exhaustion__fscanf_fwrite_16_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_16_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; func_0x00400b50(stdin,&UNK_00401378,&iStack_24); uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040137b; lStack_18 = func_0x00400c10(&UNK_0040137b,&UNK_0040138a); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_00401390,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } return; }
['gcc']
54,380
void CWE400_Resource_Exhaustion__fscanf_fwrite_16_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98832/CWE400_Resource_Exhaustion__fscanf_fwrite_16.c
CWE400_Resource_Exhaustion__fscanf_fwrite_16_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_16_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,381
void CWE400_Resource_Exhaustion__fscanf_fwrite_17_bad() { int i,j; int count; /* Initialize count */ count = -1; for(i = 0; i < 1; i++) { /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); } for(j = 0; j < 1; j++) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98833/CWE400_Resource_Exhaustion__fscanf_fwrite_17.c
CWE400_Resource_Exhaustion__fscanf_fwrite_17_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_17_bad(void) { long lVar1; int iStack_2c; undefined *puStack_28; long lStack_20; ulong uStack_18; int iStack_10; int iStack_c; iStack_2c = -1; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { func_0x00400b50(stdin,&UNK_004013a8,&iStack_2c); } for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) { uStack_18 = 0; lStack_20 = 0; puStack_28 = &UNK_004013ab; lStack_20 = func_0x00400c10(&UNK_004013ab,&UNK_004013ba); if (lStack_20 == 0) { func_0x00400c20(1); } for (uStack_18 = 0; uStack_18 < (ulong)(long)iStack_2c; uStack_18 = uStack_18 + 1) { lVar1 = func_0x00400c30(&UNK_004013c0,1,0x32,lStack_20); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_20 != 0) { func_0x00400b80(lStack_20); } } return; }
['gcc']
54,382
void CWE400_Resource_Exhaustion__fscanf_fwrite_17_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98833/CWE400_Resource_Exhaustion__fscanf_fwrite_17.c
CWE400_Resource_Exhaustion__fscanf_fwrite_17_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_17_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,383
void CWE400_Resource_Exhaustion__fscanf_fwrite_18_bad() { int count; /* Initialize count */ count = -1; goto source; source: /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); goto sink; sink: { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98834/CWE400_Resource_Exhaustion__fscanf_fwrite_18.c
CWE400_Resource_Exhaustion__fscanf_fwrite_18_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_18_bad(void) { long lVar1; int iStack_24; undefined *puStack_20; long lStack_18; ulong uStack_10; iStack_24 = -1; func_0x00400b50(stdin,&UNK_00401378,&iStack_24); uStack_10 = 0; lStack_18 = 0; puStack_20 = &UNK_0040137b; lStack_18 = func_0x00400c10(&UNK_0040137b,&UNK_0040138a); if (lStack_18 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_00401390,1,0x32,lStack_18); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_18 != 0) { func_0x00400b80(lStack_18); } return; }
['gcc']
54,384
void CWE400_Resource_Exhaustion__fscanf_fwrite_18_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98834/CWE400_Resource_Exhaustion__fscanf_fwrite_18.c
CWE400_Resource_Exhaustion__fscanf_fwrite_18_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_18_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,385
void CWE400_Resource_Exhaustion__fscanf_fwrite_21_bad() { int count; /* Initialize count */ count = -1; /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); badStatic = 1; /* true */ badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* true */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98835/CWE400_Resource_Exhaustion__fscanf_fwrite_21.c
CWE400_Resource_Exhaustion__fscanf_fwrite_21_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_21_bad(void) { undefined4 uStack_c; uStack_c = 0xffffffff; func_0x00400b50(stdin,&UNK_004013f3,&uStack_c); badStatic = 1; badSink(uStack_c); return; }
['gcc']
54,386
void CWE400_Resource_Exhaustion__fscanf_fwrite_21_good() { goodB2G1(); goodB2G2(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98835/CWE400_Resource_Exhaustion__fscanf_fwrite_21.c
CWE400_Resource_Exhaustion__fscanf_fwrite_21_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_21_good(void) { goodB2G1(); goodB2G2(); goodG2B(); return; }
['gcc']
54,387
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_bad() { int count; /* Initialize count */ count = -1; /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); CWE400_Resource_Exhaustion__fscanf_fwrite_22_badGlobal = 1; /* true */ CWE400_Resource_Exhaustion__fscanf_fwrite_22_badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* true */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98836/CWE400_Resource_Exhaustion__fscanf_fwrite_22a.c
CWE400_Resource_Exhaustion__fscanf_fwrite_22_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_bad(void) { undefined4 uStack_c; uStack_c = 0xffffffff; func_0x00400b50(stdin,&UNK_004013a4,&uStack_c); CWE400_Resource_Exhaustion__fscanf_fwrite_22_badGlobal = 1; CWE400_Resource_Exhaustion__fscanf_fwrite_22_badSink(uStack_c); return; }
['gcc']
54,388
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_good() { goodB2G1(); goodB2G2(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98836/CWE400_Resource_Exhaustion__fscanf_fwrite_22a.c
CWE400_Resource_Exhaustion__fscanf_fwrite_22_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_good(void) { goodB2G1(); goodB2G2(); goodG2B(); return; }
['gcc']
54,389
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_badSink(int count) { if(CWE400_Resource_Exhaustion__fscanf_fwrite_22_badGlobal) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98836/CWE400_Resource_Exhaustion__fscanf_fwrite_22b.c
CWE400_Resource_Exhaustion__fscanf_fwrite_22_badSink
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_badSink(int param_1) { long lVar1; long lVar2; ulong uStack_10; if (CWE400_Resource_Exhaustion__fscanf_fwrite_22_badGlobal != 0) { lVar1 = func_0x00400c10(&UNK_004013a8,&UNK_004013b7); if (lVar1 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { lVar2 = func_0x00400c30(&UNK_004013c0,1,0x32,lVar1); if (lVar2 != 0x32) { func_0x00400c20(1); } } if (lVar1 != 0) { func_0x00400b80(lVar1); } } return; }
['gcc']
54,390
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodB2G1Sink(int count) { if(CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodB2G1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_good.txt"; /* FIX: Validate count before using it as the for loop variant to write to a file */ if (count > 0 && count <= 20) { pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) exit(1); } if (pFile) { fclose(pFile); } } } } }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Validate count before using it as the for loop variant to write to a file */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98836/CWE400_Resource_Exhaustion__fscanf_fwrite_22b.c
CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodB2G1Sink
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodB2G1Sink(int param_1) { long lVar1; long lVar2; ulong uStack_10; if (CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodB2G1Global == 0) { if ((0 < param_1) && (param_1 < 0x15)) { lVar1 = func_0x00400c10(&UNK_004015dd,&UNK_004015ed); if (lVar1 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { lVar2 = func_0x00400c30(&UNK_004015f0,1,0x32,lVar1); if (lVar2 != 0x32) { func_0x00400c20(1); } } if (lVar1 != 0) { func_0x00400b80(lVar1); } } } else { printLine(&UNK_004015c8); } return; }
['gcc']
54,391
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodB2G2Sink(int count) { if(CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodB2G2Global) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_good.txt"; /* FIX: Validate count before using it as the for loop variant to write to a file */ if (count > 0 && count <= 20) { pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) exit(1); } if (pFile) { fclose(pFile); } } } } }
['/* FIX: Validate count before using it as the for loop variant to write to a file */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98836/CWE400_Resource_Exhaustion__fscanf_fwrite_22b.c
CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodB2G2Sink
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodB2G2Sink(int param_1) { long lVar1; long lVar2; ulong uStack_10; if (CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodB2G2Global != 0) { if ((0 < param_1) && (param_1 < 0x15)) { lVar1 = func_0x00400c10(&UNK_004015dd,&UNK_004015ed); if (lVar1 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { lVar2 = func_0x00400c30(&UNK_004015f0,1,0x32,lVar1); if (lVar2 != 0x32) { func_0x00400c20(1); } } if (lVar1 != 0) { func_0x00400b80(lVar1); } } } return; }
['gcc']
54,392
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodG2BSink(int count) { if(CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodG2BGlobal) { { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98836/CWE400_Resource_Exhaustion__fscanf_fwrite_22b.c
CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodG2BSink
void CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodG2BSink(int param_1) { long lVar1; long lVar2; ulong uStack_10; if (CWE400_Resource_Exhaustion__fscanf_fwrite_22_goodG2BGlobal != 0) { lVar1 = func_0x00400c10(&UNK_00401623,&UNK_004015ed); if (lVar1 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { lVar2 = func_0x00400c30(&UNK_004015f0,1,0x32,lVar1); if (lVar2 != 0x32) { func_0x00400c20(1); } } if (lVar1 != 0) { func_0x00400b80(lVar1); } } return; }
['gcc']
54,393
void CWE400_Resource_Exhaustion__fscanf_fwrite_31_bad() { int count; /* Initialize count */ count = -1; /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); { int countCopy = count; int count = countCopy; { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98837/CWE400_Resource_Exhaustion__fscanf_fwrite_31.c
CWE400_Resource_Exhaustion__fscanf_fwrite_31_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_31_bad(void) { long lVar1; int iStack_2c; undefined *puStack_28; long lStack_20; int iStack_18; int iStack_14; ulong uStack_10; iStack_2c = -1; func_0x00400b50(stdin,&UNK_00401388,&iStack_2c); iStack_14 = iStack_2c; iStack_18 = iStack_2c; uStack_10 = 0; lStack_20 = 0; puStack_28 = &UNK_0040138b; lStack_20 = func_0x00400c10(&UNK_0040138b,&UNK_0040139a); if (lStack_20 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_18; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013a0,1,0x32,lStack_20); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_20 != 0) { func_0x00400b80(lStack_20); } return; }
['gcc']
54,394
void CWE400_Resource_Exhaustion__fscanf_fwrite_31_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98837/CWE400_Resource_Exhaustion__fscanf_fwrite_31.c
CWE400_Resource_Exhaustion__fscanf_fwrite_31_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_31_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,395
void CWE400_Resource_Exhaustion__fscanf_fwrite_32_bad() { int count; int *countPtr1 = &count; int *countPtr2 = &count; /* Initialize count */ count = -1; { int count = *countPtr1; /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); *countPtr1 = count; } { int count = *countPtr2; { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98838/CWE400_Resource_Exhaustion__fscanf_fwrite_32.c
CWE400_Resource_Exhaustion__fscanf_fwrite_32_bad
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void CWE400_Resource_Exhaustion__fscanf_fwrite_32_bad(void) { long lVar1; int iStack_40; int iStack_3c; undefined *puStack_38; long lStack_30; int iStack_24; int *piStack_20; int *piStack_18; ulong uStack_10; piStack_18 = &iStack_3c; piStack_20 = &iStack_3c; iStack_3c = -1; iStack_40 = -1; func_0x00400b50(stdin,&UNK_004013a8,&iStack_40); *piStack_18 = iStack_40; iStack_24 = *piStack_20; uStack_10 = 0; lStack_30 = 0; puStack_38 = &UNK_004013ab; lStack_30 = func_0x00400c10(&UNK_004013ab,&UNK_004013ba); if (lStack_30 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_24; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013c0,1,0x32,lStack_30); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_30 != 0) { func_0x00400b80(lStack_30); } return; }
['gcc']
54,396
void CWE400_Resource_Exhaustion__fscanf_fwrite_32_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98838/CWE400_Resource_Exhaustion__fscanf_fwrite_32.c
CWE400_Resource_Exhaustion__fscanf_fwrite_32_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_32_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,397
void CWE400_Resource_Exhaustion__fscanf_fwrite_34_bad() { int count; CWE400_Resource_Exhaustion__fscanf_fwrite_34_unionType myUnion; /* Initialize count */ count = -1; /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); myUnion.unionFirst = count; { int count = myUnion.unionSecond; { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */', '/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98840/CWE400_Resource_Exhaustion__fscanf_fwrite_34.c
CWE400_Resource_Exhaustion__fscanf_fwrite_34_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_34_bad(void) { long lVar1; int iStack_2c; undefined *puStack_28; long lStack_20; int iStack_14; ulong uStack_10; iStack_2c = -1; func_0x00400b50(stdin,&UNK_00401388,&iStack_2c); iStack_14 = iStack_2c; uStack_10 = 0; lStack_20 = 0; puStack_28 = &UNK_0040138b; lStack_20 = func_0x00400c10(&UNK_0040138b,&UNK_0040139a); if (lStack_20 == 0) { func_0x00400c20(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iStack_14; uStack_10 = uStack_10 + 1) { lVar1 = func_0x00400c30(&UNK_004013a0,1,0x32,lStack_20); if (lVar1 != 0x32) { func_0x00400c20(1); } } if (lStack_20 != 0) { func_0x00400b80(lStack_20); } return; }
['gcc']
54,398
void CWE400_Resource_Exhaustion__fscanf_fwrite_34_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98840/CWE400_Resource_Exhaustion__fscanf_fwrite_34.c
CWE400_Resource_Exhaustion__fscanf_fwrite_34_good
void CWE400_Resource_Exhaustion__fscanf_fwrite_34_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,399
void CWE400_Resource_Exhaustion__fscanf_fwrite_41_bad() { int count; /* Initialize count */ count = -1; /* POTENTIAL FLAW: Read count from the console using fscanf() */ fscanf(stdin, "%d", &count); badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count from the console using fscanf() */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98841/CWE400_Resource_Exhaustion__fscanf_fwrite_41.c
CWE400_Resource_Exhaustion__fscanf_fwrite_41_bad
void CWE400_Resource_Exhaustion__fscanf_fwrite_41_bad(void) { undefined4 uStack_c; uStack_c = 0xffffffff; func_0x00400b50(stdin,&UNK_004013e3,&uStack_c); badSink(uStack_c); return; }
['gcc']