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 |
|---|---|---|---|---|---|---|---|---|
10,700 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_54e_badSink(wchar_t * data)
{
/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the
* memory block not at the start of the buffer */
for (; *data != L'\0'; data++)
{
if (*data == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
} | ['/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the\r\n * memory block not at the start of the buffer */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113079/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_54e.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_54e_badSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_54e_badSink(int *param_1)
{
int *piStack_10;
piStack_10 = param_1;
do {
if (*piStack_10 == 0) {
code_r0x00400f36:
func_0x00400cb0(piStack_10);
return;
}
if (*piStack_10 == 0x53) {
printLine(&UNK_004016f4);
goto code_r0x00400f36;
}
piStack_10 = piStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,701 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_54e_goodB2GSink(wchar_t * data)
{
{
size_t i;
/* FIX: Use a loop variable to traverse through the string pointed to by data */
for (i=0; i < wcslen(data); i++)
{
if (data[i] == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
}
} | ['/* FIX: Use a loop variable to traverse through the string pointed to by data */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113079/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_54e.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_54e_goodB2GSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_54e_goodB2GSink(long param_1)
{
ulong uVar1;
ulong uStack_10;
uStack_10 = 0;
do {
uVar1 = func_0x00400d10(param_1);
if (uVar1 <= uStack_10) {
code_r0x00400f55:
func_0x00400cb0(param_1);
return;
}
if (*(int *)(param_1 + uStack_10 * 4) == 0x53) {
printLine(&UNK_00401724);
goto code_r0x00400f55;
}
uStack_10 = uStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,702 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61_bad()
{
wchar_t * data;
data = (wchar_t *)malloc(100*sizeof(wchar_t));
data[0] = L'\0';
data = CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61b_badSource(data);
/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the
* memory block not at the start of the buffer */
for (; *data != L'\0'; data++)
{
if (*data == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
} | ['/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the\r\n * memory block not at the start of the buffer */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113080/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61_bad |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61_bad(void)
{
undefined4 *puVar1;
int *piStack_10;
puVar1 = (undefined4 *)func_0x00400d90(400);
*puVar1 = 0;
piStack_10 = (int *)CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61b_badSource
(puVar1);
do {
if (*piStack_10 == 0) {
code_r0x00400f5a:
func_0x00400cb0(piStack_10);
return;
}
if (*piStack_10 == 0x53) {
printLine(&UNK_004016b4);
goto code_r0x00400f5a;
}
piStack_10 = piStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,703 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113080/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61_good |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,704 | wchar_t * CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61b_badSource(wchar_t * data)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
wchar_t *replace;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
size_t dataLen = wcslen(data);
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, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(wchar_t)] = L'\0';
/* Eliminate CRLF */
replace = wcschr(data, L'\r');
if (replace)
{
*replace = L'\0';
}
replace = wcschr(data, L'\n');
if (replace)
{
*replace = L'\0';
}
}
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 */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113080/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61b_badSource |
long CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61b_badSource(long param_1)
{
int iVar1;
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_10;
int iStack_c;
iStack_10 = 0xffffffff;
iStack_c = -1;
lStack_18 = func_0x00400d10(param_1);
iStack_10 = func_0x00400e20(2,1,6);
if (iStack_10 != -1) {
func_0x00400d20(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = 0;
uStack_36 = func_0x00400cf0(0x6987);
iVar1 = func_0x00400dd0(iStack_10,&uStack_38,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400dc0(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400df0(iStack_10,0,0), iStack_c != -1)) &&
((iStack_1c = func_0x00400cc0(iStack_c,lStack_18 * 4 + param_1,(99 - lStack_18) * 4,0),
iStack_1c != -1 && (iStack_1c != 0)))) {
*(undefined4 *)(param_1 + (lStack_18 + ((ulong)(long)iStack_1c >> 2)) * 4) = 0;
puStack_28 = (undefined4 *)func_0x00400de0(param_1,0xd);
if (puStack_28 != (undefined4 *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined4 *)func_0x00400de0(param_1,10);
if (puStack_28 != (undefined4 *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_10 != -1) {
func_0x00400d30(iStack_10);
}
if (iStack_c != -1) {
func_0x00400d30(iStack_c);
}
return param_1;
}
| ['gcc'] |
10,705 | wchar_t * CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61b_goodB2GSource(wchar_t * data)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
wchar_t *replace;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
size_t dataLen = wcslen(data);
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, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(wchar_t)] = L'\0';
/* Eliminate CRLF */
replace = wcschr(data, L'\r');
if (replace)
{
*replace = L'\0';
}
replace = wcschr(data, L'\n');
if (replace)
{
*replace = L'\0';
}
}
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 */', '/* Append null terminator */', '/* Eliminate CRLF */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113080/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61b_goodB2GSource |
long CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_61b_goodB2GSource
(long param_1)
{
int iVar1;
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_10;
int iStack_c;
iStack_10 = 0xffffffff;
iStack_c = -1;
lStack_18 = func_0x00400d10(param_1);
iStack_10 = func_0x00400e20(2,1,6);
if (iStack_10 != -1) {
func_0x00400d20(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = 0;
uStack_36 = func_0x00400cf0(0x6987);
iVar1 = func_0x00400dd0(iStack_10,&uStack_38,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400dc0(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400df0(iStack_10,0,0), iStack_c != -1)) &&
((iStack_1c = func_0x00400cc0(iStack_c,lStack_18 * 4 + param_1,(99 - lStack_18) * 4,0),
iStack_1c != -1 && (iStack_1c != 0)))) {
*(undefined4 *)(param_1 + (lStack_18 + ((ulong)(long)iStack_1c >> 2)) * 4) = 0;
puStack_28 = (undefined4 *)func_0x00400de0(param_1,0xd);
if (puStack_28 != (undefined4 *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined4 *)func_0x00400de0(param_1,10);
if (puStack_28 != (undefined4 *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_10 != -1) {
func_0x00400d30(iStack_10);
}
if (iStack_c != -1) {
func_0x00400d30(iStack_c);
}
return param_1;
}
| ['gcc'] |
10,706 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63_bad()
{
wchar_t * data;
data = (wchar_t *)malloc(100*sizeof(wchar_t));
data[0] = L'\0';
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
wchar_t *replace;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
size_t dataLen = wcslen(data);
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, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(wchar_t)] = L'\0';
/* Eliminate CRLF */
replace = wcschr(data, L'\r');
if (replace)
{
*replace = L'\0';
}
replace = wcschr(data, L'\n');
if (replace)
{
*replace = L'\0';
}
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63b_badSink(&data);
} | ['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113082/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63_bad |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63_bad(void)
{
int iVar1;
undefined2 uStack_48;
undefined2 uStack_46;
undefined4 uStack_44;
undefined4 *puStack_30;
undefined4 *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_10;
int iStack_c;
puStack_30 = (undefined4 *)func_0x00400d90(400);
*puStack_30 = 0;
iStack_10 = 0xffffffff;
iStack_c = -1;
lStack_18 = func_0x00400d10(puStack_30);
iStack_10 = func_0x00400e20(2,1,6);
if (iStack_10 != -1) {
func_0x00400d20(&uStack_48,0,0x10);
uStack_48 = 2;
uStack_44 = 0;
uStack_46 = func_0x00400cf0(0x6987);
iVar1 = func_0x00400dd0(iStack_10,&uStack_48,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400dc0(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400df0(iStack_10,0,0), iStack_c != -1)) &&
((iStack_1c = func_0x00400cc0(iStack_c,puStack_30 + lStack_18,(99 - lStack_18) * 4,0),
iStack_1c != -1 && (iStack_1c != 0)))) {
puStack_30[lStack_18 + ((ulong)(long)iStack_1c >> 2)] = 0;
puStack_28 = (undefined4 *)func_0x00400de0(puStack_30,0xd);
if (puStack_28 != (undefined4 *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined4 *)func_0x00400de0(puStack_30,10);
if (puStack_28 != (undefined4 *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_10 != -1) {
func_0x00400d30(iStack_10);
}
if (iStack_c != -1) {
func_0x00400d30(iStack_c);
}
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63b_badSink(&puStack_30);
return;
}
| ['gcc'] |
10,707 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113082/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63_good |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,708 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63b_badSink(wchar_t * * dataPtr)
{
wchar_t * data = *dataPtr;
/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the
* memory block not at the start of the buffer */
for (; *data != L'\0'; data++)
{
if (*data == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
} | ['/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the\r\n * memory block not at the start of the buffer */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113082/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63b_badSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63b_badSink(int **param_1)
{
int *piStack_10;
piStack_10 = *param_1;
do {
if (*piStack_10 == 0) {
code_r0x00400f41:
func_0x00400cb0(piStack_10);
return;
}
if (*piStack_10 == 0x53) {
printLine(&UNK_004016a4);
goto code_r0x00400f41;
}
piStack_10 = piStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,709 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63b_goodB2GSink(wchar_t * * dataPtr)
{
wchar_t * data = *dataPtr;
{
size_t i;
/* FIX: Use a loop variable to traverse through the string pointed to by data */
for (i=0; i < wcslen(data); i++)
{
if (data[i] == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
}
} | ['/* FIX: Use a loop variable to traverse through the string pointed to by data */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113082/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63b_goodB2GSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_63b_goodB2GSink
(long *param_1)
{
long lVar1;
ulong uVar2;
ulong uStack_10;
lVar1 = *param_1;
uStack_10 = 0;
do {
uVar2 = func_0x00400d10(lVar1);
if (uVar2 <= uStack_10) {
code_r0x00400f60:
func_0x00400cb0(lVar1);
return;
}
if (*(int *)(lVar1 + uStack_10 * 4) == 0x53) {
printLine(&UNK_004016d4);
goto code_r0x00400f60;
}
uStack_10 = uStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,710 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64_bad()
{
wchar_t * data;
data = (wchar_t *)malloc(100*sizeof(wchar_t));
data[0] = L'\0';
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
wchar_t *replace;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
size_t dataLen = wcslen(data);
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, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(wchar_t)] = L'\0';
/* Eliminate CRLF */
replace = wcschr(data, L'\r');
if (replace)
{
*replace = L'\0';
}
replace = wcschr(data, L'\n');
if (replace)
{
*replace = L'\0';
}
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64b_badSink(&data);
} | ['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113083/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64_bad |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64_bad(void)
{
int iVar1;
undefined2 uStack_48;
undefined2 uStack_46;
undefined4 uStack_44;
undefined4 *puStack_30;
undefined4 *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_10;
int iStack_c;
puStack_30 = (undefined4 *)func_0x00400d90(400);
*puStack_30 = 0;
iStack_10 = 0xffffffff;
iStack_c = -1;
lStack_18 = func_0x00400d10(puStack_30);
iStack_10 = func_0x00400e20(2,1,6);
if (iStack_10 != -1) {
func_0x00400d20(&uStack_48,0,0x10);
uStack_48 = 2;
uStack_44 = 0;
uStack_46 = func_0x00400cf0(0x6987);
iVar1 = func_0x00400dd0(iStack_10,&uStack_48,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400dc0(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400df0(iStack_10,0,0), iStack_c != -1)) &&
((iStack_1c = func_0x00400cc0(iStack_c,puStack_30 + lStack_18,(99 - lStack_18) * 4,0),
iStack_1c != -1 && (iStack_1c != 0)))) {
puStack_30[lStack_18 + ((ulong)(long)iStack_1c >> 2)] = 0;
puStack_28 = (undefined4 *)func_0x00400de0(puStack_30,0xd);
if (puStack_28 != (undefined4 *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined4 *)func_0x00400de0(puStack_30,10);
if (puStack_28 != (undefined4 *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_10 != -1) {
func_0x00400d30(iStack_10);
}
if (iStack_c != -1) {
func_0x00400d30(iStack_c);
}
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64b_badSink(&puStack_30);
return;
}
| ['gcc'] |
10,711 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113083/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64_good |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,712 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64b_badSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
wchar_t * * dataPtr = (wchar_t * *)dataVoidPtr;
/* dereference dataPtr into data */
wchar_t * data = (*dataPtr);
/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the
* memory block not at the start of the buffer */
for (; *data != L'\0'; data++)
{
if (*data == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the\r\n * memory block not at the start of the buffer */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113083/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64b_badSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64b_badSink(int **param_1)
{
int *piStack_10;
piStack_10 = *param_1;
do {
if (*piStack_10 == 0) {
code_r0x00400f49:
func_0x00400cb0(piStack_10);
return;
}
if (*piStack_10 == 0x53) {
printLine(&UNK_004016b4);
goto code_r0x00400f49;
}
piStack_10 = piStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,713 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64b_goodB2GSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
wchar_t * * dataPtr = (wchar_t * *)dataVoidPtr;
/* dereference dataPtr into data */
wchar_t * data = (*dataPtr);
{
size_t i;
/* FIX: Use a loop variable to traverse through the string pointed to by data */
for (i=0; i < wcslen(data); i++)
{
if (data[i] == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* FIX: Use a loop variable to traverse through the string pointed to by data */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113083/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64b_goodB2GSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_64b_goodB2GSink
(long *param_1)
{
long lVar1;
ulong uVar2;
ulong uStack_10;
lVar1 = *param_1;
uStack_10 = 0;
do {
uVar2 = func_0x00400d10(lVar1);
if (uVar2 <= uStack_10) {
code_r0x00400f68:
func_0x00400cb0(lVar1);
return;
}
if (*(int *)(lVar1 + uStack_10 * 4) == 0x53) {
printLine(&UNK_004016e4);
goto code_r0x00400f68;
}
uStack_10 = uStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,714 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65_bad()
{
wchar_t * data;
/* define a function pointer */
void (*funcPtr) (wchar_t *) = CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65b_badSink;
data = (wchar_t *)malloc(100*sizeof(wchar_t));
data[0] = L'\0';
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
wchar_t *replace;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
size_t dataLen = wcslen(data);
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, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(wchar_t)] = L'\0';
/* Eliminate CRLF */
replace = wcschr(data, L'\r');
if (replace)
{
*replace = L'\0';
}
replace = wcschr(data, L'\n');
if (replace)
{
*replace = L'\0';
}
}
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 */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* use the function pointer */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113084/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65_bad |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65_bad(void)
{
int iVar1;
undefined2 uStack_58;
undefined2 uStack_56;
undefined4 uStack_54;
undefined4 *puStack_40;
int iStack_34;
long lStack_30;
int iStack_24;
undefined4 *puStack_20;
code *pcStack_18;
int iStack_c;
pcStack_18 = CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65b_badSink;
puStack_20 = (undefined4 *)func_0x00400d90(400);
*puStack_20 = 0;
iStack_24 = 0xffffffff;
iStack_c = -1;
lStack_30 = func_0x00400d10(puStack_20);
iStack_24 = func_0x00400e20(2,1,6);
if (iStack_24 != -1) {
func_0x00400d20(&uStack_58,0,0x10);
uStack_58 = 2;
uStack_54 = 0;
uStack_56 = func_0x00400cf0(0x6987);
iVar1 = func_0x00400dd0(iStack_24,&uStack_58,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400dc0(iStack_24,5), iVar1 != -1)) &&
(iStack_c = func_0x00400df0(iStack_24,0,0), iStack_c != -1)) &&
((iStack_34 = func_0x00400cc0(iStack_c,puStack_20 + lStack_30,(99 - lStack_30) * 4,0),
iStack_34 != -1 && (iStack_34 != 0)))) {
puStack_20[lStack_30 + ((ulong)(long)iStack_34 >> 2)] = 0;
puStack_40 = (undefined4 *)func_0x00400de0(puStack_20,0xd);
if (puStack_40 != (undefined4 *)0x0) {
*puStack_40 = 0;
}
puStack_40 = (undefined4 *)func_0x00400de0(puStack_20,10);
if (puStack_40 != (undefined4 *)0x0) {
*puStack_40 = 0;
}
}
}
if (iStack_24 != -1) {
func_0x00400d30(iStack_24);
}
if (iStack_c != -1) {
func_0x00400d30(iStack_c);
}
(*pcStack_18)(puStack_20);
return;
}
| ['gcc'] |
10,715 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113084/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65_good |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,716 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65b_badSink(wchar_t * data)
{
/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the
* memory block not at the start of the buffer */
for (; *data != L'\0'; data++)
{
if (*data == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
} | ['/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the\r\n * memory block not at the start of the buffer */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113084/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65b_badSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65b_badSink(int *param_1)
{
int *piStack_10;
piStack_10 = param_1;
do {
if (*piStack_10 == 0) {
code_r0x00400f36:
func_0x00400cb0(piStack_10);
return;
}
if (*piStack_10 == 0x53) {
printLine(&UNK_004016b4);
goto code_r0x00400f36;
}
piStack_10 = piStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,717 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65b_goodB2GSink(wchar_t * data)
{
{
size_t i;
/* FIX: Use a loop variable to traverse through the string pointed to by data */
for (i=0; i < wcslen(data); i++)
{
if (data[i] == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
}
} | ['/* FIX: Use a loop variable to traverse through the string pointed to by data */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113084/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65b_goodB2GSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_65b_goodB2GSink(long param_1)
{
ulong uVar1;
ulong uStack_10;
uStack_10 = 0;
do {
uVar1 = func_0x00400d10(param_1);
if (uVar1 <= uStack_10) {
code_r0x00400f55:
func_0x00400cb0(param_1);
return;
}
if (*(int *)(param_1 + uStack_10 * 4) == 0x53) {
printLine(&UNK_004016e4);
goto code_r0x00400f55;
}
uStack_10 = uStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,718 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66_bad()
{
wchar_t * data;
wchar_t * dataArray[5];
data = (wchar_t *)malloc(100*sizeof(wchar_t));
data[0] = L'\0';
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
wchar_t *replace;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
size_t dataLen = wcslen(data);
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, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(wchar_t)] = L'\0';
/* Eliminate CRLF */
replace = wcschr(data, L'\r');
if (replace)
{
*replace = L'\0';
}
replace = wcschr(data, L'\n');
if (replace)
{
*replace = L'\0';
}
}
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;
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66b_badSink(dataArray);
} | ['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* put data in array */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113085/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66_bad |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66_bad(void)
{
int iVar1;
undefined2 uStack_78;
undefined2 uStack_76;
undefined4 uStack_74;
undefined auStack_68 [16];
undefined4 *puStack_58;
undefined4 *puStack_38;
int iStack_2c;
long lStack_28;
int iStack_1c;
undefined4 *puStack_18;
int iStack_c;
puStack_18 = (undefined4 *)func_0x00400d90(400);
*puStack_18 = 0;
iStack_1c = 0xffffffff;
iStack_c = -1;
lStack_28 = func_0x00400d10(puStack_18);
iStack_1c = func_0x00400e20(2,1,6);
if (iStack_1c != -1) {
func_0x00400d20(&uStack_78,0,0x10);
uStack_78 = 2;
uStack_74 = 0;
uStack_76 = func_0x00400cf0(0x6987);
iVar1 = func_0x00400dd0(iStack_1c,&uStack_78,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400dc0(iStack_1c,5), iVar1 != -1)) &&
(iStack_c = func_0x00400df0(iStack_1c,0,0), iStack_c != -1)) &&
((iStack_2c = func_0x00400cc0(iStack_c,puStack_18 + lStack_28,(99 - lStack_28) * 4,0),
iStack_2c != -1 && (iStack_2c != 0)))) {
puStack_18[lStack_28 + ((ulong)(long)iStack_2c >> 2)] = 0;
puStack_38 = (undefined4 *)func_0x00400de0(puStack_18,0xd);
if (puStack_38 != (undefined4 *)0x0) {
*puStack_38 = 0;
}
puStack_38 = (undefined4 *)func_0x00400de0(puStack_18,10);
if (puStack_38 != (undefined4 *)0x0) {
*puStack_38 = 0;
}
}
}
if (iStack_1c != -1) {
func_0x00400d30(iStack_1c);
}
if (iStack_c != -1) {
func_0x00400d30(iStack_c);
}
puStack_58 = puStack_18;
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66b_badSink(auStack_68);
return;
}
| ['gcc'] |
10,719 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113085/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66_good |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,720 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66b_badSink(wchar_t * dataArray[])
{
/* copy data out of dataArray */
wchar_t * data = dataArray[2];
/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the
* memory block not at the start of the buffer */
for (; *data != L'\0'; data++)
{
if (*data == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
} | ['/* copy data out of dataArray */', '/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the\r\n * memory block not at the start of the buffer */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113085/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66b_badSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66b_badSink(long param_1)
{
int *piStack_10;
piStack_10 = *(int **)(param_1 + 0x10);
do {
if (*piStack_10 == 0) {
code_r0x00400f42:
func_0x00400cb0(piStack_10);
return;
}
if (*piStack_10 == 0x53) {
printLine(&UNK_004016b4);
goto code_r0x00400f42;
}
piStack_10 = piStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,721 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66b_goodB2GSink(wchar_t * dataArray[])
{
wchar_t * data = dataArray[2];
{
size_t i;
/* FIX: Use a loop variable to traverse through the string pointed to by data */
for (i=0; i < wcslen(data); i++)
{
if (data[i] == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
}
} | ['/* FIX: Use a loop variable to traverse through the string pointed to by data */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113085/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66b_goodB2GSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_66b_goodB2GSink(long param_1)
{
long lVar1;
ulong uVar2;
ulong uStack_10;
lVar1 = *(long *)(param_1 + 0x10);
uStack_10 = 0;
do {
uVar2 = func_0x00400d10(lVar1);
if (uVar2 <= uStack_10) {
code_r0x00400f61:
func_0x00400cb0(lVar1);
return;
}
if (*(int *)(lVar1 + uStack_10 * 4) == 0x53) {
printLine(&UNK_004016e4);
goto code_r0x00400f61;
}
uStack_10 = uStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,722 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67_bad()
{
wchar_t * data;
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67_structType myStruct;
data = (wchar_t *)malloc(100*sizeof(wchar_t));
data[0] = L'\0';
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
wchar_t *replace;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
size_t dataLen = wcslen(data);
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, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(wchar_t)] = L'\0';
/* Eliminate CRLF */
replace = wcschr(data, L'\r');
if (replace)
{
*replace = L'\0';
}
replace = wcschr(data, L'\n');
if (replace)
{
*replace = L'\0';
}
}
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;
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67b_badSink(myStruct);
} | ['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113086/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67_bad |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67_bad(void)
{
int iVar1;
undefined2 uStack_58;
undefined2 uStack_56;
undefined4 uStack_54;
undefined4 *puStack_40;
undefined4 *puStack_38;
int iStack_2c;
long lStack_28;
int iStack_1c;
undefined4 *puStack_18;
int iStack_c;
puStack_18 = (undefined4 *)func_0x00400d90(400);
*puStack_18 = 0;
iStack_1c = 0xffffffff;
iStack_c = -1;
lStack_28 = func_0x00400d10(puStack_18);
iStack_1c = func_0x00400e20(2,1,6);
if (iStack_1c != -1) {
func_0x00400d20(&uStack_58,0,0x10);
uStack_58 = 2;
uStack_54 = 0;
uStack_56 = func_0x00400cf0(0x6987);
iVar1 = func_0x00400dd0(iStack_1c,&uStack_58,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400dc0(iStack_1c,5), iVar1 != -1)) &&
(iStack_c = func_0x00400df0(iStack_1c,0,0), iStack_c != -1)) &&
((iStack_2c = func_0x00400cc0(iStack_c,puStack_18 + lStack_28,(99 - lStack_28) * 4,0),
iStack_2c != -1 && (iStack_2c != 0)))) {
puStack_18[lStack_28 + ((ulong)(long)iStack_2c >> 2)] = 0;
puStack_38 = (undefined4 *)func_0x00400de0(puStack_18,0xd);
if (puStack_38 != (undefined4 *)0x0) {
*puStack_38 = 0;
}
puStack_38 = (undefined4 *)func_0x00400de0(puStack_18,10);
if (puStack_38 != (undefined4 *)0x0) {
*puStack_38 = 0;
}
}
}
if (iStack_1c != -1) {
func_0x00400d30(iStack_1c);
}
if (iStack_c != -1) {
func_0x00400d30(iStack_c);
}
puStack_40 = puStack_18;
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67b_badSink(puStack_18);
return;
}
| ['gcc'] |
10,723 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113086/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67_good |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,724 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67b_badSink(CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67_structType myStruct)
{
wchar_t * data = myStruct.structFirst;
/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the
* memory block not at the start of the buffer */
for (; *data != L'\0'; data++)
{
if (*data == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
} | ['/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the\r\n * memory block not at the start of the buffer */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113086/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67b_badSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67b_badSink(int *param_1)
{
int *piStack_10;
piStack_10 = param_1;
do {
if (*piStack_10 == 0) {
code_r0x00400f3e:
func_0x00400cb0(piStack_10);
return;
}
if (*piStack_10 == 0x53) {
printLine(&UNK_004016b4);
goto code_r0x00400f3e;
}
piStack_10 = piStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,725 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67b_goodB2GSink(CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67_structType myStruct)
{
wchar_t * data = myStruct.structFirst;
{
size_t i;
/* FIX: Use a loop variable to traverse through the string pointed to by data */
for (i=0; i < wcslen(data); i++)
{
if (data[i] == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
}
} | ['/* FIX: Use a loop variable to traverse through the string pointed to by data */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113086/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67b_goodB2GSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_67b_goodB2GSink(long param_1)
{
ulong uVar1;
ulong uStack_10;
uStack_10 = 0;
do {
uVar1 = func_0x00400d10(param_1);
if (uVar1 <= uStack_10) {
code_r0x00400f5d:
func_0x00400cb0(param_1);
return;
}
if (*(int *)(param_1 + uStack_10 * 4) == 0x53) {
printLine(&UNK_004016e4);
goto code_r0x00400f5d;
}
uStack_10 = uStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,726 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_bad()
{
wchar_t * data;
data = (wchar_t *)malloc(100*sizeof(wchar_t));
data[0] = L'\0';
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
wchar_t *replace;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
size_t dataLen = wcslen(data);
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, (char *)(data + dataLen), sizeof(wchar_t) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(wchar_t)] = L'\0';
/* Eliminate CRLF */
replace = wcschr(data, L'\r');
if (replace)
{
*replace = L'\0';
}
replace = wcschr(data, L'\n');
if (replace)
{
*replace = L'\0';
}
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_badDataForBadSink = data;
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68b_badSink();
} | ['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113087/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_bad |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_bad(void)
{
int iVar1;
undefined2 uStack_48;
undefined2 uStack_46;
undefined4 uStack_44;
undefined4 *puStack_38;
int iStack_2c;
long lStack_28;
int iStack_1c;
undefined4 *puStack_18;
int iStack_c;
puStack_18 = (undefined4 *)func_0x00400d90(400);
*puStack_18 = 0;
iStack_1c = 0xffffffff;
iStack_c = -1;
lStack_28 = func_0x00400d10(puStack_18);
iStack_1c = func_0x00400e20(2,1,6);
if (iStack_1c != -1) {
func_0x00400d20(&uStack_48,0,0x10);
uStack_48 = 2;
uStack_44 = 0;
uStack_46 = func_0x00400cf0(0x6987);
iVar1 = func_0x00400dd0(iStack_1c,&uStack_48,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400dc0(iStack_1c,5), iVar1 != -1)) &&
(iStack_c = func_0x00400df0(iStack_1c,0,0), iStack_c != -1)) &&
((iStack_2c = func_0x00400cc0(iStack_c,puStack_18 + lStack_28,(99 - lStack_28) * 4,0),
iStack_2c != -1 && (iStack_2c != 0)))) {
puStack_18[lStack_28 + ((ulong)(long)iStack_2c >> 2)] = 0;
puStack_38 = (undefined4 *)func_0x00400de0(puStack_18,0xd);
if (puStack_38 != (undefined4 *)0x0) {
*puStack_38 = 0;
}
puStack_38 = (undefined4 *)func_0x00400de0(puStack_18,10);
if (puStack_38 != (undefined4 *)0x0) {
*puStack_38 = 0;
}
}
}
if (iStack_1c != -1) {
func_0x00400d30(iStack_1c);
}
if (iStack_c != -1) {
func_0x00400d30(iStack_c);
}
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_badDataForBadSink =
puStack_18;
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68b_badSink();
return;
}
| ['gcc'] |
10,727 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113087/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68a.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_good |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,728 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68b_badSink()
{
wchar_t * data = CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_badDataForBadSink;
/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the
* memory block not at the start of the buffer */
for (; *data != L'\0'; data++)
{
if (*data == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
} | ['/* FLAW: We are incrementing the pointer in the loop - this will cause us to free the\r\n * memory block not at the start of the buffer */'] | ['CWE761'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113087/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68b_badSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68b_badSink(void)
{
int *piStack_10;
piStack_10 =
CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_badDataForBadSink;
do {
if (*piStack_10 == 0) {
code_r0x00400f3d:
func_0x00400cb0(piStack_10);
return;
}
if (*piStack_10 == 0x53) {
printLine(&UNK_004016b4);
goto code_r0x00400f3d;
}
piStack_10 = piStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,729 | void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68b_goodB2GSink()
{
wchar_t * data = CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_badDataForGoodSink;
{
size_t i;
/* FIX: Use a loop variable to traverse through the string pointed to by data */
for (i=0; i < wcslen(data); i++)
{
if (data[i] == SEARCH_CHAR)
{
printLine("We have a match!");
break;
}
}
free(data);
}
} | ['/* FIX: Use a loop variable to traverse through the string pointed to by data */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/113087/CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68b.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68b_goodB2GSink |
void CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68b_goodB2GSink(void)
{
long lVar1;
ulong uVar2;
ulong uStack_10;
lVar1 = CWE761_Free_Pointer_Not_at_Start_of_Buffer__wchar_t_listen_socket_68_badDataForGoodSink;
uStack_10 = 0;
do {
uVar2 = func_0x00400d10(lVar1);
if (uVar2 <= uStack_10) {
code_r0x00400f5c:
func_0x00400cb0(lVar1);
return;
}
if (*(int *)(lVar1 + uStack_10 * 4) == 0x53) {
printLine(&UNK_004016e4);
goto code_r0x00400f5c;
}
uStack_10 = uStack_10 + 1;
} while( true );
}
| ['gcc'] |
10,730 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_08_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
if(staticReturnsTrue())
{
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
}
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */', '/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116666/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_08.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_08_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_08_bad(void)
{
int iVar1;
long lVar2;
func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
lVar2 = func_0x00400ad0(&UNK_004011db,&UNK_004011c4);
if (lVar2 != 0) {
func_0x00400a40(lVar2);
}
}
return;
}
| ['gcc'] |
10,731 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_08_good()
{
goodB2G1();
goodB2G2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116666/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_08.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_08_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_08_good(void)
{
goodB2G1();
goodB2G2();
return;
}
| ['gcc'] |
10,732 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_11_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
if(globalReturnsTrue())
{
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
}
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */', '/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116669/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_11.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_11_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_11_bad(void)
{
int iVar1;
long lVar2;
func_0x00400ad0(&UNK_004011a7,&UNK_004011a4);
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
lVar2 = func_0x00400ad0(&UNK_004011bb,&UNK_004011a4);
if (lVar2 != 0) {
func_0x00400a40(lVar2);
}
}
return;
}
| ['gcc'] |
10,733 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_11_good()
{
goodB2G1();
goodB2G2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116669/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_11.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_11_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_11_good(void)
{
goodB2G1();
goodB2G2();
return;
}
| ['gcc'] |
10,734 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_12_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
if(globalReturnsTrueOrFalse())
{
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
}
else
{
/* FIX: Close the file from the source before pointing data to a new file handle */
if (data != NULL)
{
fclose(data);
}
data = fopen("GoodSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
}
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */', '/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */', '/* FIX: Close the file from the source before pointing data to a new file handle */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116670/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_12.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_12_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_12_bad(void)
{
int iVar1;
long lVar2;
lVar2 = func_0x00400ad0(&UNK_004011e7,&UNK_004011e4);
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
if (lVar2 != 0) {
func_0x00400a40(lVar2);
}
lVar2 = func_0x00400ad0(&UNK_0040120d,&UNK_004011e4);
if (lVar2 != 0) {
func_0x00400a40(lVar2);
}
}
else {
lVar2 = func_0x00400ad0(&UNK_004011fb,&UNK_004011e4);
if (lVar2 != 0) {
func_0x00400a40(lVar2);
}
}
return;
}
| ['gcc'] |
10,735 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_12_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116670/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_12.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_12_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_12_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,736 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_21_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
badStatic = 1; /* true */
badSink(data);
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */', '/* true */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116677/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_21.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_21_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_21_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011d9,&UNK_004011c4);
badStatic = 1;
badSink(uVar1);
return;
}
| ['gcc'] |
10,737 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_21_good()
{
goodB2G1();
goodB2G2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116677/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_21.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_21_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_21_good(void)
{
goodB2G1();
goodB2G2();
return;
}
| ['gcc'] |
10,738 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_badGlobal = 1; /* true */
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_badSink(data);
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */', '/* true */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116678/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_badGlobal = 1;
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_badSink(uVar1);
return;
}
| ['gcc'] |
10,739 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_good()
{
goodB2G1();
goodB2G2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116678/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_good(void)
{
goodB2G1();
goodB2G2();
return;
}
| ['gcc'] |
10,740 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_badSink(FILE * data)
{
if(CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_badGlobal)
{
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
}
} | ['/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116678/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_badSink(void)
{
long lVar1;
if (CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_badGlobal != 0) {
lVar1 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
}
return;
}
| ['gcc'] |
10,741 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_goodB2G1Sink(FILE * data)
{
if(CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_goodB2G1Global)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
/* FIX: Close the file from the source before pointing data to a new file handle */
if (data != NULL)
{
fclose(data);
}
data = fopen("GoodSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
}
} | ['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: Close the file from the source before pointing data to a new file handle */', '/* avoid incidental for not closing the file handle */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116678/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_goodB2G1Sink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_goodB2G1Sink
(long param_1)
{
long lVar1;
if (CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_goodB2G1Global == 0) {
if (param_1 != 0) {
func_0x00400a40(param_1);
}
lVar1 = func_0x00400ad0(&UNK_004012ac,&UNK_004012a9);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
}
else {
printLine(&UNK_00401294);
}
return;
}
| ['gcc'] |
10,742 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_goodB2G2Sink(FILE * data)
{
if(CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_goodB2G2Global)
{
/* FIX: Close the file from the source before pointing data to a new file handle */
if (data != NULL)
{
fclose(data);
}
data = fopen("GoodSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
}
} | ['/* FIX: Close the file from the source before pointing data to a new file handle */', '/* avoid incidental for not closing the file handle */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116678/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_goodB2G2Sink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_goodB2G2Sink
(long param_1)
{
long lVar1;
if (CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_22_goodB2G2Global != 0) {
if (param_1 != 0) {
func_0x00400a40(param_1);
}
lVar1 = func_0x00400ad0(&UNK_004012ac,&UNK_004012a9);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
}
return;
}
| ['gcc'] |
10,743 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_41_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
badSink(data);
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116683/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_41.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_41_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_41_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011c9,&UNK_004011b4);
badSink(uVar1);
return;
}
| ['gcc'] |
10,744 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_41_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116683/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_41.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_41_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_41_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,745 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_42_bad()
{
FILE * data;
data = NULL;
data = badSource(data);
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116684/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_42.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_42_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_42_bad(void)
{
long lVar1;
badSource(0);
lVar1 = func_0x00400ad0(&UNK_004011db,&UNK_004011c4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,746 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_42_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116684/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_42.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_42_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_42_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,747 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51b_badSink(data);
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116688/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011b7,&UNK_004011b4);
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51b_badSink(uVar1);
return;
}
| ['gcc'] |
10,748 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116688/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,749 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51b_badSink(FILE * data)
{
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116688/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51b_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51b_badSink(void)
{
long lVar1;
lVar1 = func_0x00400ad0(&UNK_004011b7,&UNK_004011b4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,750 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51b_goodB2GSink(FILE * data)
{
/* FIX: Close the file from the source before pointing data to a new file handle */
if (data != NULL)
{
fclose(data);
}
data = fopen("GoodSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FIX: Close the file from the source before pointing data to a new file handle */', '/* avoid incidental for not closing the file handle */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116688/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51b_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_51b_goodB2GSink
(long param_1)
{
long lVar1;
if (param_1 != 0) {
func_0x00400a40(param_1);
}
lVar1 = func_0x00400ad0(&UNK_004011d7,&UNK_004011d4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,751 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52b_badSink(data);
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116689/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011d7,&UNK_004011d4);
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52b_badSink(uVar1);
return;
}
| ['gcc'] |
10,752 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116689/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,753 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52b_badSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c_badSink(data);
} | [] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116689/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52b_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52b_badSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c_badSink(param_1);
return;
}
| ['gcc'] |
10,754 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52b_goodB2GSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116689/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52b_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52b_goodB2GSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
10,755 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c_badSink(FILE * data)
{
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116689/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c_badSink(void)
{
long lVar1;
lVar1 = func_0x00400ad0(&UNK_004011d7,&UNK_004011d4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,756 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c_goodB2GSink(FILE * data)
{
/* FIX: Close the file from the source before pointing data to a new file handle */
if (data != NULL)
{
fclose(data);
}
data = fopen("GoodSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FIX: Close the file from the source before pointing data to a new file handle */', '/* avoid incidental for not closing the file handle */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116689/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_52c_goodB2GSink
(long param_1)
{
long lVar1;
if (param_1 != 0) {
func_0x00400a40(param_1);
}
lVar1 = func_0x00400ad0(&UNK_004011f7,&UNK_004011f4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,757 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53b_badSink(data);
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116690/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011f7,&UNK_004011f4);
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53b_badSink(uVar1);
return;
}
| ['gcc'] |
10,758 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116690/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,759 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53b_badSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c_badSink(data);
} | [] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116690/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53b_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53b_badSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c_badSink(param_1);
return;
}
| ['gcc'] |
10,760 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53b_goodB2GSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116690/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53b_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53b_goodB2GSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
10,761 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c_badSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d_badSink(data);
} | [] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116690/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c_badSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d_badSink(param_1);
return;
}
| ['gcc'] |
10,762 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c_goodB2GSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116690/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53c_goodB2GSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
10,763 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d_badSink(FILE * data)
{
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116690/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d_badSink(void)
{
long lVar1;
lVar1 = func_0x00400ad0(&UNK_004011f7,&UNK_004011f4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,764 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d_goodB2GSink(FILE * data)
{
/* FIX: Close the file from the source before pointing data to a new file handle */
if (data != NULL)
{
fclose(data);
}
data = fopen("GoodSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FIX: Close the file from the source before pointing data to a new file handle */', '/* avoid incidental for not closing the file handle */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116690/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_53d_goodB2GSink
(long param_1)
{
long lVar1;
if (param_1 != 0) {
func_0x00400a40(param_1);
}
lVar1 = func_0x00400ad0(&UNK_00401217,&UNK_00401214);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,765 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54b_badSink(data);
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116691/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_00401207,&UNK_00401204);
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54b_badSink(uVar1);
return;
}
| ['gcc'] |
10,766 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116691/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,767 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54b_badSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c_badSink(data);
} | [] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116691/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54b_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54b_badSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c_badSink(param_1);
return;
}
| ['gcc'] |
10,768 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54b_goodB2GSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116691/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54b_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54b_goodB2GSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
10,769 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c_badSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d_badSink(data);
} | [] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116691/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c_badSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d_badSink(param_1);
return;
}
| ['gcc'] |
10,770 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c_goodB2GSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116691/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54c_goodB2GSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
10,771 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d_badSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e_badSink(data);
} | [] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116691/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d_badSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e_badSink(param_1);
return;
}
| ['gcc'] |
10,772 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d_goodB2GSink(FILE * data)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116691/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54d_goodB2GSink
(undefined8 param_1)
{
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e_goodB2GSink(param_1);
return;
}
| ['gcc'] |
10,773 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e_badSink(FILE * data)
{
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116691/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e_badSink(void)
{
long lVar1;
lVar1 = func_0x00400ad0(&UNK_00401207,&UNK_00401204);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,774 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e_goodB2GSink(FILE * data)
{
/* FIX: Close the file from the source before pointing data to a new file handle */
if (data != NULL)
{
fclose(data);
}
data = fopen("GoodSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FIX: Close the file from the source before pointing data to a new file handle */', '/* avoid incidental for not closing the file handle */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116691/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_54e_goodB2GSink
(long param_1)
{
long lVar1;
if (param_1 != 0) {
func_0x00400a40(param_1);
}
lVar1 = func_0x00400ad0(&UNK_00401237,&UNK_00401234);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,775 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61_bad()
{
FILE * data;
data = NULL;
data = CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61b_badSource(data);
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116692/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61_bad(void)
{
long lVar1;
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61b_badSource(0);
lVar1 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,776 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116692/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,777 | FILE * CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61b_badSource(FILE * data)
{
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
return data;
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116692/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61b_badSource |
undefined8 CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61b_badSource(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
return uVar1;
}
| ['gcc'] |
10,778 | FILE * CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61b_goodB2GSource(FILE * data)
{
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
return data;
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116692/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61b_goodB2GSource |
undefined8
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_61b_goodB2GSource(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011e7,&UNK_004011e4);
return uVar1;
}
| ['gcc'] |
10,779 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64b_badSink(&data);
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116695/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64_bad(void)
{
undefined8 uStack_10;
uStack_10 = 0;
uStack_10 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64b_badSink(&uStack_10);
return;
}
| ['gcc'] |
10,780 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116695/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,781 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64b_badSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
FILE * * dataPtr = (FILE * *)dataVoidPtr;
/* dereference dataPtr into data */
FILE * data = (*dataPtr);
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116695/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64b_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64b_badSink(void)
{
long lVar1;
lVar1 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,782 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64b_goodB2GSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
FILE * * dataPtr = (FILE * *)dataVoidPtr;
/* dereference dataPtr into data */
FILE * data = (*dataPtr);
/* FIX: Close the file from the source before pointing data to a new file handle */
if (data != NULL)
{
fclose(data);
}
data = fopen("GoodSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* FIX: Close the file from the source before pointing data to a new file handle */', '/* avoid incidental for not closing the file handle */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116695/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64b_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_64b_goodB2GSink
(long *param_1)
{
long lVar1;
if (*param_1 != 0) {
func_0x00400a40(*param_1);
}
lVar1 = func_0x00400ad0(&UNK_004011f7,&UNK_004011f4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,783 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66_bad()
{
FILE * data;
FILE * dataArray[5];
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
/* put data in array */
dataArray[2] = data;
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66b_badSink(dataArray);
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */', '/* put data in array */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116697/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66_bad(void)
{
undefined auStack_38 [16];
undefined8 uStack_28;
undefined8 uStack_10;
uStack_10 = 0;
uStack_28 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
uStack_10 = uStack_28;
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66b_badSink(auStack_38);
return;
}
| ['gcc'] |
10,784 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116697/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,785 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66b_badSink(FILE * dataArray[])
{
/* copy data out of dataArray */
FILE * data = dataArray[2];
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* copy data out of dataArray */', '/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116697/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66b_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66b_badSink(void)
{
long lVar1;
lVar1 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,786 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66b_goodB2GSink(FILE * dataArray[])
{
FILE * data = dataArray[2];
/* FIX: Close the file from the source before pointing data to a new file handle */
if (data != NULL)
{
fclose(data);
}
data = fopen("GoodSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FIX: Close the file from the source before pointing data to a new file handle */', '/* avoid incidental for not closing the file handle */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116697/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66b_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_66b_goodB2GSink
(long param_1)
{
long lVar1;
if (*(long *)(param_1 + 0x10) != 0) {
func_0x00400a40(*(long *)(param_1 + 0x10));
}
lVar1 = func_0x00400ad0(&UNK_004011f7,&UNK_004011f4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,787 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67_bad()
{
FILE * data;
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67_structType myStruct;
data = NULL;
/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */
data = fopen("BadSource_fopen.txt", "w+");
myStruct.structFirst = data;
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67b_badSink(myStruct);
} | ['/* POTENTIAL FLAW: Create a file handle using fopen() that may not be closed properly */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116698/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67_bad |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67b_badSink(uVar1);
return;
}
| ['gcc'] |
10,788 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116698/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67a.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67_good |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,789 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67b_badSink(CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67_structType myStruct)
{
FILE * data = myStruct.structFirst;
/* FLAW: Point data to another file handle without closing the handle from the source */
data = fopen("BadSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FLAW: Point data to another file handle without closing the handle from the source */', '/* avoid incidental for not closing the file handle */'] | ['CWE773'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116698/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67b_badSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67b_badSink(void)
{
long lVar1;
lVar1 = func_0x00400ad0(&UNK_004011c7,&UNK_004011c4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,790 | void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67b_goodB2GSink(CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67_structType myStruct)
{
FILE * data = myStruct.structFirst;
/* FIX: Close the file from the source before pointing data to a new file handle */
if (data != NULL)
{
fclose(data);
}
data = fopen("GoodSink_fopen.txt", "w+");
/* avoid incidental for not closing the file handle */
if (data != NULL)
{
fclose(data);
}
} | ['/* FIX: Close the file from the source before pointing data to a new file handle */', '/* avoid incidental for not closing the file handle */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116698/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67b.c | CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67b_goodB2GSink |
void CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_67b_goodB2GSink
(long param_1)
{
long lVar1;
if (param_1 != 0) {
func_0x00400a40(param_1);
}
lVar1 = func_0x00400ad0(&UNK_004011e7,&UNK_004011e4);
if (lVar1 != 0) {
func_0x00400a40(lVar1);
}
return;
}
| ['gcc'] |
10,791 | void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Open a file without closing it */
data = fopen("BadSource_fopen.txt", "w+");
CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52b_badSink(data);
} | ['/* POTENTIAL FLAW: Open a file without closing it */'] | ['CWE775'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116833/CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52a.c | CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52_bad |
void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400a80(&UNK_00401157,&UNK_00401154);
CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52b_badSink(uVar1);
return;
}
| ['gcc'] |
10,792 | void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116833/CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52a.c | CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52_good |
void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,793 | void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52b_badSink(FILE * data)
{
CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c_badSink(data);
} | [] | ['CWE775'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116833/CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52b.c | CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52b_badSink |
void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52b_badSink
(undefined8 param_1)
{
CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c_badSink(param_1);
return;
}
| ['gcc'] |
10,794 | void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52b_goodB2GSink(FILE * data)
{
CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116833/CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52b.c | CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52b_goodB2GSink |
void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52b_goodB2GSink
(undefined8 param_1)
{
CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
10,795 | void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c_badSink(FILE * data)
{
/* FLAW: No attempt to close the file */
; /* empty statement needed for some flow variants */
} | ['/* FLAW: No attempt to close the file */', '/* empty statement needed for some flow variants */'] | ['CWE775'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116833/CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c.c | CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c_badSink |
void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c_badSink(void)
{
return;
}
| ['gcc'] |
10,796 | void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c_goodB2GSink(FILE * data)
{
/* FIX: If the file is still opened, close it */
if (data != NULL)
{
fclose(data);
}
} | ['/* FIX: If the file is still opened, close it */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116833/CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c.c | CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c_goodB2GSink |
void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_52c_goodB2GSink
(long param_1)
{
if (param_1 != 0) {
func_0x00400a40(param_1);
}
return;
}
| ['gcc'] |
10,797 | void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53_bad()
{
FILE * data;
data = NULL;
/* POTENTIAL FLAW: Open a file without closing it */
data = fopen("BadSource_fopen.txt", "w+");
CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53b_badSink(data);
} | ['/* POTENTIAL FLAW: Open a file without closing it */'] | ['CWE775'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116834/CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53a.c | CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53_bad |
void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53_bad(void)
{
undefined8 uVar1;
uVar1 = func_0x00400a80(&UNK_00401177,&UNK_00401174);
CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53b_badSink(uVar1);
return;
}
| ['gcc'] |
10,798 | void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53_good()
{
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116834/CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53a.c | CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53_good |
void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53_good(void)
{
goodB2G();
return;
}
| ['gcc'] |
10,799 | void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53b_badSink(FILE * data)
{
CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53c_badSink(data);
} | [] | ['CWE775'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/116834/CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53b.c | CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53b_badSink |
void CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53b_badSink
(undefined8 param_1)
{
CWE775_Missing_Release_of_File_Descriptor_or_Handle__fopen_no_close_53c_badSink(param_1);
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.