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
50,100
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63_bad() { int data; /* Initialize data */ data = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63b_badSink(&data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87809/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63_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_0x00400b80(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_004013a4); } else { uStack_c = func_0x00400be0(&uStack_1a); } CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63b_badSink(&uStack_c); return; }
['gcc']
50,101
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87809/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63_good(void) { goodG2B(); return; }
['gcc']
50,102
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63b_badSink(int * dataPtr) { int data = *dataPtr; { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87809/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63b_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63b_badSink(int *param_1) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; int iStack_c; iStack_c = *param_1; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; func_0x00400b50(auStack_e8,0x41,99); uStack_85 = 0; if (iStack_c < 100) { func_0x00400b10(&uStack_78,auStack_e8,(long)iStack_c); *(undefined *)((long)&uStack_78 + (long)iStack_c) = 0; } printLine(&uStack_78); return; }
['gcc']
50,103
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63b_goodG2BSink(int * dataPtr) { int data = *dataPtr; { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87809/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63b_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_63b_goodG2BSink(int *param_1) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; int iStack_c; iStack_c = *param_1; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; func_0x00400a60(auStack_e8,0x41,99); uStack_85 = 0; if (iStack_c < 100) { func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c); *(undefined *)((long)&uStack_78 + (long)iStack_c) = 0; } printLine(&uStack_78); return; }
['gcc']
50,104
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64_bad() { int data; /* Initialize data */ data = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64b_badSink(&data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87810/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_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_0x00400b80(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_004013b4); } else { uStack_c = func_0x00400be0(&uStack_1a); } CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64b_badSink(&uStack_c); return; }
['gcc']
50,105
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87810/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64_good(void) { goodG2B(); return; }
['gcc']
50,106
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64b_badSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ int * dataPtr = (int *)dataVoidPtr; /* dereference dataPtr into data */ int data = (*dataPtr); { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87810/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64b_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64b_badSink(int *param_1) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; int iStack_14; int *piStack_10; iStack_14 = *param_1; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; piStack_10 = param_1; func_0x00400b50(auStack_e8,0x41,99); uStack_85 = 0; if (iStack_14 < 100) { func_0x00400b10(&uStack_78,auStack_e8,(long)iStack_14); *(undefined *)((long)&uStack_78 + (long)iStack_14) = 0; } printLine(&uStack_78); return; }
['gcc']
50,107
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64b_goodG2BSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ int * dataPtr = (int *)dataVoidPtr; /* dereference dataPtr into data */ int data = (*dataPtr); { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87810/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64b_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_64b_goodG2BSink(int *param_1) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; int iStack_14; int *piStack_10; iStack_14 = *param_1; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; piStack_10 = param_1; func_0x00400a60(auStack_e8,0x41,99); uStack_85 = 0; if (iStack_14 < 100) { func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_14); *(undefined *)((long)&uStack_78 + (long)iStack_14) = 0; } printLine(&uStack_78); return; }
['gcc']
50,108
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65_bad() { int data; /* define a function pointer */ void (*funcPtr) (int) = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65b_badSink; /* Initialize data */ data = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* use the function pointer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87811/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65_bad(void) { long lVar1; undefined8 uStack_26; undefined4 uStack_1e; undefined2 uStack_1a; code *pcStack_18; undefined4 uStack_c; pcStack_18 = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65b_badSink; uStack_c = 0xffffffff; uStack_26 = 0; uStack_1e = 0; uStack_1a = 0; lVar1 = func_0x00400b80(&uStack_26,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_004013a4); } else { uStack_c = func_0x00400be0(&uStack_26); } (*pcStack_18)(uStack_c); return; }
['gcc']
50,109
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87811/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65_good(void) { goodG2B(); return; }
['gcc']
50,110
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65b_badSink(int data) { { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87811/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65b_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65b_badSink(int param_1) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; func_0x00400b50(auStack_e8,0x41,99); uStack_85 = 0; if (param_1 < 100) { func_0x00400b10(&uStack_78,auStack_e8,(long)param_1); *(undefined *)((long)&uStack_78 + (long)param_1) = 0; } printLine(&uStack_78); return; }
['gcc']
50,111
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65b_goodG2BSink(int data) { { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87811/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65b_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_65b_goodG2BSink(int param_1) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; func_0x00400a60(auStack_e8,0x41,99); uStack_85 = 0; if (param_1 < 100) { func_0x00400a20(&uStack_78,auStack_e8,(long)param_1); *(undefined *)((long)&uStack_78 + (long)param_1) = 0; } printLine(&uStack_78); return; }
['gcc']
50,112
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66_bad() { int data; int dataArray[5]; /* Initialize data */ data = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } /* put data in array */ dataArray[2] = data; CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66b_badSink(dataArray); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* put data in array */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87812/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_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_0x00400b80(&uStack_36,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_004013b4); } else { uStack_c = func_0x00400be0(&uStack_36); } uStack_20 = uStack_c; CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66b_badSink(auStack_28); return; }
['gcc']
50,113
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87812/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66_good(void) { goodG2B(); return; }
['gcc']
50,114
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66b_badSink(int dataArray[]) { /* copy data out of dataArray */ int data = dataArray[2]; { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* copy data out of dataArray */', '/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87812/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66b_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66b_badSink(long param_1) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; int iStack_c; iStack_c = *(int *)(param_1 + 8); uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; func_0x00400b50(auStack_e8,0x41,99); uStack_85 = 0; if (iStack_c < 100) { func_0x00400b10(&uStack_78,auStack_e8,(long)iStack_c); *(undefined *)((long)&uStack_78 + (long)iStack_c) = 0; } printLine(&uStack_78); return; }
['gcc']
50,115
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66b_goodG2BSink(int dataArray[]) { int data = dataArray[2]; { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87812/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66b_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_66b_goodG2BSink(long param_1) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; int iStack_c; iStack_c = *(int *)(param_1 + 8); uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; func_0x00400a60(auStack_e8,0x41,99); uStack_85 = 0; if (iStack_c < 100) { func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c); *(undefined *)((long)&uStack_78 + (long)iStack_c) = 0; } printLine(&uStack_78); return; }
['gcc']
50,116
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67_bad() { int data; CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67_structType myStruct; /* Initialize data */ data = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } myStruct.structFirst = data; CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67b_badSink(myStruct); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87813/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_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_0x00400b80(&uStack_1e,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_004013a4); } else { uStack_c = func_0x00400be0(&uStack_1e); } uStack_10 = uStack_c; CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67b_badSink(uStack_c); return; }
['gcc']
50,117
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87813/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67_good(void) { goodG2B(); return; }
['gcc']
50,118
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67b_badSink(CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67_structType myStruct) { int data = myStruct.structFirst; { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87813/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67b_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67b_badSink(int param_1) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; int iStack_c; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; iStack_c = param_1; func_0x00400b50(auStack_e8,0x41,99); uStack_85 = 0; if (iStack_c < 100) { func_0x00400b10(&uStack_78,auStack_e8,(long)iStack_c); *(undefined *)((long)&uStack_78 + (long)iStack_c) = 0; } printLine(&uStack_78); return; }
['gcc']
50,119
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67b_goodG2BSink(CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67_structType myStruct) { int data = myStruct.structFirst; { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87813/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67b_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_67b_goodG2BSink(int param_1) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; int iStack_c; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; iStack_c = param_1; func_0x00400a60(auStack_e8,0x41,99); uStack_85 = 0; if (iStack_c < 100) { func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c); *(undefined *)((long)&uStack_78 + (long)iStack_c) = 0; } printLine(&uStack_78); return; }
['gcc']
50,120
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_bad() { int data; /* Initialize data */ data = -1; { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* POTENTIAL FLAW: Read data from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to int */ data = atoi(inputBuffer); } else { printLine("fgets() failed."); } } CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_badData = data; CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68b_badSink(); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87814/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_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_0x00400b80(&uStack_1a,0xe,stdin); if (lVar1 == 0) { printLine(&UNK_004013a4); } else { uStack_c = func_0x00400be0(&uStack_1a); } CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_badData = uStack_c; CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68b_badSink(); return; }
['gcc']
50,121
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87814/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_good(void) { goodG2B(); return; }
['gcc']
50,122
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68b_badSink() { int data = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_badData; { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87814/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68b_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68b_badSink(void) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; int iStack_c; iStack_c = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_badData; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; func_0x00400b50(auStack_e8,0x41,99); uStack_85 = 0; if (iStack_c < 100) { func_0x00400b10(&uStack_78,auStack_e8,(long)iStack_c); *(undefined *)((long)&uStack_78 + (long)iStack_c) = 0; } printLine(&uStack_78); return; }
['gcc']
50,123
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68b_goodG2BSink() { int data = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_goodG2BData; { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } }
['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87814/CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68b_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68b_goodG2BSink(void) { undefined auStack_e8 [99]; undefined uStack_85; undefined8 uStack_78; undefined8 uStack_70; undefined8 uStack_68; undefined8 uStack_60; undefined8 uStack_58; undefined8 uStack_50; undefined8 uStack_48; undefined8 uStack_40; undefined8 uStack_38; undefined8 uStack_30; undefined8 uStack_28; undefined8 uStack_20; undefined4 uStack_18; int iStack_c; iStack_c = CWE195_Signed_to_Unsigned_Conversion_Error__fgets_strncpy_68_goodG2BData; uStack_78 = 0; uStack_70 = 0; uStack_68 = 0; uStack_60 = 0; uStack_58 = 0; uStack_50 = 0; uStack_48 = 0; uStack_40 = 0; uStack_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; uStack_18 = 0; func_0x00400a60(auStack_e8,0x41,99); uStack_85 = 0; if (iStack_c < 100) { func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c); *(undefined *)((long)&uStack_78 + (long)iStack_c) = 0; } printLine(&uStack_78); return; }
['gcc']
50,124
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_01_bad() { int data; /* Initialize data */ data = -1; /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87822/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_01.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_01_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_01_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,125
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_01_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87822/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_01.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_01_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_01_good(void) { goodG2B(); return; }
['gcc']
50,126
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_02_bad() { int data; /* Initialize data */ data = -1; if(1) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87823/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_02.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_02_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_02_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,127
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_02_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87823/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_02.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_02_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_02_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,128
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_03_bad() { int data; /* Initialize data */ data = -1; if(5==5) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87824/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_03.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_03_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_03_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,129
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_03_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87824/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_03.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_03_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_03_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,130
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_04_bad() { int data; /* Initialize data */ data = -1; if(STATIC_CONST_TRUE) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87825/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_04.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_04_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_04_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; func_0x00400b20(stdin,&UNK_004012fc,&iStack_14); if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,131
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_04_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87825/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_04.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_04_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_04_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,132
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_05_bad() { int data; /* Initialize data */ data = -1; if(staticTrue) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87826/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_05.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_05_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_05_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; if (staticTrue != 0) { func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); } if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,133
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_05_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87826/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_05.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_05_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_05_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,134
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_06_bad() { int data; /* Initialize data */ data = -1; if(STATIC_CONST_FIVE==5) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87827/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_06.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_06_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_06_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; func_0x00400b20(stdin,&UNK_004012f8,&iStack_14); if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,135
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_06_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87827/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_06.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_06_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_06_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,136
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_07_bad() { int data; /* Initialize data */ data = -1; if(staticFive==5) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87828/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_07.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_07_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_07_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; if (staticFive == 5) { func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); } if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,137
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_07_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87828/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_07.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_07_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_07_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,138
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_08_bad() { int data; /* Initialize data */ data = -1; if(staticReturnsTrue()) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87829/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_08.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_08_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_08_bad(void) { int iVar1; int iStack_14; long lStack_10; iStack_14 = -1; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { func_0x00400b20(stdin,&UNK_00401314,&iStack_14); } if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,139
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_08_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87829/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_08.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_08_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_08_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,140
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_09_bad() { int data; /* Initialize data */ data = -1; if(GLOBAL_CONST_TRUE) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87830/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_09.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_09_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_09_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; if (GLOBAL_CONST_TRUE != 0) { func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); } if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,141
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_09_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87830/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_09.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_09_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_09_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,142
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_10_bad() { int data; /* Initialize data */ data = -1; if(globalTrue) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87831/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_10.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_10_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_10_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; if (globalTrue != 0) { func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); } if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,143
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_10_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87831/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_10.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_10_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_10_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,144
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_11_bad() { int data; /* Initialize data */ data = -1; if(globalReturnsTrue()) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87832/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_11.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_11_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_11_bad(void) { int iVar1; int iStack_14; long lStack_10; iStack_14 = -1; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); } if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,145
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_11_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87832/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_11.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_11_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_11_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,146
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_12_bad() { int data; /* Initialize data */ data = -1; if(globalReturnsTrueOrFalse()) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } else { /* FIX: Use a positive integer less than &InitialDataSize&*/ data = 100-1; } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* FIX: Use a positive integer less than &InitialDataSize&*/', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87833/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_12.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_12_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_12_bad(void) { int iVar1; int iStack_14; long lStack_10; iStack_14 = -1; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { iStack_14 = 99; } else { func_0x00400b20(stdin,&UNK_00401304,&iStack_14); } if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,147
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_12_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87833/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_12.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_12_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_12_good(void) { goodG2B(); return; }
['gcc']
50,148
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_13_bad() { int data; /* Initialize data */ data = -1; if(GLOBAL_CONST_FIVE==5) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87834/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_13.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_13_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_13_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; if (GLOBAL_CONST_FIVE == 5) { func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); } if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,149
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_13_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87834/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_13.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_13_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_13_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,150
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_14_bad() { int data; /* Initialize data */ data = -1; if(globalFive==5) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87835/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_14.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_14_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_14_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; if (globalFive == 5) { func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); } if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,151
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_14_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87835/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_14.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_14_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_14_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,152
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_15_bad() { int data; /* Initialize data */ data = -1; switch(6) { case 6: /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87836/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_15.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_15_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_15_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,153
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_15_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87836/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_15.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_15_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_15_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,154
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_16_bad() { int data; /* Initialize data */ data = -1; while(1) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); break; } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87837/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_16.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_16_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_16_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,155
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_16_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87837/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_16.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_16_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_16_good(void) { goodG2B(); return; }
['gcc']
50,156
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_17_bad() { int i; int data; /* Initialize data */ data = -1; for(i = 0; i < 1; i++) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87838/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_17.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_17_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_17_bad(void) { int iStack_1c; long lStack_18; int iStack_c; iStack_1c = -1; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { func_0x00400b20(stdin,&UNK_00401304,&iStack_1c); } if (iStack_1c < 100) { lStack_18 = func_0x00400bc0((long)iStack_1c); func_0x00400b60(lStack_18,0x41,(long)(iStack_1c + -1)); *(undefined *)(lStack_18 + (long)iStack_1c + -1) = 0; printLine(lStack_18); func_0x00400b10(lStack_18); } return; }
['gcc']
50,157
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_17_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87838/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_17.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_17_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_17_good(void) { goodG2B(); return; }
['gcc']
50,158
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_18_bad() { int data; /* Initialize data */ data = -1; goto source; source: /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87839/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_18.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_18_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_18_bad(void) { int iStack_14; long lStack_10; iStack_14 = -1; func_0x00400b20(stdin,&UNK_004012f4,&iStack_14); if (iStack_14 < 100) { lStack_10 = func_0x00400bc0((long)iStack_14); func_0x00400b60(lStack_10,0x41,(long)(iStack_14 + -1)); *(undefined *)(lStack_10 + (long)iStack_14 + -1) = 0; printLine(lStack_10); func_0x00400b10(lStack_10); } return; }
['gcc']
50,159
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_18_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87839/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_18.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_18_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_18_good(void) { goodG2B(); return; }
['gcc']
50,160
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_21_bad() { int data; /* Initialize data */ data = -1; badStatic = 1; /* true */ data = badSource(data); /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* true */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87840/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_21.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_21_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_21_bad(void) { int iVar1; long lVar2; badStatic = 1; iVar1 = badSource(0xffffffff); if (iVar1 < 100) { lVar2 = func_0x00400bc0((long)iVar1); func_0x00400b60(lVar2,0x41,(long)(iVar1 + -1)); *(undefined *)(lVar2 + (long)iVar1 + -1) = 0; printLine(lVar2); func_0x00400b10(lVar2); } return; }
['gcc']
50,161
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_21_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87840/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_21.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_21_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_21_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,162
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_bad() { int data; /* Initialize data */ data = -1; CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_badGlobal = 1; /* true */ data = CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_badSource(data); /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* true */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87841/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_bad(void) { int iVar1; long lVar2; CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_badGlobal = 1; iVar1 = CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_badSource(0xffffffff); if (iVar1 < 100) { lVar2 = func_0x00400bc0((long)iVar1); func_0x00400b60(lVar2,0x41,(long)(iVar1 + -1)); *(undefined *)(lVar2 + (long)iVar1 + -1) = 0; printLine(lVar2); func_0x00400b10(lVar2); } return; }
['gcc']
50,163
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_good() { goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87841/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_good(void) { goodG2B1(); goodG2B2(); return; }
['gcc']
50,164
int CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_badSource(int data) { if(CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_badGlobal) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } return data; }
['/* POTENTIAL FLAW: Read data from the console using fscanf() */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87841/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_badSource
undefined4 CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_badSource(undefined4 param_1) { undefined4 uStack_c; uStack_c = param_1; if (CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_badGlobal != 0) { func_0x00400b20(stdin,&UNK_00401324,&uStack_c); } return uStack_c; }
['gcc']
50,165
int CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_goodG2B1Source(int data) { if(CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_goodG2B1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Use a positive integer less than &InitialDataSize&*/ data = 100-1; } return data; }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Use a positive integer less than &InitialDataSize&*/']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87841/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_goodG2B1Source
undefined4 CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_goodG2B1Source(undefined4 param_1) { undefined4 uStack_c; if (CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_goodG2B1Global == 0) { uStack_c = 99; } else { printLine(&UNK_00401314); uStack_c = param_1; } return uStack_c; }
['gcc']
50,166
int CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_goodG2B2Source(int data) { if(CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_goodG2B2Global) { /* FIX: Use a positive integer less than &InitialDataSize&*/ data = 100-1; } return data; }
['/* FIX: Use a positive integer less than &InitialDataSize&*/']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87841/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_goodG2B2Source
undefined4 CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_goodG2B2Source(undefined4 param_1) { undefined4 uStack_c; uStack_c = param_1; if (CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_22_goodG2B2Global != 0) { uStack_c = 99; } return uStack_c; }
['gcc']
50,167
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_31_bad() { int data; /* Initialize data */ data = -1; /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); { int dataCopy = data; int data = dataCopy; /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87842/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_31.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_31_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_31_bad(void) { int iStack_1c; long lStack_18; int iStack_10; int iStack_c; iStack_1c = -1; func_0x00400b20(stdin,&UNK_004012f4,&iStack_1c); iStack_c = iStack_1c; iStack_10 = iStack_1c; if (iStack_1c < 100) { lStack_18 = func_0x00400bc0((long)iStack_1c); func_0x00400b60(lStack_18,0x41,(long)(iStack_10 + -1)); *(undefined *)(lStack_18 + (long)iStack_10 + -1) = 0; printLine(lStack_18); func_0x00400b10(lStack_18); } return; }
['gcc']
50,168
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_31_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87842/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_31.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_31_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_31_good(void) { goodG2B(); return; }
['gcc']
50,169
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_32_bad() { int data; int *dataPtr1 = &data; int *dataPtr2 = &data; /* Initialize data */ data = -1; { int data = *dataPtr1; /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); *dataPtr1 = data; } { int data = *dataPtr2; /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87843/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_32.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_32_bad
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_32_bad(void) { int iStack_30; int iStack_2c; long lStack_28; int iStack_1c; int *piStack_18; int *piStack_10; piStack_10 = &iStack_2c; piStack_18 = &iStack_2c; iStack_2c = -1; iStack_30 = -1; func_0x00400b20(stdin,&UNK_00401314,&iStack_30); *piStack_10 = iStack_30; iStack_1c = *piStack_18; if (iStack_1c < 100) { lStack_28 = func_0x00400bc0((long)iStack_1c); func_0x00400b60(lStack_28,0x41,(long)(iStack_1c + -1)); *(undefined *)(lStack_28 + (long)iStack_1c + -1) = 0; printLine(lStack_28); func_0x00400b10(lStack_28); } return; }
['gcc']
50,170
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_32_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87843/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_32.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_32_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_32_good(void) { goodG2B(); return; }
['gcc']
50,171
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_34_bad() { int data; CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_34_unionType myUnion; /* Initialize data */ data = -1; /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); myUnion.unionFirst = data; { int data = myUnion.unionSecond; /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } } }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87845/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_34.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_34_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_34_bad(void) { int iStack_1c; long lStack_18; int iStack_c; iStack_1c = -1; func_0x00400b20(stdin,&UNK_004012f4,&iStack_1c); iStack_c = iStack_1c; if (iStack_1c < 100) { lStack_18 = func_0x00400bc0((long)iStack_1c); func_0x00400b60(lStack_18,0x41,(long)(iStack_c + -1)); *(undefined *)(lStack_18 + (long)iStack_c + -1) = 0; printLine(lStack_18); func_0x00400b10(lStack_18); } return; }
['gcc']
50,172
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_34_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87845/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_34.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_34_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_34_good(void) { goodG2B(); return; }
['gcc']
50,173
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_badSink(int data) { /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87846/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_badSink(int param_1) { long lVar1; if (param_1 < 100) { lVar1 = func_0x00400bc0((long)param_1); func_0x00400b60(lVar1,0x41,(long)(param_1 + -1)); *(undefined *)(lVar1 + (long)param_1 + -1) = 0; printLine(lVar1); func_0x00400b10(lVar1); } return; }
['gcc']
50,174
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_bad() { int data; /* Initialize data */ data = -1; /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87846/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_bad(void) { undefined4 uStack_c; uStack_c = 0xffffffff; func_0x00400b20(stdin,&UNK_00401304,&uStack_c); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_badSink(uStack_c); return; }
['gcc']
50,175
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_goodG2BSink(int data) { /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87846/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_goodG2BSink(int param_1) { long lVar1; if (param_1 < 100) { lVar1 = func_0x00400b00((long)param_1); func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1)); *(undefined *)(lVar1 + (long)param_1 + -1) = 0; printLine(lVar1); func_0x00400a60(lVar1); } return; }
['gcc']
50,176
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87846/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_41_good(void) { goodG2B(); return; }
['gcc']
50,177
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_42_bad() { int data; /* Initialize data */ data = -1; data = badSource(data); /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Initialize data */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87847/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_42.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_42_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_42_bad(void) { int iVar1; long lVar2; iVar1 = badSource(0xffffffff); if (iVar1 < 100) { lVar2 = func_0x00400bc0((long)iVar1); func_0x00400b60(lVar2,0x41,(long)(iVar1 + -1)); *(undefined *)(lVar2 + (long)iVar1 + -1) = 0; printLine(lVar2); func_0x00400b10(lVar2); } return; }
['gcc']
50,178
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_42_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87847/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_42.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_42_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_42_good(void) { goodG2B(); return; }
['gcc']
50,179
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_44_bad() { int data; /* define a function pointer */ void (*funcPtr) (int) = badSink; /* Initialize data */ data = -1; /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); /* use the function pointer */ funcPtr(data); }
['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */', '/* use the function pointer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87849/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_44.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_44_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_44_bad(void) { undefined4 uStack_14; code *pcStack_10; pcStack_10 = badSink; uStack_14 = 0xffffffff; func_0x00400b20(stdin,&UNK_00401314,&uStack_14); (*pcStack_10)(uStack_14); return; }
['gcc']
50,180
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_44_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87849/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_44.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_44_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_44_good(void) { goodG2B(); return; }
['gcc']
50,181
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_45_bad() { int data; /* Initialize data */ data = -1; /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_45_badData = data; badSink(); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87850/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_45.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_45_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_45_bad(void) { undefined4 uStack_c; uStack_c = 0xffffffff; func_0x00400b20(stdin,&UNK_00401314,&uStack_c); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_45_badData = uStack_c; badSink(); return; }
['gcc']
50,182
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_45_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87850/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_45.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_45_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_45_good(void) { goodG2B(); return; }
['gcc']
50,183
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51_bad() { int data; /* Initialize data */ data = -1; /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87851/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51_bad(void) { undefined4 uStack_c; uStack_c = 0xffffffff; func_0x00400b20(stdin,&UNK_00401304,&uStack_c); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51b_badSink(uStack_c); return; }
['gcc']
50,184
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87851/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51_good(void) { goodG2B(); return; }
['gcc']
50,185
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51b_badSink(int data) { /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87851/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51b_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51b_badSink(int param_1) { long lVar1; if (param_1 < 100) { lVar1 = func_0x00400bc0((long)param_1); func_0x00400b60(lVar1,0x41,(long)(param_1 + -1)); *(undefined *)(lVar1 + (long)param_1 + -1) = 0; printLine(lVar1); func_0x00400b10(lVar1); } return; }
['gcc']
50,186
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51b_goodG2BSink(int data) { /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87851/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51b_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_51b_goodG2BSink(int param_1) { long lVar1; if (param_1 < 100) { lVar1 = func_0x00400b00((long)param_1); func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1)); *(undefined *)(lVar1 + (long)param_1 + -1) = 0; printLine(lVar1); func_0x00400a60(lVar1); } return; }
['gcc']
50,187
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52_bad() { int data; /* Initialize data */ data = -1; /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87852/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52_bad(void) { undefined4 uStack_c; uStack_c = 0xffffffff; func_0x00400b20(stdin,&UNK_00401314,&uStack_c); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52b_badSink(uStack_c); return; }
['gcc']
50,188
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87852/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52_good(void) { goodG2B(); return; }
['gcc']
50,189
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52b_badSink(int data) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c_badSink(data); }
[]
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87852/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52b_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52b_badSink(undefined4 param_1) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c_badSink(param_1); return; }
['gcc']
50,190
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52b_goodG2BSink(int data) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87852/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52b_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52b_goodG2BSink(undefined4 param_1) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c_goodG2BSink(param_1); return; }
['gcc']
50,191
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c_badSink(int data) { /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87852/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c_badSink(int param_1) { long lVar1; if (param_1 < 100) { lVar1 = func_0x00400bc0((long)param_1); func_0x00400b60(lVar1,0x41,(long)(param_1 + -1)); *(undefined *)(lVar1 + (long)param_1 + -1) = 0; printLine(lVar1); func_0x00400b10(lVar1); } return; }
['gcc']
50,192
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c_goodG2BSink(int data) { /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87852/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_52c_goodG2BSink(int param_1) { long lVar1; if (param_1 < 100) { lVar1 = func_0x00400b00((long)param_1); func_0x00400aa0(lVar1,0x41,(long)(param_1 + -1)); *(undefined *)(lVar1 + (long)param_1 + -1) = 0; printLine(lVar1); func_0x00400a60(lVar1); } return; }
['gcc']
50,193
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53_bad() { int data; /* Initialize data */ data = -1; /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53b_badSink(data); }
['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fscanf() */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87853/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53_bad
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53_bad(void) { undefined4 uStack_c; uStack_c = 0xffffffff; func_0x00400b20(stdin,&UNK_00401334,&uStack_c); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53b_badSink(uStack_c); return; }
['gcc']
50,194
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53_good() { goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87853/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53a.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53_good
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53_good(void) { goodG2B(); return; }
['gcc']
50,195
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53b_badSink(int data) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c_badSink(data); }
[]
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87853/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53b_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53b_badSink(undefined4 param_1) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c_badSink(param_1); return; }
['gcc']
50,196
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53b_goodG2BSink(int data) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87853/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53b.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53b_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53b_goodG2BSink(undefined4 param_1) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c_goodG2BSink(param_1); return; }
['gcc']
50,197
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c_badSink(int data) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53d_badSink(data); }
[]
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87853/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c_badSink(undefined4 param_1) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53d_badSink(param_1); return; }
['gcc']
50,198
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c_goodG2BSink(int data) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53d_goodG2BSink(data); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87853/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c_goodG2BSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53c_goodG2BSink(undefined4 param_1) { CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53d_goodG2BSink(param_1); return; }
['gcc']
50,199
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53d_badSink(int data) { /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } }
['/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */']
['CWE195']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/87853/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53d.c
CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53d_badSink
void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_malloc_53d_badSink(int param_1) { long lVar1; if (param_1 < 100) { lVar1 = func_0x00400bc0((long)param_1); func_0x00400b60(lVar1,0x41,(long)(param_1 + -1)); *(undefined *)(lVar1 + (long)param_1 + -1) = 0; printLine(lVar1); func_0x00400b10(lVar1); } return; }
['gcc']