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 |
|---|---|---|---|---|---|---|---|---|
45,300 | void CWE190_Integer_Overflow__int_connect_socket_square_14_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83083/CWE190_Integer_Overflow__int_connect_socket_square_14.c | CWE190_Integer_Overflow__int_connect_socket_square_14_good |
void CWE190_Integer_Overflow__int_connect_socket_square_14_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
45,301 | void CWE190_Integer_Overflow__int_connect_socket_square_15_bad()
{
int data;
/* Initialize data */
data = 0;
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 data 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 */
data = 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: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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: if (data*data) > INT_MAX, this will overflow */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83084/CWE190_Integer_Overflow__int_connect_socket_square_15.c | CWE190_Integer_Overflow__int_connect_socket_square_15_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_15_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
iStack_c = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401444);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
iStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
iStack_18 = iStack_c * iStack_c;
printIntLine(iStack_18);
return;
}
| ['gcc'] |
45,302 | void CWE190_Integer_Overflow__int_connect_socket_square_15_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83084/CWE190_Integer_Overflow__int_connect_socket_square_15.c | CWE190_Integer_Overflow__int_connect_socket_square_15_good |
void CWE190_Integer_Overflow__int_connect_socket_square_15_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
45,303 | void CWE190_Integer_Overflow__int_connect_socket_square_16_bad()
{
int data;
/* Initialize data */
data = 0;
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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
break;
}
while(1)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
break;
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83085/CWE190_Integer_Overflow__int_connect_socket_square_16.c | CWE190_Integer_Overflow__int_connect_socket_square_16_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_16_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
iStack_c = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401444);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
iStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
iStack_18 = iStack_c * iStack_c;
printIntLine(iStack_18);
return;
}
| ['gcc'] |
45,304 | void CWE190_Integer_Overflow__int_connect_socket_square_16_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83085/CWE190_Integer_Overflow__int_connect_socket_square_16.c | CWE190_Integer_Overflow__int_connect_socket_square_16_good |
void CWE190_Integer_Overflow__int_connect_socket_square_16_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
45,305 | void CWE190_Integer_Overflow__int_connect_socket_square_17_bad()
{
int i,j;
int data;
/* Initialize data */
data = 0;
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 data 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 */
data = 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: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83086/CWE190_Integer_Overflow__int_connect_socket_square_17.c | CWE190_Integer_Overflow__int_connect_socket_square_17_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_17_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
int iStack_20;
int iStack_1c;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
iStack_14 = 0;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400cf0(2,1,6);
if (iStack_1c != -1) {
func_0x00400c10(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400c60(&UNK_00401474);
uStack_36 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_20 = func_0x00400bc0(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)) &&
(iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
iStack_14 = func_0x00400cb0(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400c20(iStack_1c);
}
}
for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) {
iStack_18 = iStack_14 * iStack_14;
printIntLine(iStack_18);
}
return;
}
| ['gcc'] |
45,306 | void CWE190_Integer_Overflow__int_connect_socket_square_17_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83086/CWE190_Integer_Overflow__int_connect_socket_square_17.c | CWE190_Integer_Overflow__int_connect_socket_square_17_good |
void CWE190_Integer_Overflow__int_connect_socket_square_17_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
45,307 | void CWE190_Integer_Overflow__int_connect_socket_square_18_bad()
{
int data;
/* Initialize data */
data = 0;
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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
goto sink;
sink:
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83087/CWE190_Integer_Overflow__int_connect_socket_square_18.c | CWE190_Integer_Overflow__int_connect_socket_square_18_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_18_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
iStack_c = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401444);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
iStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
iStack_18 = iStack_c * iStack_c;
printIntLine(iStack_18);
return;
}
| ['gcc'] |
45,308 | void CWE190_Integer_Overflow__int_connect_socket_square_18_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83087/CWE190_Integer_Overflow__int_connect_socket_square_18.c | CWE190_Integer_Overflow__int_connect_socket_square_18_good |
void CWE190_Integer_Overflow__int_connect_socket_square_18_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
45,309 | void CWE190_Integer_Overflow__int_connect_socket_square_21_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
badStatic = 1; /* true */
badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83088/CWE190_Integer_Overflow__int_connect_socket_square_21.c | CWE190_Integer_Overflow__int_connect_socket_square_21_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_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 = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401474);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
uStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
badStatic = 1;
badSink(uStack_c);
return;
}
| ['gcc'] |
45,310 | void CWE190_Integer_Overflow__int_connect_socket_square_21_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83088/CWE190_Integer_Overflow__int_connect_socket_square_21.c | CWE190_Integer_Overflow__int_connect_socket_square_21_good |
void CWE190_Integer_Overflow__int_connect_socket_square_21_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
45,311 | void CWE190_Integer_Overflow__int_connect_socket_square_22_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE190_Integer_Overflow__int_connect_socket_square_22_badGlobal = 1; /* true */
CWE190_Integer_Overflow__int_connect_socket_square_22_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83089/CWE190_Integer_Overflow__int_connect_socket_square_22a.c | CWE190_Integer_Overflow__int_connect_socket_square_22_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_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 = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401474);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
uStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
CWE190_Integer_Overflow__int_connect_socket_square_22_badGlobal = 1;
CWE190_Integer_Overflow__int_connect_socket_square_22_badSink(uStack_c);
return;
}
| ['gcc'] |
45,312 | void CWE190_Integer_Overflow__int_connect_socket_square_22_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83089/CWE190_Integer_Overflow__int_connect_socket_square_22a.c | CWE190_Integer_Overflow__int_connect_socket_square_22_good |
void CWE190_Integer_Overflow__int_connect_socket_square_22_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
45,313 | void CWE190_Integer_Overflow__int_connect_socket_square_22_badSink(int data)
{
if(CWE190_Integer_Overflow__int_connect_socket_square_22_badGlobal)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83089/CWE190_Integer_Overflow__int_connect_socket_square_22b.c | CWE190_Integer_Overflow__int_connect_socket_square_22_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_22_badSink(int param_1)
{
if (CWE190_Integer_Overflow__int_connect_socket_square_22_badGlobal != 0) {
printIntLine(param_1 * param_1);
}
return;
}
| ['gcc'] |
45,314 | void CWE190_Integer_Overflow__int_connect_socket_square_22_goodB2G1Sink(int data)
{
if(CWE190_Integer_Overflow__int_connect_socket_square_22_goodB2G1Global)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
}
} | ['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83089/CWE190_Integer_Overflow__int_connect_socket_square_22b.c | CWE190_Integer_Overflow__int_connect_socket_square_22_goodB2G1Sink |
void CWE190_Integer_Overflow__int_connect_socket_square_22_goodB2G1Sink(int param_1)
{
if (CWE190_Integer_Overflow__int_connect_socket_square_22_goodB2G1Global == 0) {
if ((param_1 < -0xb504) || (0xb504 < param_1)) {
printLine(&UNK_00401670);
}
else {
printIntLine(param_1 * param_1);
}
}
else {
printLine(&UNK_00401658);
}
return;
}
| ['gcc'] |
45,315 | void CWE190_Integer_Overflow__int_connect_socket_square_22_goodB2G2Sink(int data)
{
if(CWE190_Integer_Overflow__int_connect_socket_square_22_goodB2G2Global)
{
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
}
} | ['/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83089/CWE190_Integer_Overflow__int_connect_socket_square_22b.c | CWE190_Integer_Overflow__int_connect_socket_square_22_goodB2G2Sink |
void CWE190_Integer_Overflow__int_connect_socket_square_22_goodB2G2Sink(int param_1)
{
if (CWE190_Integer_Overflow__int_connect_socket_square_22_goodB2G2Global != 0) {
if ((param_1 < -0xb504) || (0xb504 < param_1)) {
printLine(&UNK_00401670);
}
else {
printIntLine(param_1 * param_1);
}
}
return;
}
| ['gcc'] |
45,316 | void CWE190_Integer_Overflow__int_connect_socket_square_22_goodG2BSink(int data)
{
if(CWE190_Integer_Overflow__int_connect_socket_square_22_goodG2BGlobal)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83089/CWE190_Integer_Overflow__int_connect_socket_square_22b.c | CWE190_Integer_Overflow__int_connect_socket_square_22_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_22_goodG2BSink(int param_1)
{
if (CWE190_Integer_Overflow__int_connect_socket_square_22_goodG2BGlobal != 0) {
printIntLine(param_1 * param_1);
}
return;
}
| ['gcc'] |
45,317 | void CWE190_Integer_Overflow__int_connect_socket_square_31_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
{
int dataCopy = data;
int data = dataCopy;
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83090/CWE190_Integer_Overflow__int_connect_socket_square_31.c | CWE190_Integer_Overflow__int_connect_socket_square_31_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_31_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
int iStack_20;
int iStack_1c;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
iStack_c = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400c60(&UNK_00401454);
uStack_36 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_46,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_46[iStack_14] = 0;
iStack_c = func_0x00400cb0(auStack_46);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
iStack_18 = iStack_c;
iStack_1c = iStack_c;
iStack_20 = iStack_c * iStack_c;
printIntLine(iStack_20);
return;
}
| ['gcc'] |
45,318 | void CWE190_Integer_Overflow__int_connect_socket_square_31_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83090/CWE190_Integer_Overflow__int_connect_socket_square_31.c | CWE190_Integer_Overflow__int_connect_socket_square_31_good |
void CWE190_Integer_Overflow__int_connect_socket_square_31_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,319 | void CWE190_Integer_Overflow__int_connect_socket_square_32_bad()
{
int data;
int *dataPtr1 = &data;
int *dataPtr2 = &data;
/* Initialize data */
data = 0;
{
int data = *dataPtr1;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
*dataPtr1 = data;
}
{
int data = *dataPtr2;
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83091/CWE190_Integer_Overflow__int_connect_socket_square_32.c | CWE190_Integer_Overflow__int_connect_socket_square_32_bad |
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void CWE190_Integer_Overflow__int_connect_socket_square_32_bad(void)
{
int iVar1;
undefined auStack_56 [14];
undefined2 uStack_48;
undefined2 uStack_46;
undefined4 uStack_44;
int iStack_34;
int iStack_30;
int iStack_2c;
int iStack_28;
int iStack_24;
int *piStack_20;
int *piStack_18;
int iStack_c;
piStack_18 = &iStack_34;
piStack_20 = &iStack_34;
iStack_34 = 0;
iStack_c = 0;
iStack_24 = 0xffffffff;
iStack_24 = func_0x00400cf0(2,1,6);
if (iStack_24 != -1) {
func_0x00400c10(&uStack_48,0,0x10);
uStack_48 = 2;
uStack_44 = func_0x00400c60(&UNK_00401474);
uStack_46 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_24,&uStack_48,0x10);
if (((iVar1 != -1) && (iStack_28 = func_0x00400bc0(iStack_24,auStack_56,0xd,0), iStack_28 != -1)
) && (iStack_28 != 0)) {
auStack_56[iStack_28] = 0;
iStack_c = func_0x00400cb0(auStack_56);
}
}
if (iStack_24 != -1) {
func_0x00400c20(iStack_24);
}
*piStack_18 = iStack_c;
iStack_2c = *piStack_20;
iStack_30 = iStack_2c * iStack_2c;
printIntLine(iStack_30);
return;
}
| ['gcc'] |
45,320 | void CWE190_Integer_Overflow__int_connect_socket_square_32_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83091/CWE190_Integer_Overflow__int_connect_socket_square_32.c | CWE190_Integer_Overflow__int_connect_socket_square_32_good |
void CWE190_Integer_Overflow__int_connect_socket_square_32_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,321 | void CWE190_Integer_Overflow__int_connect_socket_square_34_bad()
{
int data;
CWE190_Integer_Overflow__int_connect_socket_square_34_unionType myUnion;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
myUnion.unionFirst = data;
{
int data = myUnion.unionSecond;
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83093/CWE190_Integer_Overflow__int_connect_socket_square_34.c | CWE190_Integer_Overflow__int_connect_socket_square_34_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_34_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
int iStack_20;
int iStack_1c;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
iStack_c = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400c60(&UNK_00401454);
uStack_36 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_46,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_46[iStack_14] = 0;
iStack_c = func_0x00400cb0(auStack_46);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
iStack_20 = iStack_c;
iStack_18 = iStack_c;
iStack_1c = iStack_c * iStack_c;
printIntLine(iStack_1c);
return;
}
| ['gcc'] |
45,322 | void CWE190_Integer_Overflow__int_connect_socket_square_34_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83093/CWE190_Integer_Overflow__int_connect_socket_square_34.c | CWE190_Integer_Overflow__int_connect_socket_square_34_good |
void CWE190_Integer_Overflow__int_connect_socket_square_34_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,323 | void CWE190_Integer_Overflow__int_connect_socket_square_41_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83094/CWE190_Integer_Overflow__int_connect_socket_square_41.c | CWE190_Integer_Overflow__int_connect_socket_square_41_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_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 = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401464);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
uStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
badSink(uStack_c);
return;
}
| ['gcc'] |
45,324 | void CWE190_Integer_Overflow__int_connect_socket_square_41_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83094/CWE190_Integer_Overflow__int_connect_socket_square_41.c | CWE190_Integer_Overflow__int_connect_socket_square_41_good |
void CWE190_Integer_Overflow__int_connect_socket_square_41_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
45,325 | void CWE190_Integer_Overflow__int_connect_socket_square_42_bad()
{
int data;
/* Initialize data */
data = 0;
data = badSource(data);
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83095/CWE190_Integer_Overflow__int_connect_socket_square_42.c | CWE190_Integer_Overflow__int_connect_socket_square_42_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_42_bad(void)
{
int iVar1;
iVar1 = badSource(0);
printIntLine(iVar1 * iVar1);
return;
}
| ['gcc'] |
45,326 | void CWE190_Integer_Overflow__int_connect_socket_square_42_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83095/CWE190_Integer_Overflow__int_connect_socket_square_42.c | CWE190_Integer_Overflow__int_connect_socket_square_42_good |
void CWE190_Integer_Overflow__int_connect_socket_square_42_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
45,327 | void CWE190_Integer_Overflow__int_connect_socket_square_44_bad()
{
int data;
/* define a function pointer */
void (*funcPtr) (int) = badSink;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83097/CWE190_Integer_Overflow__int_connect_socket_square_44.c | CWE190_Integer_Overflow__int_connect_socket_square_44_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_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 = 0;
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400cf0(2,1,6);
if (iStack_1c != -1) {
func_0x00400c10(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400c60(&UNK_00401464);
uStack_36 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_20 = func_0x00400bc0(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)
) && (iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
uStack_c = func_0x00400cb0(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400c20(iStack_1c);
}
(*pcStack_18)(uStack_c);
return;
}
| ['gcc'] |
45,328 | void CWE190_Integer_Overflow__int_connect_socket_square_44_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83097/CWE190_Integer_Overflow__int_connect_socket_square_44.c | CWE190_Integer_Overflow__int_connect_socket_square_44_good |
void CWE190_Integer_Overflow__int_connect_socket_square_44_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,329 | void CWE190_Integer_Overflow__int_connect_socket_square_45_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE190_Integer_Overflow__int_connect_socket_square_45_badData = data;
badSink();
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83098/CWE190_Integer_Overflow__int_connect_socket_square_45.c | CWE190_Integer_Overflow__int_connect_socket_square_45_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_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 = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401474);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
uStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
CWE190_Integer_Overflow__int_connect_socket_square_45_badData = uStack_c;
badSink();
return;
}
| ['gcc'] |
45,330 | void CWE190_Integer_Overflow__int_connect_socket_square_45_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83098/CWE190_Integer_Overflow__int_connect_socket_square_45.c | CWE190_Integer_Overflow__int_connect_socket_square_45_good |
void CWE190_Integer_Overflow__int_connect_socket_square_45_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,331 | void CWE190_Integer_Overflow__int_connect_socket_square_51_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE190_Integer_Overflow__int_connect_socket_square_51b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83099/CWE190_Integer_Overflow__int_connect_socket_square_51a.c | CWE190_Integer_Overflow__int_connect_socket_square_51_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_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 = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401464);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
uStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
CWE190_Integer_Overflow__int_connect_socket_square_51b_badSink(uStack_c);
return;
}
| ['gcc'] |
45,332 | void CWE190_Integer_Overflow__int_connect_socket_square_51_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83099/CWE190_Integer_Overflow__int_connect_socket_square_51a.c | CWE190_Integer_Overflow__int_connect_socket_square_51_good |
void CWE190_Integer_Overflow__int_connect_socket_square_51_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,333 | void CWE190_Integer_Overflow__int_connect_socket_square_51b_badSink(int data)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83099/CWE190_Integer_Overflow__int_connect_socket_square_51b.c | CWE190_Integer_Overflow__int_connect_socket_square_51b_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_51b_badSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,334 | void CWE190_Integer_Overflow__int_connect_socket_square_51b_goodG2BSink(int data)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83099/CWE190_Integer_Overflow__int_connect_socket_square_51b.c | CWE190_Integer_Overflow__int_connect_socket_square_51b_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_51b_goodG2BSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,335 | void CWE190_Integer_Overflow__int_connect_socket_square_51b_goodB2GSink(int data)
{
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
} | ['/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83099/CWE190_Integer_Overflow__int_connect_socket_square_51b.c | CWE190_Integer_Overflow__int_connect_socket_square_51b_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_51b_goodB2GSink(int param_1)
{
if ((param_1 < -0xb504) || (0xb504 < param_1)) {
printLine(&UNK_004014d8);
}
else {
printIntLine(param_1 * param_1);
}
return;
}
| ['gcc'] |
45,336 | void CWE190_Integer_Overflow__int_connect_socket_square_52_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE190_Integer_Overflow__int_connect_socket_square_52b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83100/CWE190_Integer_Overflow__int_connect_socket_square_52a.c | CWE190_Integer_Overflow__int_connect_socket_square_52_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_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 = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401474);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
uStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
CWE190_Integer_Overflow__int_connect_socket_square_52b_badSink(uStack_c);
return;
}
| ['gcc'] |
45,337 | void CWE190_Integer_Overflow__int_connect_socket_square_52_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83100/CWE190_Integer_Overflow__int_connect_socket_square_52a.c | CWE190_Integer_Overflow__int_connect_socket_square_52_good |
void CWE190_Integer_Overflow__int_connect_socket_square_52_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,338 | void CWE190_Integer_Overflow__int_connect_socket_square_52b_badSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_52c_badSink(data);
} | [] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83100/CWE190_Integer_Overflow__int_connect_socket_square_52b.c | CWE190_Integer_Overflow__int_connect_socket_square_52b_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_52b_badSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_52c_badSink(param_1);
return;
}
| ['gcc'] |
45,339 | void CWE190_Integer_Overflow__int_connect_socket_square_52b_goodG2BSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83100/CWE190_Integer_Overflow__int_connect_socket_square_52b.c | CWE190_Integer_Overflow__int_connect_socket_square_52b_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_52b_goodG2BSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
45,340 | void CWE190_Integer_Overflow__int_connect_socket_square_52b_goodB2GSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_52c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83100/CWE190_Integer_Overflow__int_connect_socket_square_52b.c | CWE190_Integer_Overflow__int_connect_socket_square_52b_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_52b_goodB2GSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_52c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
45,341 | void CWE190_Integer_Overflow__int_connect_socket_square_52c_badSink(int data)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83100/CWE190_Integer_Overflow__int_connect_socket_square_52c.c | CWE190_Integer_Overflow__int_connect_socket_square_52c_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_52c_badSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,342 | void CWE190_Integer_Overflow__int_connect_socket_square_52c_goodG2BSink(int data)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83100/CWE190_Integer_Overflow__int_connect_socket_square_52c.c | CWE190_Integer_Overflow__int_connect_socket_square_52c_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_52c_goodG2BSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,343 | void CWE190_Integer_Overflow__int_connect_socket_square_52c_goodB2GSink(int data)
{
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
} | ['/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83100/CWE190_Integer_Overflow__int_connect_socket_square_52c.c | CWE190_Integer_Overflow__int_connect_socket_square_52c_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_52c_goodB2GSink(int param_1)
{
if ((param_1 < -0xb504) || (0xb504 < param_1)) {
printLine(&UNK_00401508);
}
else {
printIntLine(param_1 * param_1);
}
return;
}
| ['gcc'] |
45,344 | void CWE190_Integer_Overflow__int_connect_socket_square_53_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE190_Integer_Overflow__int_connect_socket_square_53b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53a.c | CWE190_Integer_Overflow__int_connect_socket_square_53_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_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 = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401494);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
uStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
CWE190_Integer_Overflow__int_connect_socket_square_53b_badSink(uStack_c);
return;
}
| ['gcc'] |
45,345 | void CWE190_Integer_Overflow__int_connect_socket_square_53_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53a.c | CWE190_Integer_Overflow__int_connect_socket_square_53_good |
void CWE190_Integer_Overflow__int_connect_socket_square_53_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,346 | void CWE190_Integer_Overflow__int_connect_socket_square_53b_badSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_53c_badSink(data);
} | [] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53b.c | CWE190_Integer_Overflow__int_connect_socket_square_53b_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_53b_badSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_53c_badSink(param_1);
return;
}
| ['gcc'] |
45,347 | void CWE190_Integer_Overflow__int_connect_socket_square_53b_goodG2BSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53b.c | CWE190_Integer_Overflow__int_connect_socket_square_53b_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_53b_goodG2BSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
45,348 | void CWE190_Integer_Overflow__int_connect_socket_square_53b_goodB2GSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_53c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53b.c | CWE190_Integer_Overflow__int_connect_socket_square_53b_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_53b_goodB2GSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_53c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
45,349 | void CWE190_Integer_Overflow__int_connect_socket_square_53c_badSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_53d_badSink(data);
} | [] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53c.c | CWE190_Integer_Overflow__int_connect_socket_square_53c_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_53c_badSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_53d_badSink(param_1);
return;
}
| ['gcc'] |
45,350 | void CWE190_Integer_Overflow__int_connect_socket_square_53c_goodG2BSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53c.c | CWE190_Integer_Overflow__int_connect_socket_square_53c_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_53c_goodG2BSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
45,351 | void CWE190_Integer_Overflow__int_connect_socket_square_53c_goodB2GSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_53d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53c.c | CWE190_Integer_Overflow__int_connect_socket_square_53c_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_53c_goodB2GSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_53d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
45,352 | void CWE190_Integer_Overflow__int_connect_socket_square_53d_badSink(int data)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53d.c | CWE190_Integer_Overflow__int_connect_socket_square_53d_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_53d_badSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,353 | void CWE190_Integer_Overflow__int_connect_socket_square_53d_goodG2BSink(int data)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53d.c | CWE190_Integer_Overflow__int_connect_socket_square_53d_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_53d_goodG2BSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,354 | void CWE190_Integer_Overflow__int_connect_socket_square_53d_goodB2GSink(int data)
{
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
} | ['/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83101/CWE190_Integer_Overflow__int_connect_socket_square_53d.c | CWE190_Integer_Overflow__int_connect_socket_square_53d_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_53d_goodB2GSink(int param_1)
{
if ((param_1 < -0xb504) || (0xb504 < param_1)) {
printLine(&UNK_00401538);
}
else {
printIntLine(param_1 * param_1);
}
return;
}
| ['gcc'] |
45,355 | void CWE190_Integer_Overflow__int_connect_socket_square_54_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE190_Integer_Overflow__int_connect_socket_square_54b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54a.c | CWE190_Integer_Overflow__int_connect_socket_square_54_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_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 = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_004014a4);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
uStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
CWE190_Integer_Overflow__int_connect_socket_square_54b_badSink(uStack_c);
return;
}
| ['gcc'] |
45,356 | void CWE190_Integer_Overflow__int_connect_socket_square_54_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54a.c | CWE190_Integer_Overflow__int_connect_socket_square_54_good |
void CWE190_Integer_Overflow__int_connect_socket_square_54_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,357 | void CWE190_Integer_Overflow__int_connect_socket_square_54b_badSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_54c_badSink(data);
} | [] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54b.c | CWE190_Integer_Overflow__int_connect_socket_square_54b_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54b_badSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_54c_badSink(param_1);
return;
}
| ['gcc'] |
45,358 | void CWE190_Integer_Overflow__int_connect_socket_square_54b_goodG2BSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54b.c | CWE190_Integer_Overflow__int_connect_socket_square_54b_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54b_goodG2BSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
45,359 | void CWE190_Integer_Overflow__int_connect_socket_square_54b_goodB2GSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_54c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54b.c | CWE190_Integer_Overflow__int_connect_socket_square_54b_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54b_goodB2GSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_54c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
45,360 | void CWE190_Integer_Overflow__int_connect_socket_square_54c_badSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_54d_badSink(data);
} | [] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54c.c | CWE190_Integer_Overflow__int_connect_socket_square_54c_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54c_badSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_54d_badSink(param_1);
return;
}
| ['gcc'] |
45,361 | void CWE190_Integer_Overflow__int_connect_socket_square_54c_goodG2BSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54c.c | CWE190_Integer_Overflow__int_connect_socket_square_54c_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54c_goodG2BSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
45,362 | void CWE190_Integer_Overflow__int_connect_socket_square_54c_goodB2GSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_54d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54c.c | CWE190_Integer_Overflow__int_connect_socket_square_54c_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54c_goodB2GSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_54d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
45,363 | void CWE190_Integer_Overflow__int_connect_socket_square_54d_badSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_54e_badSink(data);
} | [] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54d.c | CWE190_Integer_Overflow__int_connect_socket_square_54d_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54d_badSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_54e_badSink(param_1);
return;
}
| ['gcc'] |
45,364 | void CWE190_Integer_Overflow__int_connect_socket_square_54d_goodG2BSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54d.c | CWE190_Integer_Overflow__int_connect_socket_square_54d_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54d_goodG2BSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
45,365 | void CWE190_Integer_Overflow__int_connect_socket_square_54d_goodB2GSink(int data)
{
CWE190_Integer_Overflow__int_connect_socket_square_54e_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54d.c | CWE190_Integer_Overflow__int_connect_socket_square_54d_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54d_goodB2GSink(undefined4 param_1)
{
CWE190_Integer_Overflow__int_connect_socket_square_54e_goodB2GSink(param_1);
return;
}
| ['gcc'] |
45,366 | void CWE190_Integer_Overflow__int_connect_socket_square_54e_badSink(int data)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54e.c | CWE190_Integer_Overflow__int_connect_socket_square_54e_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54e_badSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,367 | void CWE190_Integer_Overflow__int_connect_socket_square_54e_goodG2BSink(int data)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54e.c | CWE190_Integer_Overflow__int_connect_socket_square_54e_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54e_goodG2BSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,368 | void CWE190_Integer_Overflow__int_connect_socket_square_54e_goodB2GSink(int data)
{
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
} | ['/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83102/CWE190_Integer_Overflow__int_connect_socket_square_54e.c | CWE190_Integer_Overflow__int_connect_socket_square_54e_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_54e_goodB2GSink(int param_1)
{
if ((param_1 < -0xb504) || (0xb504 < param_1)) {
printLine(&UNK_00401568);
}
else {
printIntLine(param_1 * param_1);
}
return;
}
| ['gcc'] |
45,369 | void CWE190_Integer_Overflow__int_connect_socket_square_61_bad()
{
int data;
/* Initialize data */
data = 0;
data = CWE190_Integer_Overflow__int_connect_socket_square_61b_badSource(data);
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83103/CWE190_Integer_Overflow__int_connect_socket_square_61a.c | CWE190_Integer_Overflow__int_connect_socket_square_61_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_61_bad(void)
{
int iVar1;
iVar1 = CWE190_Integer_Overflow__int_connect_socket_square_61b_badSource(0);
printIntLine(iVar1 * iVar1);
return;
}
| ['gcc'] |
45,370 | void CWE190_Integer_Overflow__int_connect_socket_square_61_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83103/CWE190_Integer_Overflow__int_connect_socket_square_61a.c | CWE190_Integer_Overflow__int_connect_socket_square_61_good |
void CWE190_Integer_Overflow__int_connect_socket_square_61_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,371 | int CWE190_Integer_Overflow__int_connect_socket_square_61b_badSource(int data)
{
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
return data;
} | ['/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83103/CWE190_Integer_Overflow__int_connect_socket_square_61b.c | CWE190_Integer_Overflow__int_connect_socket_square_61b_badSource |
undefined4 CWE190_Integer_Overflow__int_connect_socket_square_61b_badSource(undefined4 param_1)
{
int iVar1;
undefined4 uStack_3c;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_10;
int iStack_c;
iStack_c = 0xffffffff;
iStack_c = func_0x00400cf0(2,1,6);
uStack_3c = param_1;
if (iStack_c != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401464);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_c,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_10 = func_0x00400bc0(iStack_c,auStack_36,0xd,0), iStack_10 != -1))
&& (iStack_10 != 0)) {
auStack_36[iStack_10] = 0;
uStack_3c = func_0x00400cb0(auStack_36);
}
}
if (iStack_c != -1) {
func_0x00400c20(iStack_c);
}
return uStack_3c;
}
| ['gcc'] |
45,372 | int CWE190_Integer_Overflow__int_connect_socket_square_61b_goodG2BSource(int data)
{
/* FIX: Use a small, non-zero value that will not cause an integer overflow in the sinks */
data = 2;
return data;
} | ['/* FIX: Use a small, non-zero value that will not cause an integer overflow in the sinks */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83103/CWE190_Integer_Overflow__int_connect_socket_square_61b.c | CWE190_Integer_Overflow__int_connect_socket_square_61b_goodG2BSource |
undefined4 CWE190_Integer_Overflow__int_connect_socket_square_61b_goodG2BSource(void)
{
return 2;
}
| ['gcc'] |
45,373 | int CWE190_Integer_Overflow__int_connect_socket_square_61b_goodB2GSource(int data)
{
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
return data;
} | ['/* POTENTIAL FLAW: Read data 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 */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83103/CWE190_Integer_Overflow__int_connect_socket_square_61b.c | CWE190_Integer_Overflow__int_connect_socket_square_61b_goodB2GSource |
undefined4 CWE190_Integer_Overflow__int_connect_socket_square_61b_goodB2GSource(undefined4 param_1)
{
int iVar1;
undefined4 uStack_3c;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_10;
int iStack_c;
iStack_c = 0xffffffff;
iStack_c = func_0x00400cf0(2,1,6);
uStack_3c = param_1;
if (iStack_c != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_004014e4);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_c,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_10 = func_0x00400bc0(iStack_c,auStack_36,0xd,0), iStack_10 != -1))
&& (iStack_10 != 0)) {
auStack_36[iStack_10] = 0;
uStack_3c = func_0x00400cb0(auStack_36);
}
}
if (iStack_c != -1) {
func_0x00400c20(iStack_c);
}
return uStack_3c;
}
| ['gcc'] |
45,374 | void CWE190_Integer_Overflow__int_connect_socket_square_63_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE190_Integer_Overflow__int_connect_socket_square_63b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83105/CWE190_Integer_Overflow__int_connect_socket_square_63a.c | CWE190_Integer_Overflow__int_connect_socket_square_63_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_63_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
undefined4 uStack_14;
int iStack_10;
int iStack_c;
uStack_14 = 0;
iStack_c = 0xffffffff;
iStack_c = func_0x00400cf0(2,1,6);
if (iStack_c != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401464);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_c,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_10 = func_0x00400bc0(iStack_c,auStack_36,0xd,0), iStack_10 != -1))
&& (iStack_10 != 0)) {
auStack_36[iStack_10] = 0;
uStack_14 = func_0x00400cb0(auStack_36);
}
}
if (iStack_c != -1) {
func_0x00400c20(iStack_c);
}
CWE190_Integer_Overflow__int_connect_socket_square_63b_badSink(&uStack_14);
return;
}
| ['gcc'] |
45,375 | void CWE190_Integer_Overflow__int_connect_socket_square_63_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83105/CWE190_Integer_Overflow__int_connect_socket_square_63a.c | CWE190_Integer_Overflow__int_connect_socket_square_63_good |
void CWE190_Integer_Overflow__int_connect_socket_square_63_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,376 | void CWE190_Integer_Overflow__int_connect_socket_square_63b_badSink(int * dataPtr)
{
int data = *dataPtr;
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83105/CWE190_Integer_Overflow__int_connect_socket_square_63b.c | CWE190_Integer_Overflow__int_connect_socket_square_63b_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_63b_badSink(int *param_1)
{
printIntLine(*param_1 * *param_1);
return;
}
| ['gcc'] |
45,377 | void CWE190_Integer_Overflow__int_connect_socket_square_63b_goodG2BSink(int * dataPtr)
{
int data = *dataPtr;
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83105/CWE190_Integer_Overflow__int_connect_socket_square_63b.c | CWE190_Integer_Overflow__int_connect_socket_square_63b_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_63b_goodG2BSink(int *param_1)
{
printIntLine(*param_1 * *param_1);
return;
}
| ['gcc'] |
45,378 | void CWE190_Integer_Overflow__int_connect_socket_square_63b_goodB2GSink(int * dataPtr)
{
int data = *dataPtr;
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
} | ['/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83105/CWE190_Integer_Overflow__int_connect_socket_square_63b.c | CWE190_Integer_Overflow__int_connect_socket_square_63b_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_63b_goodB2GSink(int *param_1)
{
int iVar1;
iVar1 = *param_1;
if ((iVar1 < -0xb504) || (0xb504 < iVar1)) {
printLine(&UNK_004014f8);
}
else {
printIntLine(iVar1 * iVar1);
}
return;
}
| ['gcc'] |
45,379 | void CWE190_Integer_Overflow__int_connect_socket_square_64_bad()
{
int data;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE190_Integer_Overflow__int_connect_socket_square_64b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83106/CWE190_Integer_Overflow__int_connect_socket_square_64a.c | CWE190_Integer_Overflow__int_connect_socket_square_64_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_64_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
undefined4 uStack_14;
int iStack_10;
int iStack_c;
uStack_14 = 0;
iStack_c = 0xffffffff;
iStack_c = func_0x00400cf0(2,1,6);
if (iStack_c != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401474);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_c,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_10 = func_0x00400bc0(iStack_c,auStack_36,0xd,0), iStack_10 != -1))
&& (iStack_10 != 0)) {
auStack_36[iStack_10] = 0;
uStack_14 = func_0x00400cb0(auStack_36);
}
}
if (iStack_c != -1) {
func_0x00400c20(iStack_c);
}
CWE190_Integer_Overflow__int_connect_socket_square_64b_badSink(&uStack_14);
return;
}
| ['gcc'] |
45,380 | void CWE190_Integer_Overflow__int_connect_socket_square_64_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83106/CWE190_Integer_Overflow__int_connect_socket_square_64a.c | CWE190_Integer_Overflow__int_connect_socket_square_64_good |
void CWE190_Integer_Overflow__int_connect_socket_square_64_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,381 | void CWE190_Integer_Overflow__int_connect_socket_square_64b_badSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
int * dataPtr = (int *)dataVoidPtr;
/* dereference dataPtr into data */
int data = (*dataPtr);
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83106/CWE190_Integer_Overflow__int_connect_socket_square_64b.c | CWE190_Integer_Overflow__int_connect_socket_square_64b_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_64b_badSink(int *param_1)
{
printIntLine(*param_1 * *param_1);
return;
}
| ['gcc'] |
45,382 | void CWE190_Integer_Overflow__int_connect_socket_square_64b_goodG2BSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
int * dataPtr = (int *)dataVoidPtr;
/* dereference dataPtr into data */
int data = (*dataPtr);
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83106/CWE190_Integer_Overflow__int_connect_socket_square_64b.c | CWE190_Integer_Overflow__int_connect_socket_square_64b_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_64b_goodG2BSink(int *param_1)
{
printIntLine(*param_1 * *param_1);
return;
}
| ['gcc'] |
45,383 | void CWE190_Integer_Overflow__int_connect_socket_square_64b_goodB2GSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
int * dataPtr = (int *)dataVoidPtr;
/* dereference dataPtr into data */
int data = (*dataPtr);
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83106/CWE190_Integer_Overflow__int_connect_socket_square_64b.c | CWE190_Integer_Overflow__int_connect_socket_square_64b_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_64b_goodB2GSink(int *param_1)
{
int iVar1;
iVar1 = *param_1;
if ((iVar1 < -0xb504) || (0xb504 < iVar1)) {
printLine(&UNK_00401508);
}
else {
printIntLine(iVar1 * iVar1);
}
return;
}
| ['gcc'] |
45,384 | void CWE190_Integer_Overflow__int_connect_socket_square_65_bad()
{
int data;
/* define a function pointer */
void (*funcPtr) (int) = CWE190_Integer_Overflow__int_connect_socket_square_65b_badSink;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83107/CWE190_Integer_Overflow__int_connect_socket_square_65a.c | CWE190_Integer_Overflow__int_connect_socket_square_65_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_65_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 = CWE190_Integer_Overflow__int_connect_socket_square_65b_badSink;
uStack_c = 0;
iStack_1c = 0xffffffff;
iStack_1c = func_0x00400cf0(2,1,6);
if (iStack_1c != -1) {
func_0x00400c10(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400c60(&UNK_00401464);
uStack_36 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_1c,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_20 = func_0x00400bc0(iStack_1c,auStack_46,0xd,0), iStack_20 != -1)
) && (iStack_20 != 0)) {
auStack_46[iStack_20] = 0;
uStack_c = func_0x00400cb0(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400c20(iStack_1c);
}
(*pcStack_18)(uStack_c);
return;
}
| ['gcc'] |
45,385 | void CWE190_Integer_Overflow__int_connect_socket_square_65_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83107/CWE190_Integer_Overflow__int_connect_socket_square_65a.c | CWE190_Integer_Overflow__int_connect_socket_square_65_good |
void CWE190_Integer_Overflow__int_connect_socket_square_65_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,386 | void CWE190_Integer_Overflow__int_connect_socket_square_65b_badSink(int data)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83107/CWE190_Integer_Overflow__int_connect_socket_square_65b.c | CWE190_Integer_Overflow__int_connect_socket_square_65b_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_65b_badSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,387 | void CWE190_Integer_Overflow__int_connect_socket_square_65b_goodG2BSink(int data)
{
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83107/CWE190_Integer_Overflow__int_connect_socket_square_65b.c | CWE190_Integer_Overflow__int_connect_socket_square_65b_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_65b_goodG2BSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,388 | void CWE190_Integer_Overflow__int_connect_socket_square_65b_goodB2GSink(int data)
{
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
} | ['/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83107/CWE190_Integer_Overflow__int_connect_socket_square_65b.c | CWE190_Integer_Overflow__int_connect_socket_square_65b_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_65b_goodB2GSink(int param_1)
{
if ((param_1 < -0xb504) || (0xb504 < param_1)) {
printLine(&UNK_004014f8);
}
else {
printIntLine(param_1 * param_1);
}
return;
}
| ['gcc'] |
45,389 | void CWE190_Integer_Overflow__int_connect_socket_square_66_bad()
{
int data;
int dataArray[5];
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* put data in array */
dataArray[2] = data;
CWE190_Integer_Overflow__int_connect_socket_square_66b_badSink(dataArray);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */', '/* put data in array */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83108/CWE190_Integer_Overflow__int_connect_socket_square_66a.c | CWE190_Integer_Overflow__int_connect_socket_square_66_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_66_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined auStack_28 [8];
undefined4 uStack_20;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400c60(&UNK_00401474);
uStack_36 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_38,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_46,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_46[iStack_14] = 0;
uStack_c = func_0x00400cb0(auStack_46);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
uStack_20 = uStack_c;
CWE190_Integer_Overflow__int_connect_socket_square_66b_badSink(auStack_28);
return;
}
| ['gcc'] |
45,390 | void CWE190_Integer_Overflow__int_connect_socket_square_66_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83108/CWE190_Integer_Overflow__int_connect_socket_square_66a.c | CWE190_Integer_Overflow__int_connect_socket_square_66_good |
void CWE190_Integer_Overflow__int_connect_socket_square_66_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,391 | void CWE190_Integer_Overflow__int_connect_socket_square_66b_badSink(int dataArray[])
{
/* copy data out of dataArray */
int data = dataArray[2];
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* copy data out of dataArray */', '/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83108/CWE190_Integer_Overflow__int_connect_socket_square_66b.c | CWE190_Integer_Overflow__int_connect_socket_square_66b_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_66b_badSink(long param_1)
{
printIntLine(*(int *)(param_1 + 8) * *(int *)(param_1 + 8));
return;
}
| ['gcc'] |
45,392 | void CWE190_Integer_Overflow__int_connect_socket_square_66b_goodG2BSink(int dataArray[])
{
int data = dataArray[2];
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83108/CWE190_Integer_Overflow__int_connect_socket_square_66b.c | CWE190_Integer_Overflow__int_connect_socket_square_66b_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_66b_goodG2BSink(long param_1)
{
printIntLine(*(int *)(param_1 + 8) * *(int *)(param_1 + 8));
return;
}
| ['gcc'] |
45,393 | void CWE190_Integer_Overflow__int_connect_socket_square_66b_goodB2GSink(int dataArray[])
{
int data = dataArray[2];
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
} | ['/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83108/CWE190_Integer_Overflow__int_connect_socket_square_66b.c | CWE190_Integer_Overflow__int_connect_socket_square_66b_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_66b_goodB2GSink(long param_1)
{
int iVar1;
iVar1 = *(int *)(param_1 + 8);
if ((iVar1 < -0xb504) || (0xb504 < iVar1)) {
printLine(&UNK_00401508);
}
else {
printIntLine(iVar1 * iVar1);
}
return;
}
| ['gcc'] |
45,394 | void CWE190_Integer_Overflow__int_connect_socket_square_67_bad()
{
int data;
CWE190_Integer_Overflow__int_connect_socket_square_67_structType myStruct;
/* Initialize data */
data = 0;
{
#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 data 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 */
data = atoi(inputBuffer);
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
myStruct.structFirst = data;
CWE190_Integer_Overflow__int_connect_socket_square_67b_badSink(myStruct);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data 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 */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83109/CWE190_Integer_Overflow__int_connect_socket_square_67a.c | CWE190_Integer_Overflow__int_connect_socket_square_67_bad |
void CWE190_Integer_Overflow__int_connect_socket_square_67_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
undefined4 uStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0;
iStack_10 = 0xffffffff;
iStack_10 = func_0x00400cf0(2,1,6);
if (iStack_10 != -1) {
func_0x00400c10(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = func_0x00400c60(&UNK_00401464);
uStack_26 = func_0x00400bf0(0x6987);
iVar1 = func_0x00400cc0(iStack_10,&uStack_28,0x10);
if (((iVar1 != -1) && (iStack_14 = func_0x00400bc0(iStack_10,auStack_36,0xd,0), iStack_14 != -1)
) && (iStack_14 != 0)) {
auStack_36[iStack_14] = 0;
uStack_c = func_0x00400cb0(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c20(iStack_10);
}
uStack_18 = uStack_c;
CWE190_Integer_Overflow__int_connect_socket_square_67b_badSink(uStack_c);
return;
}
| ['gcc'] |
45,395 | void CWE190_Integer_Overflow__int_connect_socket_square_67_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83109/CWE190_Integer_Overflow__int_connect_socket_square_67a.c | CWE190_Integer_Overflow__int_connect_socket_square_67_good |
void CWE190_Integer_Overflow__int_connect_socket_square_67_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
45,396 | void CWE190_Integer_Overflow__int_connect_socket_square_67b_badSink(CWE190_Integer_Overflow__int_connect_socket_square_67_structType myStruct)
{
int data = myStruct.structFirst;
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83109/CWE190_Integer_Overflow__int_connect_socket_square_67b.c | CWE190_Integer_Overflow__int_connect_socket_square_67b_badSink |
void CWE190_Integer_Overflow__int_connect_socket_square_67b_badSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,397 | void CWE190_Integer_Overflow__int_connect_socket_square_67b_goodG2BSink(CWE190_Integer_Overflow__int_connect_socket_square_67_structType myStruct)
{
int data = myStruct.structFirst;
{
/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */
int result = data * data;
printIntLine(result);
}
} | ['/* POTENTIAL FLAW: if (data*data) > INT_MAX, this will overflow */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83109/CWE190_Integer_Overflow__int_connect_socket_square_67b.c | CWE190_Integer_Overflow__int_connect_socket_square_67b_goodG2BSink |
void CWE190_Integer_Overflow__int_connect_socket_square_67b_goodG2BSink(int param_1)
{
printIntLine(param_1 * param_1);
return;
}
| ['gcc'] |
45,398 | void CWE190_Integer_Overflow__int_connect_socket_square_67b_goodB2GSink(CWE190_Integer_Overflow__int_connect_socket_square_67_structType myStruct)
{
int data = myStruct.structFirst;
/* FIX: Add a check to prevent an overflow from occurring */
if (abs((long)data) <= (long)sqrt((double)INT_MAX))
{
int result = data * data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
} | ['/* FIX: Add a check to prevent an overflow from occurring */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83109/CWE190_Integer_Overflow__int_connect_socket_square_67b.c | CWE190_Integer_Overflow__int_connect_socket_square_67b_goodB2GSink |
void CWE190_Integer_Overflow__int_connect_socket_square_67b_goodB2GSink(int param_1)
{
if ((param_1 < -0xb504) || (0xb504 < param_1)) {
printLine(&UNK_004014f8);
}
else {
printIntLine(param_1 * param_1);
}
return;
}
| ['gcc'] |
45,399 | void CWE190_Integer_Overflow__int_fgets_add_03_bad()
{
int data;
/* Initialize data */
data = 0;
if(5==5)
{
{
char inputBuffer[CHAR_ARRAY_SIZE] = "";
/* POTENTIAL FLAW: Read data from the console using fgets() */
if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)
{
/* Convert to int */
data = atoi(inputBuffer);
}
else
{
printLine("fgets() failed.");
}
}
}
if(5==5)
{
{
/* POTENTIAL FLAW: Adding 1 to data could cause an overflow */
int result = data + 1;
printIntLine(result);
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data from the console using fgets() */', '/* Convert to int */', '/* POTENTIAL FLAW: Adding 1 to data could cause an overflow */'] | ['CWE190'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/83120/CWE190_Integer_Overflow__int_fgets_add_03.c | CWE190_Integer_Overflow__int_fgets_add_03_bad |
void CWE190_Integer_Overflow__int_fgets_add_03_bad(void)
{
long lVar1;
undefined8 uStack_1e;
undefined4 uStack_16;
undefined2 uStack_12;
int iStack_10;
int iStack_c;
iStack_c = 0;
uStack_1e = 0;
uStack_16 = 0;
uStack_12 = 0;
lVar1 = func_0x00400ab0(&uStack_1e,0xe,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401204);
}
else {
iStack_c = func_0x00400b10(&uStack_1e);
}
iStack_10 = iStack_c + 1;
printIntLine(iStack_10);
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.