Unnamed: 0
int64
0
56k
source_code
stringlengths
55
5.98k
comments
stringlengths
2
1.76k
label
stringclasses
68 values
dataset_name
stringclasses
1 value
file_name
stringlengths
208
265
function
stringlengths
27
87
decompiled_code
stringlengths
68
3.97k
compiler_options
stringclasses
1 value
54,000
void CWE400_Resource_Exhaustion__connect_socket_fwrite_67b_badSink(CWE400_Resource_Exhaustion__connect_socket_fwrite_67_structType myStruct) { int count = myStruct.structFirst; { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } }
['/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98568/CWE400_Resource_Exhaustion__connect_socket_fwrite_67b.c
CWE400_Resource_Exhaustion__connect_socket_fwrite_67b_badSink
void CWE400_Resource_Exhaustion__connect_socket_fwrite_67b_badSink(int param_1) { long lVar1; long lVar2; ulong uStack_10; lVar1 = func_0x00400db0(&UNK_00401628,&UNK_00401637); if (lVar1 == 0) { func_0x00400dd0(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { lVar2 = func_0x00400df0(&UNK_00401640,1,0x32,lVar1); if (lVar2 != 0x32) { func_0x00400dd0(1); } } if (lVar1 != 0) { func_0x00400ce0(lVar1); } return; }
['gcc']
54,001
void CWE400_Resource_Exhaustion__connect_socket_fwrite_67b_goodG2BSink(CWE400_Resource_Exhaustion__connect_socket_fwrite_67_structType myStruct) { int count = myStruct.structFirst; { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } }
['/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98568/CWE400_Resource_Exhaustion__connect_socket_fwrite_67b.c
CWE400_Resource_Exhaustion__connect_socket_fwrite_67b_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_fwrite_67b_goodG2BSink(int param_1) { long lVar1; long lVar2; ulong uStack_10; lVar1 = func_0x00400db0(&UNK_00401718,&UNK_00401727); if (lVar1 == 0) { func_0x00400dd0(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { lVar2 = func_0x00400df0(&UNK_00401730,1,0x32,lVar1); if (lVar2 != 0x32) { func_0x00400dd0(1); } } if (lVar1 != 0) { func_0x00400ce0(lVar1); } return; }
['gcc']
54,002
void CWE400_Resource_Exhaustion__connect_socket_fwrite_67b_goodB2GSink(CWE400_Resource_Exhaustion__connect_socket_fwrite_67_structType myStruct) { int count = myStruct.structFirst; { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_good.txt"; /* FIX: Validate count before using it as the for loop variant to write to a file */ if (count > 0 && count <= 20) { pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) exit(1); } if (pFile) { fclose(pFile); } } } }
['/* FIX: Validate count before using it as the for loop variant to write to a file */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98568/CWE400_Resource_Exhaustion__connect_socket_fwrite_67b.c
CWE400_Resource_Exhaustion__connect_socket_fwrite_67b_goodB2GSink
void CWE400_Resource_Exhaustion__connect_socket_fwrite_67b_goodB2GSink(int param_1) { long lVar1; long lVar2; ulong uStack_10; if ((0 < param_1) && (param_1 < 0x15)) { lVar1 = func_0x00400db0(&UNK_00401763,&UNK_00401727); if (lVar1 == 0) { func_0x00400dd0(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)param_1; uStack_10 = uStack_10 + 1) { lVar2 = func_0x00400df0(&UNK_00401730,1,0x32,lVar1); if (lVar2 != 0x32) { func_0x00400dd0(1); } } if (lVar1 != 0) { func_0x00400ce0(lVar1); } } return; }
['gcc']
54,003
void CWE400_Resource_Exhaustion__connect_socket_fwrite_68_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE400_Resource_Exhaustion__connect_socket_fwrite_68_badData = count; CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_badSink(); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98569/CWE400_Resource_Exhaustion__connect_socket_fwrite_68a.c
CWE400_Resource_Exhaustion__connect_socket_fwrite_68_bad
void CWE400_Resource_Exhaustion__connect_socket_fwrite_68_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400e20(2,1,6); if (iStack_10 != -1) { func_0x00400d10(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400d60(&UNK_00401624); uStack_26 = func_0x00400cf0(0x6987); iVar1 = func_0x00400de0(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400cb0(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400dc0(auStack_36); } } if (iStack_10 != -1) { func_0x00400d20(iStack_10); } CWE400_Resource_Exhaustion__connect_socket_fwrite_68_badData = uStack_c; CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_badSink(); return; }
['gcc']
54,004
void CWE400_Resource_Exhaustion__connect_socket_fwrite_68_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98569/CWE400_Resource_Exhaustion__connect_socket_fwrite_68a.c
CWE400_Resource_Exhaustion__connect_socket_fwrite_68_good
void CWE400_Resource_Exhaustion__connect_socket_fwrite_68_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,005
void CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_badSink() { int count = CWE400_Resource_Exhaustion__connect_socket_fwrite_68_badData; { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } }
['/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98569/CWE400_Resource_Exhaustion__connect_socket_fwrite_68b.c
CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_badSink
void CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_badSink(void) { int iVar1; long lVar2; long lVar3; ulong uStack_10; iVar1 = CWE400_Resource_Exhaustion__connect_socket_fwrite_68_badData; lVar2 = func_0x00400db0(&UNK_00401628,&UNK_00401637); if (lVar2 == 0) { func_0x00400dd0(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { lVar3 = func_0x00400df0(&UNK_00401640,1,0x32,lVar2); if (lVar3 != 0x32) { func_0x00400dd0(1); } } if (lVar2 != 0) { func_0x00400ce0(lVar2); } return; }
['gcc']
54,006
void CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_goodG2BSink() { int count = CWE400_Resource_Exhaustion__connect_socket_fwrite_68_goodG2BData; { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_bad.txt"; pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } /* POTENTIAL FLAW: For loop using count as the loop variant and no validation * This can cause a file to become very large */ for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) { exit(1); } } if (pFile) { fclose(pFile); } } }
['/* POTENTIAL FLAW: For loop using count as the loop variant and no validation\r\n * This can cause a file to become very large */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98569/CWE400_Resource_Exhaustion__connect_socket_fwrite_68b.c
CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_goodG2BSink(void) { int iVar1; long lVar2; long lVar3; ulong uStack_10; iVar1 = CWE400_Resource_Exhaustion__connect_socket_fwrite_68_goodG2BData; lVar2 = func_0x00400db0(&UNK_00401728,&UNK_00401737); if (lVar2 == 0) { func_0x00400dd0(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { lVar3 = func_0x00400df0(&UNK_00401740,1,0x32,lVar2); if (lVar3 != 0x32) { func_0x00400dd0(1); } } if (lVar2 != 0) { func_0x00400ce0(lVar2); } return; }
['gcc']
54,007
void CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_goodB2GSink() { int count = CWE400_Resource_Exhaustion__connect_socket_fwrite_68_goodB2GData; { size_t i = 0; FILE *pFile = NULL; const char *filename = "output_good.txt"; /* FIX: Validate count before using it as the for loop variant to write to a file */ if (count > 0 && count <= 20) { pFile = fopen(filename, "w+"); if (pFile == NULL) { exit(1); } for (i = 0; i < (size_t)count; i++) { if (strlen(SENTENCE) != fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), pFile)) exit(1); } if (pFile) { fclose(pFile); } } } }
['/* FIX: Validate count before using it as the for loop variant to write to a file */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98569/CWE400_Resource_Exhaustion__connect_socket_fwrite_68b.c
CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_goodB2GSink
void CWE400_Resource_Exhaustion__connect_socket_fwrite_68b_goodB2GSink(void) { int iVar1; long lVar2; long lVar3; ulong uStack_10; iVar1 = CWE400_Resource_Exhaustion__connect_socket_fwrite_68_goodB2GData; if ((0 < CWE400_Resource_Exhaustion__connect_socket_fwrite_68_goodB2GData) && (CWE400_Resource_Exhaustion__connect_socket_fwrite_68_goodB2GData < 0x15)) { lVar2 = func_0x00400db0(&UNK_00401773,&UNK_00401737); if (lVar2 == 0) { func_0x00400dd0(1); } for (uStack_10 = 0; uStack_10 < (ulong)(long)iVar1; uStack_10 = uStack_10 + 1) { lVar3 = func_0x00400df0(&UNK_00401740,1,0x32,lVar2); if (lVar3 != 0x32) { func_0x00400dd0(1); } } if (lVar2 != 0) { func_0x00400ce0(lVar2); } } return; }
['gcc']
54,008
void CWE400_Resource_Exhaustion__connect_socket_sleep_01_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98577/CWE400_Resource_Exhaustion__connect_socket_sleep_01.c
CWE400_Resource_Exhaustion__connect_socket_sleep_01_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_01_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_00401494); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } func_0x00400d30(uStack_c); printLine(&UNK_0040149e); return; }
['gcc']
54,009
void CWE400_Resource_Exhaustion__connect_socket_sleep_01_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98577/CWE400_Resource_Exhaustion__connect_socket_sleep_01.c
CWE400_Resource_Exhaustion__connect_socket_sleep_01_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_01_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,010
void CWE400_Resource_Exhaustion__connect_socket_sleep_02_bad() { int count; /* Initialize count */ count = -1; if(1) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(1) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98578/CWE400_Resource_Exhaustion__connect_socket_sleep_02.c
CWE400_Resource_Exhaustion__connect_socket_sleep_02_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_02_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_00401494); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } func_0x00400d30(uStack_c); printLine(&UNK_0040149e); return; }
['gcc']
54,011
void CWE400_Resource_Exhaustion__connect_socket_sleep_02_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98578/CWE400_Resource_Exhaustion__connect_socket_sleep_02.c
CWE400_Resource_Exhaustion__connect_socket_sleep_02_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_02_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,012
void CWE400_Resource_Exhaustion__connect_socket_sleep_03_bad() { int count; /* Initialize count */ count = -1; if(5==5) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(5==5) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98579/CWE400_Resource_Exhaustion__connect_socket_sleep_03.c
CWE400_Resource_Exhaustion__connect_socket_sleep_03_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_03_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_00401494); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } func_0x00400d30(uStack_c); printLine(&UNK_0040149e); return; }
['gcc']
54,013
void CWE400_Resource_Exhaustion__connect_socket_sleep_03_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98579/CWE400_Resource_Exhaustion__connect_socket_sleep_03.c
CWE400_Resource_Exhaustion__connect_socket_sleep_03_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_03_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,014
void CWE400_Resource_Exhaustion__connect_socket_sleep_04_bad() { int count; /* Initialize count */ count = -1; if(STATIC_CONST_TRUE) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(STATIC_CONST_TRUE) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98580/CWE400_Resource_Exhaustion__connect_socket_sleep_04.c
CWE400_Resource_Exhaustion__connect_socket_sleep_04_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_04_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014bc); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } func_0x00400d30(uStack_c); printLine(&UNK_004014c6); return; }
['gcc']
54,015
void CWE400_Resource_Exhaustion__connect_socket_sleep_04_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98580/CWE400_Resource_Exhaustion__connect_socket_sleep_04.c
CWE400_Resource_Exhaustion__connect_socket_sleep_04_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_04_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,016
void CWE400_Resource_Exhaustion__connect_socket_sleep_05_bad() { int count; /* Initialize count */ count = -1; if(staticTrue) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(staticTrue) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98581/CWE400_Resource_Exhaustion__connect_socket_sleep_05.c
CWE400_Resource_Exhaustion__connect_socket_sleep_05_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_05_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; if (staticTrue != 0) { iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014b4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1)) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } } if (staticTrue != 0) { func_0x00400d30(uStack_c); printLine(&UNK_004014be); } return; }
['gcc']
54,017
void CWE400_Resource_Exhaustion__connect_socket_sleep_05_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98581/CWE400_Resource_Exhaustion__connect_socket_sleep_05.c
CWE400_Resource_Exhaustion__connect_socket_sleep_05_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_05_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,018
void CWE400_Resource_Exhaustion__connect_socket_sleep_06_bad() { int count; /* Initialize count */ count = -1; if(STATIC_CONST_FIVE==5) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(STATIC_CONST_FIVE==5) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98582/CWE400_Resource_Exhaustion__connect_socket_sleep_06.c
CWE400_Resource_Exhaustion__connect_socket_sleep_06_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_06_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014b8); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } func_0x00400d30(uStack_c); printLine(&UNK_004014c2); return; }
['gcc']
54,019
void CWE400_Resource_Exhaustion__connect_socket_sleep_06_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98582/CWE400_Resource_Exhaustion__connect_socket_sleep_06.c
CWE400_Resource_Exhaustion__connect_socket_sleep_06_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_06_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,020
void CWE400_Resource_Exhaustion__connect_socket_sleep_07_bad() { int count; /* Initialize count */ count = -1; if(staticFive==5) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(staticFive==5) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98583/CWE400_Resource_Exhaustion__connect_socket_sleep_07.c
CWE400_Resource_Exhaustion__connect_socket_sleep_07_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_07_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; if (staticFive == 5) { iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014b4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1)) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } } if (staticFive == 5) { func_0x00400d30(uStack_c); printLine(&UNK_004014be); } return; }
['gcc']
54,021
void CWE400_Resource_Exhaustion__connect_socket_sleep_07_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98583/CWE400_Resource_Exhaustion__connect_socket_sleep_07.c
CWE400_Resource_Exhaustion__connect_socket_sleep_07_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_07_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,022
void CWE400_Resource_Exhaustion__connect_socket_sleep_08_bad() { int count; /* Initialize count */ count = -1; if(staticReturnsTrue()) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(staticReturnsTrue()) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98584/CWE400_Resource_Exhaustion__connect_socket_sleep_08.c
CWE400_Resource_Exhaustion__connect_socket_sleep_08_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_08_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iVar1 = staticReturnsTrue(); if (iVar1 != 0) { iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014d4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1)) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } } iVar1 = staticReturnsTrue(); if (iVar1 != 0) { func_0x00400d30(uStack_c); printLine(&UNK_004014de); } return; }
['gcc']
54,023
void CWE400_Resource_Exhaustion__connect_socket_sleep_08_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98584/CWE400_Resource_Exhaustion__connect_socket_sleep_08.c
CWE400_Resource_Exhaustion__connect_socket_sleep_08_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_08_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,024
void CWE400_Resource_Exhaustion__connect_socket_sleep_09_bad() { int count; /* Initialize count */ count = -1; if(GLOBAL_CONST_TRUE) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(GLOBAL_CONST_TRUE) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98585/CWE400_Resource_Exhaustion__connect_socket_sleep_09.c
CWE400_Resource_Exhaustion__connect_socket_sleep_09_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_09_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; if (GLOBAL_CONST_TRUE != 0) { iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014b4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1)) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } } if (GLOBAL_CONST_TRUE != 0) { func_0x00400d30(uStack_c); printLine(&UNK_004014be); } return; }
['gcc']
54,025
void CWE400_Resource_Exhaustion__connect_socket_sleep_09_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98585/CWE400_Resource_Exhaustion__connect_socket_sleep_09.c
CWE400_Resource_Exhaustion__connect_socket_sleep_09_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_09_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,026
void CWE400_Resource_Exhaustion__connect_socket_sleep_10_bad() { int count; /* Initialize count */ count = -1; if(globalTrue) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(globalTrue) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98586/CWE400_Resource_Exhaustion__connect_socket_sleep_10.c
CWE400_Resource_Exhaustion__connect_socket_sleep_10_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_10_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; if (globalTrue != 0) { iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014b4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1)) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } } if (globalTrue != 0) { func_0x00400d30(uStack_c); printLine(&UNK_004014be); } return; }
['gcc']
54,027
void CWE400_Resource_Exhaustion__connect_socket_sleep_10_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98586/CWE400_Resource_Exhaustion__connect_socket_sleep_10.c
CWE400_Resource_Exhaustion__connect_socket_sleep_10_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_10_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,028
void CWE400_Resource_Exhaustion__connect_socket_sleep_11_bad() { int count; /* Initialize count */ count = -1; if(globalReturnsTrue()) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(globalReturnsTrue()) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98587/CWE400_Resource_Exhaustion__connect_socket_sleep_11.c
CWE400_Resource_Exhaustion__connect_socket_sleep_11_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_11_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iVar1 = globalReturnsTrue(); if (iVar1 != 0) { iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014b4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1)) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } } iVar1 = globalReturnsTrue(); if (iVar1 != 0) { func_0x00400d30(uStack_c); printLine(&UNK_004014be); } return; }
['gcc']
54,029
void CWE400_Resource_Exhaustion__connect_socket_sleep_11_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98587/CWE400_Resource_Exhaustion__connect_socket_sleep_11.c
CWE400_Resource_Exhaustion__connect_socket_sleep_11_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_11_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,030
void CWE400_Resource_Exhaustion__connect_socket_sleep_12_bad() { int count; /* Initialize count */ count = -1; if(globalReturnsTrueOrFalse()) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } else { /* FIX: Use a relatively small number */ count = 20; } if(globalReturnsTrueOrFalse()) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } else { /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* FIX: Use a relatively small number */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */', '/* FIX: Validate count before using it as a parameter in the sleep function */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98588/CWE400_Resource_Exhaustion__connect_socket_sleep_12.c
CWE400_Resource_Exhaustion__connect_socket_sleep_12_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_12_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; int iStack_c; iStack_c = -1; iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { iStack_c = 0x14; } else { iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014f4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1)) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; iStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } } iVar1 = globalReturnsTrueOrFalse(); if (iVar1 == 0) { if ((iStack_c < 1) || (2000 < iStack_c)) { printLine(&UNK_00401529); } else { func_0x00400d30(iStack_c); printLine(&UNK_0040151b); } } else { func_0x00400d30(iStack_c); printLine(&UNK_004014fe); } return; }
['gcc']
54,031
void CWE400_Resource_Exhaustion__connect_socket_sleep_12_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98588/CWE400_Resource_Exhaustion__connect_socket_sleep_12.c
CWE400_Resource_Exhaustion__connect_socket_sleep_12_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_12_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,032
void CWE400_Resource_Exhaustion__connect_socket_sleep_13_bad() { int count; /* Initialize count */ count = -1; if(GLOBAL_CONST_FIVE==5) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(GLOBAL_CONST_FIVE==5) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98589/CWE400_Resource_Exhaustion__connect_socket_sleep_13.c
CWE400_Resource_Exhaustion__connect_socket_sleep_13_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_13_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; if (GLOBAL_CONST_FIVE == 5) { iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014b4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1)) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } } if (GLOBAL_CONST_FIVE == 5) { func_0x00400d30(uStack_c); printLine(&UNK_004014be); } return; }
['gcc']
54,033
void CWE400_Resource_Exhaustion__connect_socket_sleep_13_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98589/CWE400_Resource_Exhaustion__connect_socket_sleep_13.c
CWE400_Resource_Exhaustion__connect_socket_sleep_13_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_13_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,034
void CWE400_Resource_Exhaustion__connect_socket_sleep_14_bad() { int count; /* Initialize count */ count = -1; if(globalFive==5) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } if(globalFive==5) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98590/CWE400_Resource_Exhaustion__connect_socket_sleep_14.c
CWE400_Resource_Exhaustion__connect_socket_sleep_14_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_14_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; if (globalFive == 5) { iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014b4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1)) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } } if (globalFive == 5) { func_0x00400d30(uStack_c); printLine(&UNK_004014be); } return; }
['gcc']
54,035
void CWE400_Resource_Exhaustion__connect_socket_sleep_14_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98590/CWE400_Resource_Exhaustion__connect_socket_sleep_14.c
CWE400_Resource_Exhaustion__connect_socket_sleep_14_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_14_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,036
void CWE400_Resource_Exhaustion__connect_socket_sleep_15_bad() { int count; /* Initialize count */ count = -1; switch(6) { case 6: { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } switch(7) { case 7: /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); break; } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98591/CWE400_Resource_Exhaustion__connect_socket_sleep_15.c
CWE400_Resource_Exhaustion__connect_socket_sleep_15_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_15_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_00401494); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } func_0x00400d30(uStack_c); printLine(&UNK_0040149e); return; }
['gcc']
54,037
void CWE400_Resource_Exhaustion__connect_socket_sleep_15_good() { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98591/CWE400_Resource_Exhaustion__connect_socket_sleep_15.c
CWE400_Resource_Exhaustion__connect_socket_sleep_15_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_15_good(void) { goodB2G1(); goodB2G2(); goodG2B1(); goodG2B2(); return; }
['gcc']
54,038
void CWE400_Resource_Exhaustion__connect_socket_sleep_16_bad() { int count; /* Initialize count */ count = -1; while(1) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } break; } while(1) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); break; } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98592/CWE400_Resource_Exhaustion__connect_socket_sleep_16.c
CWE400_Resource_Exhaustion__connect_socket_sleep_16_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_16_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_00401494); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } func_0x00400d30(uStack_c); printLine(&UNK_0040149e); return; }
['gcc']
54,039
void CWE400_Resource_Exhaustion__connect_socket_sleep_16_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98592/CWE400_Resource_Exhaustion__connect_socket_sleep_16.c
CWE400_Resource_Exhaustion__connect_socket_sleep_16_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_16_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,040
void CWE400_Resource_Exhaustion__connect_socket_sleep_17_bad() { int i,j; int count; /* Initialize count */ count = -1; for(i = 0; i < 1; i++) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } for(j = 0; j < 1; j++) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98593/CWE400_Resource_Exhaustion__connect_socket_sleep_17.c
CWE400_Resource_Exhaustion__connect_socket_sleep_17_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_17_bad(void) { int iVar1; undefined auStack_46 [14]; undefined2 uStack_38; undefined2 uStack_36; undefined4 uStack_34; int iStack_1c; int iStack_18; undefined4 uStack_14; int iStack_10; int iStack_c; uStack_14 = 0xffffffff; for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) { iStack_18 = 0xffffffff; iStack_18 = func_0x00400d40(2,1,6); if (iStack_18 != -1) { func_0x00400c50(&uStack_38,0,0x10); uStack_38 = 2; uStack_34 = func_0x00400ca0(&UNK_004014c4); uStack_36 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_18,&uStack_38,0x10); if (((iVar1 != -1) && (iStack_1c = func_0x00400c00(iStack_18,auStack_46,0xd,0), iStack_1c != -1)) && (iStack_1c != 0)) { auStack_46[iStack_1c] = 0; uStack_14 = func_0x00400cf0(auStack_46); } } if (iStack_18 != -1) { func_0x00400c60(iStack_18); } } for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) { func_0x00400d30(uStack_14); printLine(&UNK_004014ce); } return; }
['gcc']
54,041
void CWE400_Resource_Exhaustion__connect_socket_sleep_17_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98593/CWE400_Resource_Exhaustion__connect_socket_sleep_17.c
CWE400_Resource_Exhaustion__connect_socket_sleep_17_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_17_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,042
void CWE400_Resource_Exhaustion__connect_socket_sleep_18_bad() { int count; /* Initialize count */ count = -1; goto source; source: { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } goto sink; sink: /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98594/CWE400_Resource_Exhaustion__connect_socket_sleep_18.c
CWE400_Resource_Exhaustion__connect_socket_sleep_18_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_18_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_00401494); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } func_0x00400d30(uStack_c); printLine(&UNK_0040149e); return; }
['gcc']
54,043
void CWE400_Resource_Exhaustion__connect_socket_sleep_18_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98594/CWE400_Resource_Exhaustion__connect_socket_sleep_18.c
CWE400_Resource_Exhaustion__connect_socket_sleep_18_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_18_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,044
void CWE400_Resource_Exhaustion__connect_socket_sleep_21_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } badStatic = 1; /* true */ badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* true */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98595/CWE400_Resource_Exhaustion__connect_socket_sleep_21.c
CWE400_Resource_Exhaustion__connect_socket_sleep_21_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_21_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014e1); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } badStatic = 1; badSink(uStack_c); return; }
['gcc']
54,045
void CWE400_Resource_Exhaustion__connect_socket_sleep_21_good() { goodB2G1(); goodB2G2(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98595/CWE400_Resource_Exhaustion__connect_socket_sleep_21.c
CWE400_Resource_Exhaustion__connect_socket_sleep_21_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_21_good(void) { goodB2G1(); goodB2G2(); goodG2B(); return; }
['gcc']
54,046
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE400_Resource_Exhaustion__connect_socket_sleep_22_badGlobal = 1; /* true */ CWE400_Resource_Exhaustion__connect_socket_sleep_22_badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* true */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98596/CWE400_Resource_Exhaustion__connect_socket_sleep_22a.c
CWE400_Resource_Exhaustion__connect_socket_sleep_22_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014c4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } CWE400_Resource_Exhaustion__connect_socket_sleep_22_badGlobal = 1; CWE400_Resource_Exhaustion__connect_socket_sleep_22_badSink(uStack_c); return; }
['gcc']
54,047
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_good() { goodB2G1(); goodB2G2(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98596/CWE400_Resource_Exhaustion__connect_socket_sleep_22a.c
CWE400_Resource_Exhaustion__connect_socket_sleep_22_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_good(void) { goodB2G1(); goodB2G2(); goodG2B(); return; }
['gcc']
54,048
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_badSink(int count) { if(CWE400_Resource_Exhaustion__connect_socket_sleep_22_badGlobal) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98596/CWE400_Resource_Exhaustion__connect_socket_sleep_22b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_22_badSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_badSink(undefined4 param_1) { if (CWE400_Resource_Exhaustion__connect_socket_sleep_22_badGlobal != 0) { func_0x00400d30(param_1); printLine(&UNK_004014c4); } return; }
['gcc']
54,049
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodB2G1Sink(int count) { if(CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodB2G1Global) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } } }
['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Validate count before using it as a parameter in the sleep function */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98596/CWE400_Resource_Exhaustion__connect_socket_sleep_22b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodB2G1Sink
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodB2G1Sink(int param_1) { if (CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodB2G1Global == 0) { if ((param_1 < 1) || (2000 < param_1)) { printLine(&UNK_004016c7); } else { func_0x00400d30(param_1); printLine(&UNK_004016b9); } } else { printLine(&UNK_004016a4); } return; }
['gcc']
54,050
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodB2G2Sink(int count) { if(CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodB2G2Global) { /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } } }
['/* FIX: Validate count before using it as a parameter in the sleep function */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98596/CWE400_Resource_Exhaustion__connect_socket_sleep_22b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodB2G2Sink
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodB2G2Sink(int param_1) { if (CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodB2G2Global != 0) { if ((param_1 < 1) || (2000 < param_1)) { printLine(&UNK_004016c7); } else { func_0x00400d30(param_1); printLine(&UNK_004016b9); } } return; }
['gcc']
54,051
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodG2BSink(int count) { if(CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodG2BGlobal) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98596/CWE400_Resource_Exhaustion__connect_socket_sleep_22b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodG2BSink(undefined4 param_1) { if (CWE400_Resource_Exhaustion__connect_socket_sleep_22_goodG2BGlobal != 0) { func_0x00400d30(param_1); printLine(&UNK_004016db); } return; }
['gcc']
54,052
void CWE400_Resource_Exhaustion__connect_socket_sleep_31_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } { int countCopy = count; int count = countCopy; /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98597/CWE400_Resource_Exhaustion__connect_socket_sleep_31.c
CWE400_Resource_Exhaustion__connect_socket_sleep_31_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_31_bad(void) { int iVar1; undefined auStack_46 [14]; undefined2 uStack_38; undefined2 uStack_36; undefined4 uStack_34; undefined4 uStack_1c; undefined4 uStack_18; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_38,0,0x10); uStack_38 = 2; uStack_34 = func_0x00400ca0(&UNK_004014a4); uStack_36 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_38,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_46,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_46[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_46); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } uStack_18 = uStack_c; uStack_1c = uStack_c; func_0x00400d30(uStack_c); printLine(&UNK_004014ae); return; }
['gcc']
54,053
void CWE400_Resource_Exhaustion__connect_socket_sleep_31_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98597/CWE400_Resource_Exhaustion__connect_socket_sleep_31.c
CWE400_Resource_Exhaustion__connect_socket_sleep_31_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_31_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,054
void CWE400_Resource_Exhaustion__connect_socket_sleep_32_bad() { int count; int *countPtr1 = &count; int *countPtr2 = &count; /* Initialize count */ count = -1; { int count = *countPtr1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } *countPtr1 = count; } { int count = *countPtr2; /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98598/CWE400_Resource_Exhaustion__connect_socket_sleep_32.c
CWE400_Resource_Exhaustion__connect_socket_sleep_32_bad
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void CWE400_Resource_Exhaustion__connect_socket_sleep_32_bad(void) { int iVar1; undefined auStack_56 [14]; undefined2 uStack_48; undefined2 uStack_46; undefined4 uStack_44; undefined4 uStack_30; undefined4 uStack_2c; int iStack_28; int iStack_24; undefined4 *puStack_20; undefined4 *puStack_18; undefined4 uStack_c; puStack_18 = &uStack_30; puStack_20 = &uStack_30; uStack_30 = 0xffffffff; uStack_c = 0xffffffff; iStack_24 = 0xffffffff; iStack_24 = func_0x00400d40(2,1,6); if (iStack_24 != -1) { func_0x00400c50(&uStack_48,0,0x10); uStack_48 = 2; uStack_44 = func_0x00400ca0(&UNK_004014c4); uStack_46 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_24,&uStack_48,0x10); if (((iVar1 != -1) && (iStack_28 = func_0x00400c00(iStack_24,auStack_56,0xd,0), iStack_28 != -1) ) && (iStack_28 != 0)) { auStack_56[iStack_28] = 0; uStack_c = func_0x00400cf0(auStack_56); } } if (iStack_24 != -1) { func_0x00400c60(iStack_24); } *puStack_18 = uStack_c; uStack_2c = *puStack_20; func_0x00400d30(uStack_2c); printLine(&UNK_004014ce); return; }
['gcc']
54,055
void CWE400_Resource_Exhaustion__connect_socket_sleep_32_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98598/CWE400_Resource_Exhaustion__connect_socket_sleep_32.c
CWE400_Resource_Exhaustion__connect_socket_sleep_32_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_32_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,056
void CWE400_Resource_Exhaustion__connect_socket_sleep_34_bad() { int count; CWE400_Resource_Exhaustion__connect_socket_sleep_34_unionType myUnion; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } myUnion.unionFirst = count; { int count = myUnion.unionSecond; /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); } }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98600/CWE400_Resource_Exhaustion__connect_socket_sleep_34.c
CWE400_Resource_Exhaustion__connect_socket_sleep_34_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_34_bad(void) { int iVar1; undefined auStack_46 [14]; undefined2 uStack_38; undefined2 uStack_36; undefined4 uStack_34; undefined4 uStack_1c; undefined4 uStack_18; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_38,0,0x10); uStack_38 = 2; uStack_34 = func_0x00400ca0(&UNK_004014a4); uStack_36 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_38,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_46,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_46[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_46); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } uStack_1c = uStack_c; uStack_18 = uStack_c; func_0x00400d30(uStack_c); printLine(&UNK_004014ae); return; }
['gcc']
54,057
void CWE400_Resource_Exhaustion__connect_socket_sleep_34_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98600/CWE400_Resource_Exhaustion__connect_socket_sleep_34.c
CWE400_Resource_Exhaustion__connect_socket_sleep_34_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_34_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,058
void CWE400_Resource_Exhaustion__connect_socket_sleep_41_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98601/CWE400_Resource_Exhaustion__connect_socket_sleep_41.c
CWE400_Resource_Exhaustion__connect_socket_sleep_41_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_41_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014d1); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } badSink(uStack_c); return; }
['gcc']
54,059
void CWE400_Resource_Exhaustion__connect_socket_sleep_41_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98601/CWE400_Resource_Exhaustion__connect_socket_sleep_41.c
CWE400_Resource_Exhaustion__connect_socket_sleep_41_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_41_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,060
void CWE400_Resource_Exhaustion__connect_socket_sleep_42_bad() { int count; /* Initialize count */ count = -1; count = badSource(count); /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* Initialize count */', '/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98602/CWE400_Resource_Exhaustion__connect_socket_sleep_42.c
CWE400_Resource_Exhaustion__connect_socket_sleep_42_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_42_bad(void) { undefined4 uVar1; uVar1 = badSource(0xffffffff); func_0x00400d30(uVar1); printLine(&UNK_004014be); return; }
['gcc']
54,061
void CWE400_Resource_Exhaustion__connect_socket_sleep_42_good() { goodB2G(); goodG2B(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98602/CWE400_Resource_Exhaustion__connect_socket_sleep_42.c
CWE400_Resource_Exhaustion__connect_socket_sleep_42_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_42_good(void) { goodB2G(); goodG2B(); return; }
['gcc']
54,062
void CWE400_Resource_Exhaustion__connect_socket_sleep_44_bad() { int count; /* define a function pointer */ void (*funcPtr) (int) = badSink; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } /* use the function pointer */ funcPtr(count); }
['/* define a function pointer */', '/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */', '/* use the function pointer */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98604/CWE400_Resource_Exhaustion__connect_socket_sleep_44.c
CWE400_Resource_Exhaustion__connect_socket_sleep_44_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_44_bad(void) { int iVar1; undefined auStack_46 [14]; undefined2 uStack_38; undefined2 uStack_36; undefined4 uStack_34; int iStack_20; int iStack_1c; code *pcStack_18; undefined4 uStack_c; pcStack_18 = badSink; uStack_c = 0xffffffff; iStack_1c = 0xffffffff; iStack_1c = func_0x00400d40(2,1,6); if (iStack_1c != -1) { func_0x00400c50(&uStack_38,0,0x10); uStack_38 = 2; uStack_34 = func_0x00400ca0(&UNK_004014d1); uStack_36 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_1c,&uStack_38,0x10); if (((iVar1 != -1) && (iStack_20 = func_0x00400c00(iStack_1c,auStack_46,0xd,0), iStack_20 != -1) ) && (iStack_20 != 0)) { auStack_46[iStack_20] = 0; uStack_c = func_0x00400cf0(auStack_46); } } if (iStack_1c != -1) { func_0x00400c60(iStack_1c); } (*pcStack_18)(uStack_c); return; }
['gcc']
54,063
void CWE400_Resource_Exhaustion__connect_socket_sleep_44_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98604/CWE400_Resource_Exhaustion__connect_socket_sleep_44.c
CWE400_Resource_Exhaustion__connect_socket_sleep_44_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_44_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,064
void CWE400_Resource_Exhaustion__connect_socket_sleep_45_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE400_Resource_Exhaustion__connect_socket_sleep_45_badData = count; badSink(); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98605/CWE400_Resource_Exhaustion__connect_socket_sleep_45.c
CWE400_Resource_Exhaustion__connect_socket_sleep_45_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_45_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014e1); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } CWE400_Resource_Exhaustion__connect_socket_sleep_45_badData = uStack_c; badSink(); return; }
['gcc']
54,065
void CWE400_Resource_Exhaustion__connect_socket_sleep_45_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98605/CWE400_Resource_Exhaustion__connect_socket_sleep_45.c
CWE400_Resource_Exhaustion__connect_socket_sleep_45_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_45_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,066
void CWE400_Resource_Exhaustion__connect_socket_sleep_51_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE400_Resource_Exhaustion__connect_socket_sleep_51b_badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98606/CWE400_Resource_Exhaustion__connect_socket_sleep_51a.c
CWE400_Resource_Exhaustion__connect_socket_sleep_51_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_51_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014b4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } CWE400_Resource_Exhaustion__connect_socket_sleep_51b_badSink(uStack_c); return; }
['gcc']
54,067
void CWE400_Resource_Exhaustion__connect_socket_sleep_51_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98606/CWE400_Resource_Exhaustion__connect_socket_sleep_51a.c
CWE400_Resource_Exhaustion__connect_socket_sleep_51_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_51_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,068
void CWE400_Resource_Exhaustion__connect_socket_sleep_51b_badSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98606/CWE400_Resource_Exhaustion__connect_socket_sleep_51b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_51b_badSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_51b_badSink(undefined4 param_1) { func_0x00400d30(param_1); printLine(&UNK_004014b4); return; }
['gcc']
54,069
void CWE400_Resource_Exhaustion__connect_socket_sleep_51b_goodG2BSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98606/CWE400_Resource_Exhaustion__connect_socket_sleep_51b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_51b_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_51b_goodG2BSink(undefined4 param_1) { func_0x00400d30(param_1); printLine(&UNK_00401524); return; }
['gcc']
54,070
void CWE400_Resource_Exhaustion__connect_socket_sleep_51b_goodB2GSink(int count) { /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } }
['/* FIX: Validate count before using it as a parameter in the sleep function */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98606/CWE400_Resource_Exhaustion__connect_socket_sleep_51b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_51b_goodB2GSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_51b_goodB2GSink(int param_1) { if ((param_1 < 1) || (2000 < param_1)) { printLine(&UNK_0040154f); } else { func_0x00400d30(param_1); printLine(&UNK_00401541); } return; }
['gcc']
54,071
void CWE400_Resource_Exhaustion__connect_socket_sleep_52_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE400_Resource_Exhaustion__connect_socket_sleep_52b_badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98607/CWE400_Resource_Exhaustion__connect_socket_sleep_52a.c
CWE400_Resource_Exhaustion__connect_socket_sleep_52_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_52_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014c4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } CWE400_Resource_Exhaustion__connect_socket_sleep_52b_badSink(uStack_c); return; }
['gcc']
54,072
void CWE400_Resource_Exhaustion__connect_socket_sleep_52_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98607/CWE400_Resource_Exhaustion__connect_socket_sleep_52a.c
CWE400_Resource_Exhaustion__connect_socket_sleep_52_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_52_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,073
void CWE400_Resource_Exhaustion__connect_socket_sleep_52b_badSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_52c_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98607/CWE400_Resource_Exhaustion__connect_socket_sleep_52b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_52b_badSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_52b_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_52c_badSink(param_1); return; }
['gcc']
54,074
void CWE400_Resource_Exhaustion__connect_socket_sleep_52b_goodG2BSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_52c_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98607/CWE400_Resource_Exhaustion__connect_socket_sleep_52b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_52b_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_52b_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_52c_goodG2BSink(param_1); return; }
['gcc']
54,075
void CWE400_Resource_Exhaustion__connect_socket_sleep_52b_goodB2GSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_52c_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98607/CWE400_Resource_Exhaustion__connect_socket_sleep_52b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_52b_goodB2GSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_52b_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_52c_goodB2GSink(param_1); return; }
['gcc']
54,076
void CWE400_Resource_Exhaustion__connect_socket_sleep_52c_badSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98607/CWE400_Resource_Exhaustion__connect_socket_sleep_52c.c
CWE400_Resource_Exhaustion__connect_socket_sleep_52c_badSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_52c_badSink(undefined4 param_1) { func_0x00400d30(param_1); printLine(&UNK_004014c4); return; }
['gcc']
54,077
void CWE400_Resource_Exhaustion__connect_socket_sleep_52c_goodG2BSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98607/CWE400_Resource_Exhaustion__connect_socket_sleep_52c.c
CWE400_Resource_Exhaustion__connect_socket_sleep_52c_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_52c_goodG2BSink(undefined4 param_1) { func_0x00400d30(param_1); printLine(&UNK_00401554); return; }
['gcc']
54,078
void CWE400_Resource_Exhaustion__connect_socket_sleep_52c_goodB2GSink(int count) { /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } }
['/* FIX: Validate count before using it as a parameter in the sleep function */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98607/CWE400_Resource_Exhaustion__connect_socket_sleep_52c.c
CWE400_Resource_Exhaustion__connect_socket_sleep_52c_goodB2GSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_52c_goodB2GSink(int param_1) { if ((param_1 < 1) || (2000 < param_1)) { printLine(&UNK_0040157f); } else { func_0x00400d30(param_1); printLine(&UNK_00401571); } return; }
['gcc']
54,079
void CWE400_Resource_Exhaustion__connect_socket_sleep_53_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE400_Resource_Exhaustion__connect_socket_sleep_53b_badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53a.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_53_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014e4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } CWE400_Resource_Exhaustion__connect_socket_sleep_53b_badSink(uStack_c); return; }
['gcc']
54,080
void CWE400_Resource_Exhaustion__connect_socket_sleep_53_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53a.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_53_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,081
void CWE400_Resource_Exhaustion__connect_socket_sleep_53b_badSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_53c_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53b_badSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_53b_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_53c_badSink(param_1); return; }
['gcc']
54,082
void CWE400_Resource_Exhaustion__connect_socket_sleep_53b_goodG2BSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_53c_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53b_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_53b_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_53c_goodG2BSink(param_1); return; }
['gcc']
54,083
void CWE400_Resource_Exhaustion__connect_socket_sleep_53b_goodB2GSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_53c_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53b_goodB2GSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_53b_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_53c_goodB2GSink(param_1); return; }
['gcc']
54,084
void CWE400_Resource_Exhaustion__connect_socket_sleep_53c_badSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_53d_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53c.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53c_badSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_53c_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_53d_badSink(param_1); return; }
['gcc']
54,085
void CWE400_Resource_Exhaustion__connect_socket_sleep_53c_goodG2BSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_53d_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53c.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53c_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_53c_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_53d_goodG2BSink(param_1); return; }
['gcc']
54,086
void CWE400_Resource_Exhaustion__connect_socket_sleep_53c_goodB2GSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_53d_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53c.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53c_goodB2GSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_53c_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_53d_goodB2GSink(param_1); return; }
['gcc']
54,087
void CWE400_Resource_Exhaustion__connect_socket_sleep_53d_badSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53d.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53d_badSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_53d_badSink(undefined4 param_1) { func_0x00400d30(param_1); printLine(&UNK_004014e4); return; }
['gcc']
54,088
void CWE400_Resource_Exhaustion__connect_socket_sleep_53d_goodG2BSink(int count) { /* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */ SLEEP(count); printLine("Sleep time possibly too long"); }
['/* POTENTIAL FLAW: Sleep function using count as the parameter with no validation */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53d.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53d_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_53d_goodG2BSink(undefined4 param_1) { func_0x00400d30(param_1); printLine(&UNK_00401584); return; }
['gcc']
54,089
void CWE400_Resource_Exhaustion__connect_socket_sleep_53d_goodB2GSink(int count) { /* FIX: Validate count before using it as a parameter in the sleep function */ if (count > 0 && count <= 2000) { SLEEP(count); printLine("Sleep time OK"); } else { printLine("Sleep time too long"); } }
['/* FIX: Validate count before using it as a parameter in the sleep function */']
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98608/CWE400_Resource_Exhaustion__connect_socket_sleep_53d.c
CWE400_Resource_Exhaustion__connect_socket_sleep_53d_goodB2GSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_53d_goodB2GSink(int param_1) { if ((param_1 < 1) || (2000 < param_1)) { printLine(&UNK_004015af); } else { func_0x00400d30(param_1); printLine(&UNK_004015a1); } return; }
['gcc']
54,090
void CWE400_Resource_Exhaustion__connect_socket_sleep_54_bad() { int count; /* Initialize count */ count = -1; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; SOCKET connectSocket = INVALID_SOCKET; char inputBuffer[CHAR_ARRAY_SIZE]; do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read count using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* NUL-terminate the string */ inputBuffer[recvResult] = '\0'; /* Convert to int */ count = atoi(inputBuffer); } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } CWE400_Resource_Exhaustion__connect_socket_sleep_54b_badSink(count); }
['/* Initialize count */', '/* POTENTIAL FLAW: Read count using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* NUL-terminate the string */', '/* Convert to int */']
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98609/CWE400_Resource_Exhaustion__connect_socket_sleep_54a.c
CWE400_Resource_Exhaustion__connect_socket_sleep_54_bad
void CWE400_Resource_Exhaustion__connect_socket_sleep_54_bad(void) { int iVar1; undefined auStack_36 [14]; undefined2 uStack_28; undefined2 uStack_26; undefined4 uStack_24; int iStack_14; int iStack_10; undefined4 uStack_c; uStack_c = 0xffffffff; iStack_10 = 0xffffffff; iStack_10 = func_0x00400d40(2,1,6); if (iStack_10 != -1) { func_0x00400c50(&uStack_28,0,0x10); uStack_28 = 2; uStack_24 = func_0x00400ca0(&UNK_004014f4); uStack_26 = func_0x00400c30(0x6987); iVar1 = func_0x00400d00(iStack_10,&uStack_28,0x10); if (((iVar1 != -1) && (iStack_14 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_14 != -1) ) && (iStack_14 != 0)) { auStack_36[iStack_14] = 0; uStack_c = func_0x00400cf0(auStack_36); } } if (iStack_10 != -1) { func_0x00400c60(iStack_10); } CWE400_Resource_Exhaustion__connect_socket_sleep_54b_badSink(uStack_c); return; }
['gcc']
54,091
void CWE400_Resource_Exhaustion__connect_socket_sleep_54_good() { goodG2B(); goodB2G(); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98609/CWE400_Resource_Exhaustion__connect_socket_sleep_54a.c
CWE400_Resource_Exhaustion__connect_socket_sleep_54_good
void CWE400_Resource_Exhaustion__connect_socket_sleep_54_good(void) { goodG2B(); goodB2G(); return; }
['gcc']
54,092
void CWE400_Resource_Exhaustion__connect_socket_sleep_54b_badSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_54c_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98609/CWE400_Resource_Exhaustion__connect_socket_sleep_54b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_54b_badSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_54b_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_54c_badSink(param_1); return; }
['gcc']
54,093
void CWE400_Resource_Exhaustion__connect_socket_sleep_54b_goodG2BSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_54c_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98609/CWE400_Resource_Exhaustion__connect_socket_sleep_54b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_54b_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_54b_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_54c_goodG2BSink(param_1); return; }
['gcc']
54,094
void CWE400_Resource_Exhaustion__connect_socket_sleep_54b_goodB2GSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_54c_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98609/CWE400_Resource_Exhaustion__connect_socket_sleep_54b.c
CWE400_Resource_Exhaustion__connect_socket_sleep_54b_goodB2GSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_54b_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_54c_goodB2GSink(param_1); return; }
['gcc']
54,095
void CWE400_Resource_Exhaustion__connect_socket_sleep_54c_badSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_54d_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98609/CWE400_Resource_Exhaustion__connect_socket_sleep_54c.c
CWE400_Resource_Exhaustion__connect_socket_sleep_54c_badSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_54c_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_54d_badSink(param_1); return; }
['gcc']
54,096
void CWE400_Resource_Exhaustion__connect_socket_sleep_54c_goodG2BSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_54d_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98609/CWE400_Resource_Exhaustion__connect_socket_sleep_54c.c
CWE400_Resource_Exhaustion__connect_socket_sleep_54c_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_54c_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_54d_goodG2BSink(param_1); return; }
['gcc']
54,097
void CWE400_Resource_Exhaustion__connect_socket_sleep_54c_goodB2GSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_54d_goodB2GSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98609/CWE400_Resource_Exhaustion__connect_socket_sleep_54c.c
CWE400_Resource_Exhaustion__connect_socket_sleep_54c_goodB2GSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_54c_goodB2GSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_54d_goodB2GSink(param_1); return; }
['gcc']
54,098
void CWE400_Resource_Exhaustion__connect_socket_sleep_54d_badSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_54e_badSink(count); }
[]
['CWE400']
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98609/CWE400_Resource_Exhaustion__connect_socket_sleep_54d.c
CWE400_Resource_Exhaustion__connect_socket_sleep_54d_badSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_54d_badSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_54e_badSink(param_1); return; }
['gcc']
54,099
void CWE400_Resource_Exhaustion__connect_socket_sleep_54d_goodG2BSink(int count) { CWE400_Resource_Exhaustion__connect_socket_sleep_54e_goodG2BSink(count); }
[]
null
mvd
/work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/98609/CWE400_Resource_Exhaustion__connect_socket_sleep_54d.c
CWE400_Resource_Exhaustion__connect_socket_sleep_54d_goodG2BSink
void CWE400_Resource_Exhaustion__connect_socket_sleep_54d_goodG2BSink(undefined4 param_1) { CWE400_Resource_Exhaustion__connect_socket_sleep_54e_goodG2BSink(param_1); return; }
['gcc']