Unnamed: 0 int64 0 56k | source_code stringlengths 55 5.98k | comments stringlengths 2 1.76k | label stringclasses 68 values | dataset_name stringclasses 1 value | file_name stringlengths 208 265 | function stringlengths 27 87 | decompiled_code stringlengths 68 3.97k | compiler_options stringclasses 1 value |
|---|---|---|---|---|---|---|---|---|
50,900 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_34_bad()
{
int data;
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_34_unionType myUnion;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
myUnion.unionFirst = data;
{
int data = myUnion.unionSecond;
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */', '/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88181/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_34.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_34_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_34_bad(void)
{
int iVar1;
undefined auStack_128 [99];
undefined uStack_c5;
undefined8 uStack_b8;
undefined8 uStack_b0;
undefined8 uStack_a8;
undefined8 uStack_a0;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined4 uStack_58;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
int iStack_20;
int iStack_1c;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
iStack_c = -1;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d80(2,1,6);
if (iStack_14 != -1) {
func_0x00400c90(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = 0;
uStack_36 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_14,&uStack_38,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c30(iStack_10,auStack_46,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_46[iStack_18] = 0;
iStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_14 != -1) {
func_0x00400ca0(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
iStack_20 = iStack_c;
iStack_1c = iStack_c;
uStack_b8 = 0;
uStack_b0 = 0;
uStack_a8 = 0;
uStack_a0 = 0;
uStack_98 = 0;
uStack_90 = 0;
uStack_88 = 0;
uStack_80 = 0;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
func_0x00400c90(auStack_128,0x41,99);
uStack_c5 = 0;
if (iStack_1c < 100) {
func_0x00400c40(&uStack_b8,auStack_128,(long)iStack_1c);
*(undefined *)((long)&uStack_b8 + (long)iStack_1c) = 0;
}
printLine(&uStack_b8);
return;
}
| ['gcc'] |
50,901 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_34_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88181/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_34.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_34_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_34_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,902 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_badSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88182/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_badSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,903 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88182/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d80(2,1,6);
if (iStack_14 != -1) {
func_0x00400c90(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_14,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c30(iStack_10,auStack_36,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_36[iStack_18] = 0;
uStack_c = func_0x00400d50(auStack_36);
}
}
if (iStack_14 != -1) {
func_0x00400ca0(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_badSink(uStack_c);
return;
}
| ['gcc'] |
50,904 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_goodG2BSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88182/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_goodG2BSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,905 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88182/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_41_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,906 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_42_bad()
{
int data;
/* Initialize data */
data = -1;
data = badSource(data);
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88183/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_42.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_42_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_42_bad(void)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
iStack_c = 0xffffffff;
iStack_c = badSource(0xffffffff);
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,907 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_42_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88183/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_42.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_42_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_42_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,908 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_44_bad()
{
int data;
/* define a function pointer */
void (*funcPtr) (int) = badSink;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */', '/* use the function pointer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88185/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_44.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_44_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_44_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
int iStack_20;
int iStack_1c;
code *pcStack_18;
int iStack_10;
undefined4 uStack_c;
pcStack_18 = badSink;
uStack_c = 0xffffffff;
iStack_1c = 0xffffffff;
iStack_10 = -1;
iStack_1c = func_0x00400d80(2,1,6);
if (iStack_1c != -1) {
func_0x00400c90(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = 0;
uStack_36 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_1c,&uStack_38,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_1c,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_1c,0,0), iStack_10 != -1)) &&
((iStack_20 = func_0x00400c30(iStack_10,auStack_46,0xd,0), iStack_20 != -1 &&
(iStack_20 != 0)))) {
auStack_46[iStack_20] = 0;
uStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400ca0(iStack_1c);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
(*pcStack_18)(uStack_c);
return;
}
| ['gcc'] |
50,909 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_44_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88185/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_44.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_44_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_44_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,910 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_45_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_45_badData = data;
badSink();
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88186/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_45.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_45_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_45_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d80(2,1,6);
if (iStack_14 != -1) {
func_0x00400c90(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_14,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c30(iStack_10,auStack_36,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_36[iStack_18] = 0;
uStack_c = func_0x00400d50(auStack_36);
}
}
if (iStack_14 != -1) {
func_0x00400ca0(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_45_badData = uStack_c;
badSink();
return;
}
| ['gcc'] |
50,911 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_45_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88186/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_45.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_45_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_45_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,912 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88187/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d80(2,1,6);
if (iStack_14 != -1) {
func_0x00400c90(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_14,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c30(iStack_10,auStack_36,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_36[iStack_18] = 0;
uStack_c = func_0x00400d50(auStack_36);
}
}
if (iStack_14 != -1) {
func_0x00400ca0(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51b_badSink(uStack_c);
return;
}
| ['gcc'] |
50,913 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88187/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,914 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51b_badSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88187/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51b_badSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,915 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51b_goodG2BSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88187/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_51b_goodG2BSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,916 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88188/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d80(2,1,6);
if (iStack_14 != -1) {
func_0x00400c90(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_14,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c30(iStack_10,auStack_36,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_36[iStack_18] = 0;
uStack_c = func_0x00400d50(auStack_36);
}
}
if (iStack_14 != -1) {
func_0x00400ca0(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52b_badSink(uStack_c);
return;
}
| ['gcc'] |
50,917 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88188/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,918 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88188/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52b_badSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c_badSink(param_1);
return;
}
| ['gcc'] |
50,919 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88188/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52b_goodG2BSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
50,920 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c_badSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88188/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c_badSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,921 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c_goodG2BSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88188/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_52c_goodG2BSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,922 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88189/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d80(2,1,6);
if (iStack_14 != -1) {
func_0x00400c90(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_14,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c30(iStack_10,auStack_36,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_36[iStack_18] = 0;
uStack_c = func_0x00400d50(auStack_36);
}
}
if (iStack_14 != -1) {
func_0x00400ca0(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53b_badSink(uStack_c);
return;
}
| ['gcc'] |
50,923 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88189/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,924 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88189/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53b_badSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c_badSink(param_1);
return;
}
| ['gcc'] |
50,925 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88189/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53b_goodG2BSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
50,926 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88189/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c_badSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d_badSink(param_1);
return;
}
| ['gcc'] |
50,927 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88189/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53c_goodG2BSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
50,928 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d_badSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88189/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d_badSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,929 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d_goodG2BSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88189/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_53d_goodG2BSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,930 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54b_badSink(data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88190/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d80(2,1,6);
if (iStack_14 != -1) {
func_0x00400c90(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_14,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c30(iStack_10,auStack_36,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_36[iStack_18] = 0;
uStack_c = func_0x00400d50(auStack_36);
}
}
if (iStack_14 != -1) {
func_0x00400ca0(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54b_badSink(uStack_c);
return;
}
| ['gcc'] |
50,931 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88190/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,932 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54b_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88190/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54b_badSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c_badSink(param_1);
return;
}
| ['gcc'] |
50,933 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54b_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88190/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54b_goodG2BSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
50,934 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88190/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c_badSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d_badSink(param_1);
return;
}
| ['gcc'] |
50,935 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88190/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54c_goodG2BSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
50,936 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d_badSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e_badSink(data);
} | [] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88190/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d_badSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e_badSink(param_1);
return;
}
| ['gcc'] |
50,937 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d_goodG2BSink(int data)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88190/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54d_goodG2BSink
(undefined4 param_1)
{
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
50,938 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e_badSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88190/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e_badSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,939 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e_goodG2BSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88190/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_54e_goodG2BSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,940 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61_bad()
{
int data;
/* Initialize data */
data = -1;
data = CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61b_badSource(data);
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* Initialize data */', '/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88191/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61_bad(void)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
iStack_c = 0xffffffff;
iStack_c = CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61b_badSource
(0xffffffff);
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,941 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88191/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,942 | int CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61b_badSource(int data)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
return data;
} | ['/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88191/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61b_badSource |
undefined4
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61b_badSource(undefined4 param_1)
{
int iVar1;
undefined4 uStack_3c;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_14;
int iStack_10;
int iStack_c;
iStack_10 = 0xffffffff;
iStack_c = -1;
iStack_10 = func_0x00400d80(2,1,6);
uStack_3c = param_1;
if (iStack_10 != -1) {
func_0x00400c90(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_10,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400d40(iStack_10,0,0), iStack_c != -1)) &&
((iStack_14 = func_0x00400c30(iStack_c,auStack_36,0xd,0), iStack_14 != -1 && (iStack_14 != 0)
))) {
auStack_36[iStack_14] = 0;
uStack_3c = func_0x00400d50(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
if (iStack_c != -1) {
func_0x00400ca0(iStack_c);
}
return uStack_3c;
}
| ['gcc'] |
50,943 | int CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61b_goodG2BSource(int data)
{
/* FIX: Use a positive integer less than &InitialDataSize&*/
data = 100-1;
return data;
} | ['/* FIX: Use a positive integer less than &InitialDataSize&*/'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88191/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61b_goodG2BSource |
undefined4 CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_61b_goodG2BSource(void)
{
return 99;
}
| ['gcc'] |
50,944 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88193/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
undefined4 uStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
uStack_18 = 0xffffffff;
iStack_10 = 0xffffffff;
iStack_c = -1;
iStack_10 = func_0x00400d80(2,1,6);
if (iStack_10 != -1) {
func_0x00400c90(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_10,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400d40(iStack_10,0,0), iStack_c != -1)) &&
((iStack_14 = func_0x00400c30(iStack_c,auStack_36,0xd,0), iStack_14 != -1 && (iStack_14 != 0)
))) {
auStack_36[iStack_14] = 0;
uStack_18 = func_0x00400d50(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
if (iStack_c != -1) {
func_0x00400ca0(iStack_c);
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63b_badSink(&uStack_18);
return;
}
| ['gcc'] |
50,945 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88193/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,946 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63b_badSink(int * dataPtr)
{
int data = *dataPtr;
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88193/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63b_badSink(int *param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
iStack_c = *param_1;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,947 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63b_goodG2BSink(int * dataPtr)
{
int data = *dataPtr;
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88193/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_63b_goodG2BSink(int *param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
iStack_c = *param_1;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,948 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64b_badSink(&data);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88194/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
undefined4 uStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
uStack_18 = 0xffffffff;
iStack_10 = 0xffffffff;
iStack_c = -1;
iStack_10 = func_0x00400d80(2,1,6);
if (iStack_10 != -1) {
func_0x00400c90(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_10,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_10,5), iVar1 != -1)) &&
(iStack_c = func_0x00400d40(iStack_10,0,0), iStack_c != -1)) &&
((iStack_14 = func_0x00400c30(iStack_c,auStack_36,0xd,0), iStack_14 != -1 && (iStack_14 != 0)
))) {
auStack_36[iStack_14] = 0;
uStack_18 = func_0x00400d50(auStack_36);
}
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
if (iStack_c != -1) {
func_0x00400ca0(iStack_c);
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64b_badSink(&uStack_18);
return;
}
| ['gcc'] |
50,949 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88194/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,950 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64b_badSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
int * dataPtr = (int *)dataVoidPtr;
/* dereference dataPtr into data */
int data = (*dataPtr);
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88194/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64b_badSink(int *param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_14;
int *piStack_10;
iStack_14 = *param_1;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
piStack_10 = param_1;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_14 < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)iStack_14);
*(undefined *)((long)&uStack_78 + (long)iStack_14) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,951 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64b_goodG2BSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
int * dataPtr = (int *)dataVoidPtr;
/* dereference dataPtr into data */
int data = (*dataPtr);
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88194/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_64b_goodG2BSink(int *param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_14;
int *piStack_10;
iStack_14 = *param_1;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
piStack_10 = param_1;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_14 < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_14);
*(undefined *)((long)&uStack_78 + (long)iStack_14) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,952 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65_bad()
{
int data;
/* define a function pointer */
void (*funcPtr) (int) = CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65b_badSink;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */', '/* use the function pointer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88195/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
int iStack_20;
int iStack_1c;
code *pcStack_18;
int iStack_10;
undefined4 uStack_c;
pcStack_18 = CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65b_badSink;
uStack_c = 0xffffffff;
iStack_1c = 0xffffffff;
iStack_10 = -1;
iStack_1c = func_0x00400d80(2,1,6);
if (iStack_1c != -1) {
func_0x00400c90(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = 0;
uStack_36 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_1c,&uStack_38,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_1c,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_1c,0,0), iStack_10 != -1)) &&
((iStack_20 = func_0x00400c30(iStack_10,auStack_46,0xd,0), iStack_20 != -1 &&
(iStack_20 != 0)))) {
auStack_46[iStack_20] = 0;
uStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_1c != -1) {
func_0x00400ca0(iStack_1c);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
(*pcStack_18)(uStack_c);
return;
}
| ['gcc'] |
50,953 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88195/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,954 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65b_badSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88195/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65b_badSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,955 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65b_goodG2BSink(int data)
{
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88195/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_65b_goodG2BSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (param_1 < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)param_1);
*(undefined *)((long)&uStack_78 + (long)param_1) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,956 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66_bad()
{
int data;
int dataArray[5];
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* put data in array */
dataArray[2] = data;
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66b_badSink(dataArray);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */', '/* put data in array */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88196/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66_bad(void)
{
int iVar1;
undefined auStack_56 [14];
undefined2 uStack_48;
undefined2 uStack_46;
undefined4 uStack_44;
undefined auStack_38 [8];
undefined4 uStack_30;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d80(2,1,6);
if (iStack_14 != -1) {
func_0x00400c90(&uStack_48,0,0x10);
uStack_48 = 2;
uStack_44 = 0;
uStack_46 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_14,&uStack_48,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c30(iStack_10,auStack_56,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_56[iStack_18] = 0;
uStack_c = func_0x00400d50(auStack_56);
}
}
if (iStack_14 != -1) {
func_0x00400ca0(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
uStack_30 = uStack_c;
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66b_badSink(auStack_38);
return;
}
| ['gcc'] |
50,957 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88196/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,958 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66b_badSink(int dataArray[])
{
/* copy data out of dataArray */
int data = dataArray[2];
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* copy data out of dataArray */', '/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88196/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66b_badSink(long param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
iStack_c = *(int *)(param_1 + 8);
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,959 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66b_goodG2BSink(int dataArray[])
{
int data = dataArray[2];
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88196/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_66b_goodG2BSink(long param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
iStack_c = *(int *)(param_1 + 8);
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,960 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67_bad()
{
int data;
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67_structType myStruct;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
myStruct.structFirst = data;
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67b_badSink(myStruct);
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88197/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67_bad(void)
{
int iVar1;
undefined auStack_46 [14];
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined4 uStack_1c;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d80(2,1,6);
if (iStack_14 != -1) {
func_0x00400c90(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = 0;
uStack_36 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_14,&uStack_38,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c30(iStack_10,auStack_46,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_46[iStack_18] = 0;
uStack_c = func_0x00400d50(auStack_46);
}
}
if (iStack_14 != -1) {
func_0x00400ca0(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
uStack_1c = uStack_c;
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67b_badSink(uStack_c);
return;
}
| ['gcc'] |
50,961 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88197/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,962 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67b_badSink(CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67_structType myStruct)
{
int data = myStruct.structFirst;
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88197/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67b_badSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
iStack_c = param_1;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,963 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67b_goodG2BSink(CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67_structType myStruct)
{
int data = myStruct.structFirst;
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88197/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_67b_goodG2BSink(int param_1)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
iStack_c = param_1;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,964 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_bad()
{
int data;
/* Initialize data */
data = -1;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_badData = data;
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68b_badSink();
} | ['/* Initialize data */', '/* POTENTIAL FLAW: Read data using a listen socket */', '/* Abort on error or the connection was closed */', '/* NUL-terminate the string */', '/* Convert to int */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88198/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_bad(void)
{
int iVar1;
undefined auStack_36 [14];
undefined2 uStack_28;
undefined2 uStack_26;
undefined4 uStack_24;
int iStack_18;
int iStack_14;
int iStack_10;
undefined4 uStack_c;
uStack_c = 0xffffffff;
iStack_14 = 0xffffffff;
iStack_10 = -1;
iStack_14 = func_0x00400d80(2,1,6);
if (iStack_14 != -1) {
func_0x00400c90(&uStack_28,0,0x10);
uStack_28 = 2;
uStack_24 = 0;
uStack_26 = func_0x00400c70(0x6987);
iVar1 = func_0x00400d30(iStack_14,&uStack_28,0x10);
if ((((iVar1 != -1) && (iVar1 = func_0x00400d20(iStack_14,5), iVar1 != -1)) &&
(iStack_10 = func_0x00400d40(iStack_14,0,0), iStack_10 != -1)) &&
((iStack_18 = func_0x00400c30(iStack_10,auStack_36,0xd,0), iStack_18 != -1 &&
(iStack_18 != 0)))) {
auStack_36[iStack_18] = 0;
uStack_c = func_0x00400d50(auStack_36);
}
}
if (iStack_14 != -1) {
func_0x00400ca0(iStack_14);
}
if (iStack_10 != -1) {
func_0x00400ca0(iStack_10);
}
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_badData = uStack_c;
CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68b_badSink();
return;
}
| ['gcc'] |
50,965 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88198/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68a.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,966 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68b_badSink()
{
int data = CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_badData;
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88198/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68b_badSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68b_badSink(void)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
iStack_c = CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_badData;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400c90(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400c40(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,967 | void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68b_goodG2BSink()
{
int data = CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_goodG2BData;
{
char source[100];
char dest[100] = "";
memset(source, 'A', 100-1);
source[100-1] = '\0';
if (data < 100)
{
/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,
* the sign conversion could result in a very large number */
strncpy(dest, source, data);
dest[data] = '\0'; /* strncpy() does not always NULL terminate */
}
printLine(dest);
}
} | ['/* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative,\r\n * the sign conversion could result in a very large number */', '/* strncpy() does not always NULL terminate */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88198/CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68b.c | CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68b_goodG2BSink |
void CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68b_goodG2BSink(void)
{
undefined auStack_e8 [99];
undefined uStack_85;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined8 uStack_38;
undefined8 uStack_30;
undefined8 uStack_28;
undefined8 uStack_20;
undefined4 uStack_18;
int iStack_c;
iStack_c = CWE195_Signed_to_Unsigned_Conversion_Error__listen_socket_strncpy_68_goodG2BData;
uStack_78 = 0;
uStack_70 = 0;
uStack_68 = 0;
uStack_60 = 0;
uStack_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_18 = 0;
func_0x00400a60(auStack_e8,0x41,99);
uStack_85 = 0;
if (iStack_c < 100) {
func_0x00400a20(&uStack_78,auStack_e8,(long)iStack_c);
*(undefined *)((long)&uStack_78 + (long)iStack_c) = 0;
}
printLine(&uStack_78);
return;
}
| ['gcc'] |
50,968 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_03_bad()
{
int data;
/* Initialize data */
data = -1;
if(5==5)
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88208/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_03.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_03_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_03_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,969 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_03_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88208/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_03.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_03_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_03_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,970 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_04_bad()
{
int data;
/* Initialize data */
data = -1;
if(STATIC_CONST_TRUE)
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88209/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_04.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_04_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_04_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,971 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_04_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88209/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_04.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_04_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_04_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,972 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_05_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticTrue)
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88210/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_05.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_05_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_05_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,973 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_05_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88210/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_05.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_05_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_05_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,974 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_06_bad()
{
int data;
/* Initialize data */
data = -1;
if(STATIC_CONST_FIVE==5)
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88211/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_06.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_06_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_06_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,975 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_06_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88211/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_06.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_06_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_06_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,976 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_07_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticFive==5)
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88212/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_07.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_07_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_07_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,977 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_07_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88212/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_07.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_07_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_07_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,978 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_08_bad()
{
int data;
/* Initialize data */
data = -1;
if(staticReturnsTrue())
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88213/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_08.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_08_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_08_bad(void)
{
long lVar1;
staticReturnsTrue();
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,979 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_08_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88213/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_08.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_08_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_08_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,980 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_09_bad()
{
int data;
/* Initialize data */
data = -1;
if(GLOBAL_CONST_TRUE)
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88214/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_09.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_09_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_09_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,981 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_09_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88214/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_09.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_09_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_09_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,982 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_10_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalTrue)
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88215/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_10.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_10_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_10_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,983 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_10_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88215/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_10.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_10_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_10_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,984 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_11_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalReturnsTrue())
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88216/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_11.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_11_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_11_bad(void)
{
long lVar1;
globalReturnsTrue();
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,985 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_11_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88216/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_11.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_11_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_11_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,986 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_12_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalReturnsTrueOrFalse())
{
/* FLAW: Use a negative number */
data = -1;
}
else
{
/* FIX: Use a positive integer less than &InitialDataSize&*/
data = 100-1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* FIX: Use a positive integer less than &InitialDataSize&*/', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88217/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_12.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_12_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_12_bad(void)
{
int iVar1;
long lVar2;
int iStack_c;
iVar1 = globalReturnsTrueOrFalse();
if (iVar1 == 0) {
iStack_c = 99;
}
else {
iStack_c = -1;
}
if (iStack_c < 100) {
lVar2 = func_0x00400b00((long)iStack_c);
func_0x00400aa0(lVar2,0x41,(long)(iStack_c + -1));
*(undefined *)(lVar2 + (long)iStack_c + -1) = 0;
printLine(lVar2);
func_0x00400a60(lVar2);
}
return;
}
| ['gcc'] |
50,987 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_12_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88217/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_12.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_12_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_12_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,988 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_13_bad()
{
int data;
/* Initialize data */
data = -1;
if(GLOBAL_CONST_FIVE==5)
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88218/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_13.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_13_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_13_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,989 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_13_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88218/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_13.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_13_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_13_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,990 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_14_bad()
{
int data;
/* Initialize data */
data = -1;
if(globalFive==5)
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88219/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_14.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_14_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_14_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,991 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_14_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88219/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_14.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_14_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_14_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,992 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_15_bad()
{
int data;
/* Initialize data */
data = -1;
switch(6)
{
case 6:
/* FLAW: Use a negative number */
data = -1;
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88220/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_15.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_15_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_15_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,993 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_15_good()
{
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88220/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_15.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_15_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_15_good(void)
{
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
50,994 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_16_bad()
{
int data;
/* Initialize data */
data = -1;
while(1)
{
/* FLAW: Use a negative number */
data = -1;
break;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88221/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_16.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_16_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_16_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,995 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_16_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88221/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_16.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_16_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_16_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,996 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_17_bad()
{
int i;
int data;
/* Initialize data */
data = -1;
for(i = 0; i < 1; i++)
{
/* FLAW: Use a negative number */
data = -1;
}
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88222/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_17.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_17_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_17_bad(void)
{
long lVar1;
int iStack_c;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
}
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,997 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_17_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88222/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_17.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_17_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_17_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
50,998 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_18_bad()
{
int data;
/* Initialize data */
data = -1;
goto source;
source:
/* FLAW: Use a negative number */
data = -1;
/* Assume we want to allocate a relatively small buffer */
if (data < 100)
{
/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,
* the conversion will cause malloc() to allocate a very large amount of data or fail */
char * dataBuffer = (char *)malloc(data);
/* Do something with dataBuffer */
memset(dataBuffer, 'A', data-1);
dataBuffer[data-1] = '\0';
printLine(dataBuffer);
free(dataBuffer);
}
} | ['/* Initialize data */', '/* FLAW: Use a negative number */', '/* Assume we want to allocate a relatively small buffer */', '/* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative,\r\n * the conversion will cause malloc() to allocate a very large amount of data or fail */', '/* Do something with dataBuffer */'] | ['CWE195'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88223/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_18.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_18_bad |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_18_bad(void)
{
long lVar1;
lVar1 = func_0x00400b00(0xffffffffffffffff);
func_0x00400aa0(lVar1,0x41,0xfffffffffffffffe);
*(undefined *)(lVar1 + -2) = 0;
printLine(lVar1);
func_0x00400a60(lVar1);
return;
}
| ['gcc'] |
50,999 | void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_18_good()
{
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/88223/CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_18.c | CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_18_good |
void CWE195_Signed_to_Unsigned_Conversion_Error__negative_malloc_18_good(void)
{
goodG2B();
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.