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 |
|---|---|---|---|---|---|---|---|---|
15,400 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e_badSink(int data)
{
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62740/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e_badSink(int param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_c;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (param_1 < 0) {
printLine(&UNK_00401598);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,401 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e_goodG2BSink(int data)
{
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62740/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e_goodG2BSink(int param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_c;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (param_1 < 0) {
printLine(&UNK_00401698);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,402 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e_goodB2GSink(int data)
{
{
int i;
int buffer[10] = { 0 };
/* FIX: Properly validate the array index and prevent a buffer overflow */
if (data >= 0 && data < (10))
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is out-of-bounds");
}
}
} | ['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62740/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e_goodB2GSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_54e_goodB2GSink(int param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_c;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if ((param_1 < 0) || (9 < param_1)) {
printLine(&UNK_004016b8);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,403 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61_bad()
{
int data;
/* Initialize data */
data = -1;
data = CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b_badSource(data);
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62741/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61_bad(void)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = 0xffffffff;
iStack_10 = CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b_badSource(0xffffffff);
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (iStack_10 < 0) {
printLine(&UNK_00401558);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,404 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62741/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
15,405 | int CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b_badSource(int data)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = 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 listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, 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 (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
return data;
} | ['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62741/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b_badSource |
undefined4
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_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_14;
int iStack_10;
int iStack_c;
iStack_10 = 0xffffffff;
iStack_c = -1;
iStack_10 = func_0x00400d40(2,1,6);
uStack_3c = param_1;
if (iStack_10 != -1) {
func_0x00400c50(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c30(0x6987);
iVar1 = func_0x00400cf0(iStack_10,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400ce0(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400d00(iStack_10,0,0), iStack_c != -1)) &&
((iStack_14 = func_0x00400c00(iStack_c,auStack_36,0xd,0), iStack_14 != -1 && (iStack_14 != 0)
))) {
auStack_36[iStack_14] = 0;
uStack_3c = func_0x00400d10(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c60(iStack_10);
}
if (iStack_c != -1) {
func_0x00400c60(iStack_c);
}
return uStack_3c;
}
| ['gcc'] |
15,406 | int CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b_goodG2BSource(int data)
{
/* FIX: Use a value greater than 0, but less than 10 to avoid attempting to
* access an index of the array in the sink that is out-of-bounds */
data = 7;
return data;
} | ['/* FIX: Use a value greater than 0, but less than 10 to avoid attempting to\r\n * access an index of the array in the sink that is out-of-bounds */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62741/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b_goodG2BSource |
undefined4 CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b_goodG2BSource(void)
{
return 7;
}
| ['gcc'] |
15,407 | int CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b_goodB2GSource(int data)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = 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 listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, 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 (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
return data;
} | ['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62741/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_61b_goodB2GSource |
undefined4
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_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_14;
int iStack_10;
int iStack_c;
iStack_10 = 0xffffffff;
iStack_c = -1;
iStack_10 = func_0x00400d40(2,1,6);
uStack_3c = param_1;
if (iStack_10 != -1) {
func_0x00400c50(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c30(0x6987);
iVar1 = func_0x00400cf0(iStack_10,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400ce0(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400d00(iStack_10,0,0), iStack_c != -1)) &&
((iStack_14 = func_0x00400c00(iStack_c,auStack_36,0xd,0), iStack_14 != -1 && (iStack_14 != 0)
))) {
auStack_36[iStack_14] = 0;
uStack_3c = func_0x00400d10(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c60(iStack_10);
}
if (iStack_c != -1) {
func_0x00400c60(iStack_c);
}
return uStack_3c;
}
| ['gcc'] |
15,408 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = 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 listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, 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 (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62743/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63_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;
int iStack_c;
uStack_18 = 0xffffffff;
iStack_10 = 0xffffffff;
iStack_c = -1;
iStack_10 = func_0x00400d40(2,1,6);
if (iStack_10 != -1) {
func_0x00400c50(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c30(0x6987);
iVar1 = func_0x00400cf0(iStack_10,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400ce0(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400d00(iStack_10,0,0), iStack_c != -1)) &&
((iStack_14 = func_0x00400c00(iStack_c,auStack_36,0xd,0), iStack_14 != -1 && (iStack_14 != 0)
))) {
auStack_36[iStack_14] = 0;
uStack_18 = func_0x00400d10(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c60(iStack_10);
}
if (iStack_c != -1) {
func_0x00400c60(iStack_c);
}
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_badSink(&uStack_18);
return;
}
| ['gcc'] |
15,409 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62743/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
15,410 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_badSink(int * dataPtr)
{
int data = *dataPtr;
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62743/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_badSink(int *param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = *param_1;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (iStack_10 < 0) {
printLine(&UNK_00401558);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,411 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_goodG2BSink(int * dataPtr)
{
int data = *dataPtr;
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62743/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_goodG2BSink(int *param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = *param_1;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (iStack_10 < 0) {
printLine(&UNK_00401628);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,412 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_goodB2GSink(int * dataPtr)
{
int data = *dataPtr;
{
int i;
int buffer[10] = { 0 };
/* FIX: Properly validate the array index and prevent a buffer overflow */
if (data >= 0 && data < (10))
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is out-of-bounds");
}
}
} | ['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62743/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_goodB2GSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_63b_goodB2GSink(int *param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = *param_1;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if ((iStack_10 < 0) || (9 < iStack_10)) {
printLine(&UNK_00401648);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,413 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = 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 listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, 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 (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62744/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64_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;
int iStack_c;
uStack_18 = 0xffffffff;
iStack_10 = 0xffffffff;
iStack_c = -1;
iStack_10 = func_0x00400d40(2,1,6);
if (iStack_10 != -1) {
func_0x00400c50(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c30(0x6987);
iVar1 = func_0x00400cf0(iStack_10,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400ce0(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400d00(iStack_10,0,0), iStack_c != -1)) &&
((iStack_14 = func_0x00400c00(iStack_c,auStack_36,0xd,0), iStack_14 != -1 && (iStack_14 != 0)
))) {
auStack_36[iStack_14] = 0;
uStack_18 = func_0x00400d10(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400c60(iStack_10);
}
if (iStack_c != -1) {
func_0x00400c60(iStack_c);
}
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b_badSink(&uStack_18);
return;
}
| ['gcc'] |
15,414 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62744/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
15,415 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_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);
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62744/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b_badSink(int *param_1)
{
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
int iStack_1c;
int *piStack_18;
int iStack_c;
piStack_18 = param_1;
iStack_1c = *param_1;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
if (iStack_1c < 0) {
printLine(&UNK_00401568);
}
else {
*(undefined4 *)((long)&uStack_48 + (long)iStack_1c * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,416 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_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);
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62744/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b_goodG2BSink(int *param_1)
{
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
int iStack_1c;
int *piStack_18;
int iStack_c;
piStack_18 = param_1;
iStack_1c = *param_1;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
if (iStack_1c < 0) {
printLine(&UNK_00401638);
}
else {
*(undefined4 *)((long)&uStack_48 + (long)iStack_1c * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,417 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_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);
{
int i;
int buffer[10] = { 0 };
/* FIX: Properly validate the array index and prevent a buffer overflow */
if (data >= 0 && data < (10))
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is out-of-bounds");
}
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62744/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b_goodB2GSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_64b_goodB2GSink(int *param_1)
{
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
int iStack_1c;
int *piStack_18;
int iStack_c;
piStack_18 = param_1;
iStack_1c = *param_1;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
if ((iStack_1c < 0) || (9 < iStack_1c)) {
printLine(&UNK_00401658);
}
else {
*(undefined4 *)((long)&uStack_48 + (long)iStack_1c * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_48 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,418 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65_bad()
{
int data;
/* define a function pointer */
void (*funcPtr) (int) = CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_badSink;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = 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 listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, 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 (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */', '/* use the function pointer */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62745/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_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;
int iStack_10;
undefined4 uStack_c;
pcStack_18 = CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_badSink;
uStack_c = 0xffffffff;
iStack_1c = 0xffffffff;
iStack_10 = -1;
iStack_1c = func_0x00400d40(2,1,6);
if (iStack_1c != -1) {
func_0x00400c50(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = 0;
uStack_36 = func_0x00400c30(0x6987);
iVar1 = func_0x00400cf0(iStack_1c,&uStack_38,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400ce0(iStack_1c,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d00(iStack_1c,0,0), iStack_10 != -1)) &&
((iStack_20 = func_0x00400c00(iStack_10,auStack_46,0xd,0), iStack_20 != -1 &&
(iStack_20 != 0)))) {
auStack_46[iStack_20] = 0;
uStack_c = func_0x00400d10(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400c60(iStack_1c);
}
if (iStack_10 != -1) {
func_0x00400c60(iStack_10);
}
(*pcStack_18)(uStack_c);
return;
}
| ['gcc'] |
15,419 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62745/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
15,420 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_badSink(int data)
{
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62745/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_badSink(int param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_c;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (param_1 < 0) {
printLine(&UNK_00401558);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,421 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_goodG2BSink(int data)
{
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62745/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_goodG2BSink(int param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_c;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (param_1 < 0) {
printLine(&UNK_00401618);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,422 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_goodB2GSink(int data)
{
{
int i;
int buffer[10] = { 0 };
/* FIX: Properly validate the array index and prevent a buffer overflow */
if (data >= 0 && data < (10))
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is out-of-bounds");
}
}
} | ['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62745/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_goodB2GSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_65b_goodB2GSink(int param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_c;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if ((param_1 < 0) || (9 < param_1)) {
printLine(&UNK_00401638);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,423 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66_bad()
{
int data;
int dataArray[5];
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = 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 listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, 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 (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* put data in array */
dataArray[2] = data;
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_badSink(dataArray);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */', '/* put data in array */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62746/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66_bad(void)
{
int iVar1;
undefined auStack_56 [14];
undefined2 uStack_48;
undefined2 uStack_46;
undefined4 uStack_44;
undefined auStack_38 [8];
undefined4 uStack_30;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d40(2,1,6);
if (iStack_14 != -1) {
func_0x00400c50(&uStack_48,0,0x10);
uStack_48 = 2;
uStack_44 = 0;
uStack_46 = func_0x00400c30(0x6987);
iVar1 = func_0x00400cf0(iStack_14,&uStack_48,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400ce0(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d00(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c00(iStack_10,auStack_56,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_56[iStack_18] = 0;
uStack_c = func_0x00400d10(auStack_56);
}
}
if (iStack_14 != -1) {
func_0x00400c60(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400c60(iStack_10);
}
uStack_30 = uStack_c;
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_badSink(auStack_38);
return;
}
| ['gcc'] |
15,424 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62746/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
15,425 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_badSink(int dataArray[])
{
/* copy data out of dataArray */
int data = dataArray[2];
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* copy data out of dataArray */', '/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62746/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_badSink(long param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = *(int *)(param_1 + 8);
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (iStack_10 < 0) {
printLine(&UNK_00401568);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,426 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_goodG2BSink(int dataArray[])
{
int data = dataArray[2];
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62746/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_goodG2BSink(long param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = *(int *)(param_1 + 8);
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (iStack_10 < 0) {
printLine(&UNK_00401638);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,427 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_goodB2GSink(int dataArray[])
{
int data = dataArray[2];
{
int i;
int buffer[10] = { 0 };
/* FIX: Properly validate the array index and prevent a buffer overflow */
if (data >= 0 && data < (10))
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is out-of-bounds");
}
}
} | ['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62746/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_goodB2GSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_66b_goodB2GSink(long param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = *(int *)(param_1 + 8);
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if ((iStack_10 < 0) || (9 < iStack_10)) {
printLine(&UNK_00401658);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)iStack_10 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,428 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67_bad()
{
int data;
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67_structType myStruct;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = 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 listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, 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 (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
myStruct.structFirst = data;
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_badSink(myStruct);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62747/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 uStack_1c;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d40(2,1,6);
if (iStack_14 != -1) {
func_0x00400c50(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = 0;
uStack_36 = func_0x00400c30(0x6987);
iVar1 = func_0x00400cf0(iStack_14,&uStack_38,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400ce0(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d00(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c00(iStack_10,auStack_46,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_46[iStack_18] = 0;
uStack_c = func_0x00400d10(auStack_46);
}
}
if (iStack_14 != -1) {
func_0x00400c60(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400c60(iStack_10);
}
uStack_1c = uStack_c;
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_badSink(uStack_c);
return;
}
| ['gcc'] |
15,429 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62747/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
15,430 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_badSink(CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67_structType myStruct)
{
int data = myStruct.structFirst;
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62747/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_badSink(int param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = param_1;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (param_1 < 0) {
printLine(&UNK_00401558);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,431 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_goodG2BSink(CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67_structType myStruct)
{
int data = myStruct.structFirst;
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62747/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_goodG2BSink(int param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = param_1;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (param_1 < 0) {
printLine(&UNK_00401628);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,432 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_goodB2GSink(CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67_structType myStruct)
{
int data = myStruct.structFirst;
{
int i;
int buffer[10] = { 0 };
/* FIX: Properly validate the array index and prevent a buffer overflow */
if (data >= 0 && data < (10))
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is out-of-bounds");
}
}
} | ['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62747/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_goodB2GSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_67b_goodB2GSink(int param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = param_1;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if ((param_1 < 0) || (9 < param_1)) {
printLine(&UNK_00401648);
}
else {
*(undefined4 *)((long)&uStack_38 + (long)param_1 * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,433 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = 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 listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, 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 (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_badData = data;
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_badSink();
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62748/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_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;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d40(2,1,6);
if (iStack_14 != -1) {
func_0x00400c50(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c30(0x6987);
iVar1 = func_0x00400cf0(iStack_14,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400ce0(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d00(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c00(iStack_10,auStack_36,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_36[iStack_18] = 0;
uStack_c = func_0x00400d10(auStack_36);
}
}
if (iStack_14 != -1) {
func_0x00400c60(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400c60(iStack_10);
}
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_badData = uStack_c;
CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_badSink();
return;
}
| ['gcc'] |
15,434 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62748/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68a.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
15,435 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_badSink()
{
int data = CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_badData;
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | ['CWE121', 'CWE129'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62748/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_badSink(void)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_badData;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_badData < 0) {
printLine(&UNK_00401558);
}
else {
*(undefined4 *)
((long)&uStack_38 +
(long)CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_badData * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,436 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_goodG2BSink()
{
int data = CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_goodG2BData;
{
int i;
int buffer[10] = { 0 };
/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound
* This code does check to see if the array index is negative */
if (data >= 0)
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is negative.");
}
}
} | ['/* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\r\n * This code does check to see if the array index is negative */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62748/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_goodG2BSink(void)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_goodG2BData;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if (CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_goodG2BData < 0) {
printLine(&UNK_00401628);
}
else {
*(undefined4 *)
((long)&uStack_38 +
(long)CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_goodG2BData * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,437 | void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_goodB2GSink()
{
int data = CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_goodB2GData;
{
int i;
int buffer[10] = { 0 };
/* FIX: Properly validate the array index and prevent a buffer overflow */
if (data >= 0 && data < (10))
{
buffer[data] = 1;
/* Print the array values */
for(i = 0; i < 10; i++)
{
printIntLine(buffer[i]);
}
}
else
{
printLine("ERROR: Array index is out-of-bounds");
}
}
} | ['/* FIX: Properly validate the array index and prevent a buffer overflow */', '/* Print the array values */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62748/CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b.c | CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_goodB2GSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68b_goodB2GSink(void)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
iStack_10 = CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_goodB2GData;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
if ((CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_goodB2GData < 0) ||
(9 < CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_goodB2GData)) {
printLine(&UNK_00401648);
}
else {
*(undefined4 *)
((long)&uStack_38 +
(long)CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_68_goodB2GData * 4) = 1;
for (iStack_c = 0; iStack_c < 10; iStack_c = iStack_c + 1) {
printIntLine(*(undefined4 *)((long)&uStack_38 + (long)iStack_c * 4));
}
}
return;
}
| ['gcc'] |
15,438 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_02_bad()
{
int * data;
data = NULL;
if(1)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62853/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_02.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_02_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_02_bad(void)
{
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puStack_10 = auStack_50;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(puStack_10,&uStack_38,0x28);
printIntLine(*puStack_10);
return;
}
| ['gcc'] |
15,439 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_02_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62853/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_02.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_02_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_02_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,440 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_03_bad()
{
int * data;
data = NULL;
if(5==5)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62854/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_03.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_03_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_03_bad(void)
{
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puStack_10 = auStack_50;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(puStack_10,&uStack_38,0x28);
printIntLine(*puStack_10);
return;
}
| ['gcc'] |
15,441 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_03_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62854/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_03.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_03_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_03_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,442 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_04_bad()
{
int * data;
data = NULL;
if(STATIC_CONST_TRUE)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62855/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_04.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_04_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_04_bad(void)
{
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puStack_10 = auStack_50;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(puStack_10,&uStack_38,0x28);
printIntLine(*puStack_10);
return;
}
| ['gcc'] |
15,443 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_04_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62855/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_04.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_04_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_04_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,444 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_05_bad()
{
int * data;
data = NULL;
if(staticTrue)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62856/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_05.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_05_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_05_bad(void)
{
undefined4 uVar1;
undefined8 *puVar2;
undefined auStack_58 [8];
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puVar2 = &uStack_38;
puStack_10 = (undefined4 *)0x0;
if (staticTrue != 0) {
puVar2 = (undefined8 *)auStack_58;
puStack_10 = auStack_50;
}
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c30;
func_0x00400a70(puStack_10,&uStack_38,0x28);
uVar1 = *puStack_10;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c3d;
printIntLine(uVar1);
return;
}
| ['gcc'] |
15,445 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_05_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62856/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_05.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_05_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_05_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,446 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_06_bad()
{
int * data;
data = NULL;
if(STATIC_CONST_FIVE==5)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62857/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_06.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_06_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_06_bad(void)
{
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puStack_10 = auStack_50;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(puStack_10,&uStack_38,0x28);
printIntLine(*puStack_10);
return;
}
| ['gcc'] |
15,447 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_06_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62857/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_06.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_06_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_06_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,448 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_07_bad()
{
int * data;
data = NULL;
if(staticFive==5)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62858/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_07.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_07_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_07_bad(void)
{
undefined4 uVar1;
undefined8 *puVar2;
undefined auStack_58 [8];
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puVar2 = &uStack_38;
puStack_10 = (undefined4 *)0x0;
if (staticFive == 5) {
puVar2 = (undefined8 *)auStack_58;
puStack_10 = auStack_50;
}
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c31;
func_0x00400a70(puStack_10,&uStack_38,0x28);
uVar1 = *puStack_10;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c3e;
printIntLine(uVar1);
return;
}
| ['gcc'] |
15,449 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_07_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62858/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_07.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_07_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_07_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,450 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_08_bad()
{
int * data;
data = NULL;
if(staticReturnsTrue())
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62859/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_08.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_08_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_08_bad(void)
{
undefined4 uVar1;
int iVar2;
undefined8 *puVar3;
undefined auStack_58 [8];
undefined4 auStack_50 [4];
undefined *puStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puVar3 = &uStack_38;
puStack_10 = (undefined4 *)0x0;
puStack_40 = &UNK_00400bd2;
iVar2 = staticReturnsTrue();
if (iVar2 != 0) {
puVar3 = (undefined8 *)auStack_58;
puStack_10 = auStack_50;
}
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
*(undefined **)((long)puVar3 + -8) = &UNK_00400c4a;
func_0x00400a70(puStack_10,&uStack_38,0x28);
uVar1 = *puStack_10;
*(undefined **)((long)puVar3 + -8) = &UNK_00400c57;
printIntLine(uVar1);
return;
}
| ['gcc'] |
15,451 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_08_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62859/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_08.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_08_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_08_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,452 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_09_bad()
{
int * data;
data = NULL;
if(GLOBAL_CONST_TRUE)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62860/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_09.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_09_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_09_bad(void)
{
undefined4 uVar1;
undefined8 *puVar2;
undefined auStack_58 [8];
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puVar2 = &uStack_38;
puStack_10 = (undefined4 *)0x0;
if (GLOBAL_CONST_TRUE != 0) {
puVar2 = (undefined8 *)auStack_58;
puStack_10 = auStack_50;
}
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c30;
func_0x00400a70(puStack_10,&uStack_38,0x28);
uVar1 = *puStack_10;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c3d;
printIntLine(uVar1);
return;
}
| ['gcc'] |
15,453 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_09_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62860/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_09.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_09_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_09_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,454 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_10_bad()
{
int * data;
data = NULL;
if(globalTrue)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62861/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_10.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_10_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_10_bad(void)
{
undefined4 uVar1;
undefined8 *puVar2;
undefined auStack_58 [8];
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puVar2 = &uStack_38;
puStack_10 = (undefined4 *)0x0;
if (globalTrue != 0) {
puVar2 = (undefined8 *)auStack_58;
puStack_10 = auStack_50;
}
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c30;
func_0x00400a70(puStack_10,&uStack_38,0x28);
uVar1 = *puStack_10;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c3d;
printIntLine(uVar1);
return;
}
| ['gcc'] |
15,455 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_10_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62861/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_10.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_10_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_10_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,456 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_11_bad()
{
int * data;
data = NULL;
if(globalReturnsTrue())
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62862/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_11.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_11_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_11_bad(void)
{
undefined4 uVar1;
int iVar2;
undefined8 *puVar3;
undefined auStack_58 [8];
undefined4 auStack_50 [4];
undefined *puStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puVar3 = &uStack_38;
puStack_10 = (undefined4 *)0x0;
puStack_40 = &UNK_00400bbc;
iVar2 = globalReturnsTrue();
if (iVar2 != 0) {
puVar3 = (undefined8 *)auStack_58;
puStack_10 = auStack_50;
}
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
*(undefined **)((long)puVar3 + -8) = &UNK_00400c34;
func_0x00400a70(puStack_10,&uStack_38,0x28);
uVar1 = *puStack_10;
*(undefined **)((long)puVar3 + -8) = &UNK_00400c41;
printIntLine(uVar1);
return;
}
| ['gcc'] |
15,457 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_11_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62862/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_11.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_11_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_11_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,458 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_12_bad()
{
int * data;
data = NULL;
if(globalReturnsTrueOrFalse())
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
else
{
/* FIX: Allocate memory using sizeof(int) */
data = (int *)ALLOCA(10*sizeof(int));
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* FIX: Allocate memory using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62863/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_12.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_12_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_12_bad(void)
{
undefined4 uVar1;
int iVar2;
undefined *puVar3;
undefined auStack_68 [8];
undefined4 auStack_60 [2];
undefined auStack_58 [8];
undefined4 auStack_50 [4];
undefined *puStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puStack_10 = (undefined4 *)0x0;
puStack_40 = &UNK_00400bbc;
iVar2 = globalReturnsTrueOrFalse();
if (iVar2 == 0) {
puVar3 = auStack_68;
puStack_10 = auStack_60;
}
else {
puVar3 = auStack_58;
puStack_10 = auStack_50;
}
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
*(undefined **)(puVar3 + -8) = &UNK_00400c6a;
func_0x00400a70(puStack_10,&uStack_38,0x28);
uVar1 = *puStack_10;
*(undefined **)(puVar3 + -8) = &UNK_00400c77;
printIntLine(uVar1);
return;
}
| ['gcc'] |
15,459 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_12_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62863/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_12.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_12_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_12_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
15,460 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_13_bad()
{
int * data;
data = NULL;
if(GLOBAL_CONST_FIVE==5)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62864/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_13.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_13_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_13_bad(void)
{
undefined4 uVar1;
undefined8 *puVar2;
undefined auStack_58 [8];
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puVar2 = &uStack_38;
puStack_10 = (undefined4 *)0x0;
if (GLOBAL_CONST_FIVE == 5) {
puVar2 = (undefined8 *)auStack_58;
puStack_10 = auStack_50;
}
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c31;
func_0x00400a70(puStack_10,&uStack_38,0x28);
uVar1 = *puStack_10;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c3e;
printIntLine(uVar1);
return;
}
| ['gcc'] |
15,461 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_13_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62864/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_13.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_13_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_13_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,462 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_14_bad()
{
int * data;
data = NULL;
if(globalFive==5)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62865/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_14.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_14_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_14_bad(void)
{
undefined4 uVar1;
undefined8 *puVar2;
undefined auStack_58 [8];
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puVar2 = &uStack_38;
puStack_10 = (undefined4 *)0x0;
if (globalFive == 5) {
puVar2 = (undefined8 *)auStack_58;
puStack_10 = auStack_50;
}
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c31;
func_0x00400a70(puStack_10,&uStack_38,0x28);
uVar1 = *puStack_10;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c3e;
printIntLine(uVar1);
return;
}
| ['gcc'] |
15,463 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_14_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62865/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_14.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_14_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_14_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,464 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_15_bad()
{
int * data;
data = NULL;
switch(6)
{
case 6:
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62866/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_15.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_15_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_15_bad(void)
{
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puStack_10 = auStack_50;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(puStack_10,&uStack_38,0x28);
printIntLine(*puStack_10);
return;
}
| ['gcc'] |
15,465 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_15_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62866/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_15.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_15_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_15_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,466 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_16_bad()
{
int * data;
data = NULL;
while(1)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
break;
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62867/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_16.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_16_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_16_bad(void)
{
undefined4 auStack_50 [6];
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puStack_10 = auStack_50;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(puStack_10,&uStack_38,0x28);
printIntLine(*puStack_10);
return;
}
| ['gcc'] |
15,467 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_16_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62867/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_16.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_16_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_16_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
15,468 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_17_bad()
{
int i;
int * data;
data = NULL;
for(i = 0; i < 1; i++)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62868/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_17.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_17_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_17_bad(void)
{
undefined4 uVar1;
undefined8 *puVar2;
undefined8 auStack_50 [4];
undefined8 uStack_30;
undefined8 uStack_28;
undefined4 *puStack_18;
int iStack_c;
puStack_18 = (undefined4 *)0x0;
puVar2 = auStack_50 + 1;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
puStack_18 = (undefined4 *)((ulong)((long)puVar2 + -0x11) & 0xfffffffffffffff0);
puVar2 = (undefined8 *)((long)puVar2 + -0x20);
}
auStack_50[1] = 0;
auStack_50[2] = 0;
auStack_50[3] = 0;
uStack_30 = 0;
uStack_28 = 0;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c39;
func_0x00400a70(puStack_18,auStack_50 + 1,0x28);
uVar1 = *puStack_18;
*(undefined **)((long)puVar2 + -8) = &UNK_00400c46;
printIntLine(uVar1);
return;
}
| ['gcc'] |
15,469 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_17_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62868/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_17.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_17_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_17_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
15,470 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_21_bad()
{
int * data;
data = NULL;
badStatic = 1; /* true */
data = badSource(data);
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* true */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62870/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_21.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_21_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_21_bad(void)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puStack_10 = (undefined4 *)0x0;
badStatic = 1;
puStack_10 = (undefined4 *)badSource(0);
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(puStack_10,&uStack_38,0x28);
printIntLine(*puStack_10);
return;
}
| ['gcc'] |
15,471 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_21_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62870/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_21.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_21_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_21_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,472 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_bad()
{
int * data;
data = NULL;
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_badGlobal = 1; /* true */
data = CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_badSource(data);
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* true */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62871/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22a.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_bad(void)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puStack_10 = (undefined4 *)0x0;
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_badGlobal = 1;
puStack_10 = (undefined4 *)CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_badSource(0);
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(puStack_10,&uStack_38,0x28);
printIntLine(*puStack_10);
return;
}
| ['gcc'] |
15,473 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62871/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22a.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
15,474 | int * CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_badSource(int * data)
{
if(CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_badGlobal)
{
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
}
return data;
} | ['/* FLAW: Allocate memory without using sizeof(int) */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62871/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22b.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_badSource |
undefined * CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_badSource(undefined *param_1)
{
undefined auStack_30 [32];
undefined *puStack_10;
puStack_10 = param_1;
if (CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_badGlobal != 0) {
puStack_10 = auStack_30;
}
return puStack_10;
}
| ['gcc'] |
15,475 | int * CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_goodG2B1Source(int * data)
{
if(CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_goodG2B1Global)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
/* FIX: Allocate memory using sizeof(int) */
data = (int *)ALLOCA(10*sizeof(int));
}
return data;
} | ['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Allocate memory using sizeof(int) */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62871/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22b.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_goodG2B1Source |
undefined * CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_goodG2B1Source(undefined *param_1)
{
undefined auStack_40 [32];
undefined *puStack_20;
undefined *puStack_10;
if (CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_goodG2B1Global == 0) {
puStack_10 = auStack_40;
}
else {
puStack_20 = &UNK_00400bc2;
puStack_10 = param_1;
printLine(&UNK_004012d4);
}
return puStack_10;
}
| ['gcc'] |
15,476 | int * CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_goodG2B2Source(int * data)
{
if(CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_goodG2B2Global)
{
/* FIX: Allocate memory using sizeof(int) */
data = (int *)ALLOCA(10*sizeof(int));
}
return data;
} | ['/* FIX: Allocate memory using sizeof(int) */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62871/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22b.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_goodG2B2Source |
undefined * CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_goodG2B2Source(undefined *param_1)
{
undefined auStack_40 [48];
undefined *puStack_10;
puStack_10 = param_1;
if (CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_22_goodG2B2Global != 0) {
puStack_10 = auStack_40;
}
return puStack_10;
}
| ['gcc'] |
15,477 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_31_bad()
{
int * data;
data = NULL;
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
{
int * dataCopy = data;
int * data = dataCopy;
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62872/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_31.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_31_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_31_bad(void)
{
undefined4 auStack_60 [6];
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined4 *puStack_20;
undefined4 *puStack_18;
undefined4 *puStack_10;
puStack_20 = auStack_60;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_18 = puStack_20;
puStack_10 = puStack_20;
func_0x00400a70(puStack_20,&uStack_48,0x28);
printIntLine(*puStack_20);
return;
}
| ['gcc'] |
15,478 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_31_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62872/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_31.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_31_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_31_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
15,479 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_32_bad()
{
int * data;
int * *dataPtr1 = &data;
int * *dataPtr2 = &data;
data = NULL;
{
int * data = *dataPtr1;
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
*dataPtr1 = data;
}
{
int * data = *dataPtr2;
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62873/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_32.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_32_bad |
/* WARNING: Heritage AFTER dead removal. Example location: s0xffffffffffffffd0 : 0x00400c10 */
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_32_bad(void)
{
undefined4 auStack_70 [6];
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined4 *puStack_30;
undefined4 *puStack_28;
undefined4 *puStack_20;
undefined4 **ppuStack_18;
undefined4 **ppuStack_10;
ppuStack_10 = &puStack_30;
ppuStack_18 = &puStack_30;
puStack_30 = auStack_70;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_28 = puStack_30;
puStack_20 = puStack_30;
func_0x00400a70(puStack_30,&uStack_58,0x28);
printIntLine(*puStack_28);
return;
}
| ['gcc'] |
15,480 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_32_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62873/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_32.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_32_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_32_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
15,481 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_34_bad()
{
int * data;
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_34_unionType myUnion;
data = NULL;
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
myUnion.unionFirst = data;
{
int * data = myUnion.unionSecond;
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
}
} | ['/* FLAW: Allocate memory without using sizeof(int) */', '/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62875/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_34.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_34_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_34_bad(void)
{
undefined4 auStack_60 [6];
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined4 *puStack_20;
undefined4 *puStack_18;
undefined4 *puStack_10;
puStack_20 = auStack_60;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
puStack_18 = puStack_20;
puStack_10 = puStack_20;
func_0x00400a70(puStack_20,&uStack_48,0x28);
printIntLine(*puStack_18);
return;
}
| ['gcc'] |
15,482 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_34_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62875/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_34.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_34_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_34_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
15,483 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_badSink(int * data)
{
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62876/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_badSink(undefined4 *param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(param_1,&uStack_38,0x28);
printIntLine(*param_1);
return;
}
| ['gcc'] |
15,484 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_bad()
{
int * data;
data = NULL;
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_badSink(data);
} | ['/* FLAW: Allocate memory without using sizeof(int) */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62876/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_bad(undefined8 param_1,undefined8 param_2)
{
undefined auStack_30 [32];
undefined *puStack_10;
puStack_10 = auStack_30;
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_badSink(puStack_10,param_2,1);
return;
}
| ['gcc'] |
15,485 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_goodG2BSink(int * data)
{
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62876/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_goodG2BSink(undefined4 *param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(param_1,&uStack_38,0x28);
printIntLine(*param_1);
return;
}
| ['gcc'] |
15,486 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62876/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_41_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
15,487 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_42_bad()
{
int * data;
data = NULL;
data = badSource(data);
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62877/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_42.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_42_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_42_bad(void)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
undefined4 *puStack_10;
puStack_10 = (undefined4 *)0x0;
puStack_10 = (undefined4 *)badSource(0);
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(puStack_10,&uStack_38,0x28);
printIntLine(*puStack_10);
return;
}
| ['gcc'] |
15,488 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_42_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62877/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_42.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_42_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_42_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
15,489 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51_bad()
{
int * data;
data = NULL;
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51b_badSink(data);
} | ['/* FLAW: Allocate memory without using sizeof(int) */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62881/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51a.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51_bad(undefined8 param_1,undefined8 param_2)
{
undefined auStack_30 [32];
undefined *puStack_10;
puStack_10 = auStack_30;
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51b_badSink(puStack_10,param_2,1);
return;
}
| ['gcc'] |
15,490 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62881/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51a.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
15,491 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51b_badSink(int * data)
{
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62881/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51b.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51b_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51b_badSink(undefined4 *param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(param_1,&uStack_38,0x28);
printIntLine(*param_1);
return;
}
| ['gcc'] |
15,492 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51b_goodG2BSink(int * data)
{
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62881/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51b.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51b_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_51b_goodG2BSink(undefined4 *param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(param_1,&uStack_38,0x28);
printIntLine(*param_1);
return;
}
| ['gcc'] |
15,493 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52_bad()
{
int * data;
data = NULL;
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_badSink(data);
} | ['/* FLAW: Allocate memory without using sizeof(int) */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62882/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52a.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52_bad(undefined8 param_1,undefined8 param_2)
{
undefined auStack_30 [32];
undefined *puStack_10;
puStack_10 = auStack_30;
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_badSink(puStack_10,param_2,1);
return;
}
| ['gcc'] |
15,494 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62882/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52a.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52_good |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
15,495 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_badSink(int * data)
{
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_badSink(data);
} | [] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62882/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_badSink(undefined8 param_1)
{
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_badSink(param_1);
return;
}
| ['gcc'] |
15,496 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_goodG2BSink(int * data)
{
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62882/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_goodG2BSink(undefined8 param_1)
{
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
15,497 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_badSink(int * data)
{
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62882/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_badSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_badSink(undefined4 *param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(param_1,&uStack_38,0x28);
printIntLine(*param_1);
return;
}
| ['gcc'] |
15,498 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_goodG2BSink(int * data)
{
{
int source[10] = {0};
/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */
memcpy(data, source, 10*sizeof(int));
printIntLine(data[0]);
}
} | ['/* POTENTIAL FLAW: Possible buffer overflow if data was not allocated correctly in the source */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62882/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_goodG2BSink |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_goodG2BSink(undefined4 *param_1)
{
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined8 uStack_18;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a70(param_1,&uStack_38,0x28);
printIntLine(*param_1);
return;
}
| ['gcc'] |
15,499 | void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_53_bad()
{
int * data;
data = NULL;
/* FLAW: Allocate memory without using sizeof(int) */
data = (int *)ALLOCA(10);
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_53b_badSink(data);
} | ['/* FLAW: Allocate memory without using sizeof(int) */'] | ['CWE121', 'CWE131'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/62883/CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_53a.c | CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_53_bad |
void CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_53_bad(undefined8 param_1,undefined8 param_2)
{
undefined auStack_30 [32];
undefined *puStack_10;
puStack_10 = auStack_30;
CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_53b_badSink(puStack_10,param_2,1);
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.