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 |
|---|---|---|---|---|---|---|---|---|
5,000 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_53b_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108961/CWE606_Unchecked_Loop_Condition__char_connect_socket_53b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_53b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_53b_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,001 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_badSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108961/CWE606_Unchecked_Loop_Condition__char_connect_socket_53c.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_badSink(param_1);
return;
}
| ['gcc'] |
5,002 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_goodG2BSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108961/CWE606_Unchecked_Loop_Condition__char_connect_socket_53c.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,003 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108961/CWE606_Unchecked_Loop_Condition__char_connect_socket_53c.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_53c_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,004 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_badSink(char * data)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108961/CWE606_Unchecked_Loop_Condition__char_connect_socket_53d.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400d00(param_1,&UNK_00401604,&iStack_14);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,005 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_goodG2BSink(char * data)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108961/CWE606_Unchecked_Loop_Condition__char_connect_socket_53d.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400d00(param_1,&UNK_00401754,&iStack_14);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,006 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_goodB2GSink(char * data)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108961/CWE606_Unchecked_Loop_Condition__char_connect_socket_53d.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_53d_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400d00(param_1,&UNK_00401754,&iStack_14);
if ((iVar1 == 1) && (iStack_14 < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,007 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_badSink(data);
} | ['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54_bad |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54_bad(void)
{
int iVar1;
undefined2 uStack_a8;
undefined2 uStack_a6;
undefined4 uStack_a4;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
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;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_10 = &uStack_98;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c30(puStack_10);
iStack_14 = func_0x00400d40(2,1,6);
if (iStack_14 != -1) {
func_0x00400c70(&uStack_a8,0,0x10);
uStack_a8 = 2;
uStack_a4 = func_0x00400cc0(&UNK_00401624);
uStack_a6 = func_0x00400c40(0x6987);
iVar1 = func_0x00400d10(iStack_14,&uStack_a8,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c00(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c50(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c50(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400c80(iStack_14);
}
CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,008 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54_good |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,009 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_badSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_badSink(param_1);
return;
}
| ['gcc'] |
5,010 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_goodG2BSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,011 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54b_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,012 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_badSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54c.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_badSink(param_1);
return;
}
| ['gcc'] |
5,013 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_goodG2BSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54c.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,014 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54c.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54c_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,015 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_badSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_badSink(data);
} | [] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54d.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_badSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_badSink(param_1);
return;
}
| ['gcc'] |
5,016 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_goodG2BSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_goodG2BSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54d.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_goodG2BSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_goodG2BSink(param_1);
return;
}
| ['gcc'] |
5,017 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_goodB2GSink(char * data)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_goodB2GSink(data);
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54d.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54d_goodB2GSink(undefined8 param_1)
{
CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_goodB2GSink(param_1);
return;
}
| ['gcc'] |
5,018 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_badSink(char * data)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54e.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400d00(param_1,&UNK_00401624,&iStack_14);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,019 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_goodG2BSink(char * data)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54e.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400d00(param_1,&UNK_00401784,&iStack_14);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,020 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_goodB2GSink(char * data)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108962/CWE606_Unchecked_Loop_Condition__char_connect_socket_54e.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_54e_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400d00(param_1,&UNK_00401784,&iStack_14);
if ((iVar1 == 1) && (iStack_14 < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,021 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_61_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
data = CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_badSource(data);
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108963/CWE606_Unchecked_Loop_Condition__char_connect_socket_61a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_61_bad |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_61_bad(void)
{
int iVar1;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
puStack_18 = (undefined8 *)
CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_badSource(puStack_18);
iVar1 = func_0x00400d00(puStack_18,&UNK_004015c4,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,022 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_61_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108963/CWE606_Unchecked_Loop_Condition__char_connect_socket_61a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_61_good |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_61_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,023 | char * CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_badSource(char * data)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
return data;
} | ['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108963/CWE606_Unchecked_Loop_Condition__char_connect_socket_61b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_badSource |
long CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_badSource(long param_1)
{
int iVar1;
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_c;
iStack_c = 0xffffffff;
lStack_18 = func_0x00400c30(param_1);
iStack_c = func_0x00400d40(2,1,6);
if (iStack_c != -1) {
func_0x00400c70(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cc0(&UNK_004015c4);
uStack_36 = func_0x00400c40(0x6987);
iVar1 = func_0x00400d10(iStack_c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_1c = func_0x00400c00(iStack_c,param_1 + lStack_18,99 - lStack_18,0), iStack_1c != -1
)) && (iStack_1c != 0)) {
*(undefined *)(param_1 + iStack_1c + lStack_18) = 0;
puStack_28 = (undefined *)func_0x00400c50(param_1,0xd);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined *)func_0x00400c50(param_1,10);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_c != -1) {
func_0x00400c80(iStack_c);
}
return param_1;
}
| ['gcc'] |
5,024 | char * CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_goodG2BSource(char * data)
{
/* FIX: Set data to a number less than MAX_LOOP */
strcpy(data, "15");
return data;
} | ['/* FIX: Set data to a number less than MAX_LOOP */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108963/CWE606_Unchecked_Loop_Condition__char_connect_socket_61b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_goodG2BSource |
undefined2 *
CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_goodG2BSource(undefined2 *param_1)
{
*param_1 = 0x3531;
*(undefined *)(param_1 + 1) = 0;
return param_1;
}
| ['gcc'] |
5,025 | char * CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_goodB2GSource(char * data)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
return data;
} | ['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108963/CWE606_Unchecked_Loop_Condition__char_connect_socket_61b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_goodB2GSource |
long CWE606_Unchecked_Loop_Condition__char_connect_socket_61b_goodB2GSource(long param_1)
{
int iVar1;
undefined2 uStack_38;
undefined2 uStack_36;
undefined4 uStack_34;
undefined *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_c;
iStack_c = 0xffffffff;
lStack_18 = func_0x00400c30(param_1);
iStack_c = func_0x00400d40(2,1,6);
if (iStack_c != -1) {
func_0x00400c70(&uStack_38,0,0x10);
uStack_38 = 2;
uStack_34 = func_0x00400cc0(&UNK_004016e4);
uStack_36 = func_0x00400c40(0x6987);
iVar1 = func_0x00400d10(iStack_c,&uStack_38,0x10);
if (((iVar1 != -1) &&
(iStack_1c = func_0x00400c00(iStack_c,param_1 + lStack_18,99 - lStack_18,0), iStack_1c != -1
)) && (iStack_1c != 0)) {
*(undefined *)(param_1 + iStack_1c + lStack_18) = 0;
puStack_28 = (undefined *)func_0x00400c50(param_1,0xd);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined *)func_0x00400c50(param_1,10);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_c != -1) {
func_0x00400c80(iStack_c);
}
return param_1;
}
| ['gcc'] |
5,026 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_63_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_badSink(&data);
} | ['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108965/CWE606_Unchecked_Loop_Condition__char_connect_socket_63a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_63_bad |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_63_bad(void)
{
int iVar1;
undefined2 uStack_a8;
undefined2 uStack_a6;
undefined4 uStack_a4;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
undefined8 *puStack_30;
undefined *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_c;
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;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_30 = &uStack_98;
iStack_c = 0xffffffff;
lStack_18 = func_0x00400c30(puStack_30);
iStack_c = func_0x00400d40(2,1,6);
if (iStack_c != -1) {
func_0x00400c70(&uStack_a8,0,0x10);
uStack_a8 = 2;
uStack_a4 = func_0x00400cc0(&UNK_004015d4);
uStack_a6 = func_0x00400c40(0x6987);
iVar1 = func_0x00400d10(iStack_c,&uStack_a8,0x10);
if (((iVar1 != -1) &&
(iStack_1c = func_0x00400c00(iStack_c,(long)puStack_30 + lStack_18,99 - lStack_18,0),
iStack_1c != -1)) && (iStack_1c != 0)) {
*(undefined *)((long)puStack_30 + lStack_18 + iStack_1c) = 0;
puStack_28 = (undefined *)func_0x00400c50(puStack_30,0xd);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined *)func_0x00400c50(puStack_30,10);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_c != -1) {
func_0x00400c80(iStack_c);
}
CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_badSink(&puStack_30);
return;
}
| ['gcc'] |
5,027 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_63_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108965/CWE606_Unchecked_Loop_Condition__char_connect_socket_63a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_63_good |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_63_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,028 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_badSink(char * * dataPtr)
{
char * data = *dataPtr;
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108965/CWE606_Unchecked_Loop_Condition__char_connect_socket_63b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_badSink(undefined8 *param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *param_1;
iVar1 = func_0x00400d00(uStack_18,&UNK_004015d4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,029 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_goodG2BSink(char * * dataPtr)
{
char * data = *dataPtr;
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108965/CWE606_Unchecked_Loop_Condition__char_connect_socket_63b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_goodG2BSink(undefined8 *param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *param_1;
iVar1 = func_0x00400d00(uStack_18,&UNK_004016f4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,030 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_goodB2GSink(char * * dataPtr)
{
char * data = *dataPtr;
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108965/CWE606_Unchecked_Loop_Condition__char_connect_socket_63b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_63b_goodB2GSink(undefined8 *param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *param_1;
iVar1 = func_0x00400d00(uStack_18,&UNK_004016f4,&iStack_1c);
if ((iVar1 == 1) && (iStack_1c < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,031 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_64_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_badSink(&data);
} | ['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108966/CWE606_Unchecked_Loop_Condition__char_connect_socket_64a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_64_bad |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_64_bad(void)
{
int iVar1;
undefined2 uStack_a8;
undefined2 uStack_a6;
undefined4 uStack_a4;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
undefined8 *puStack_30;
undefined *puStack_28;
int iStack_1c;
long lStack_18;
int iStack_c;
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;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_30 = &uStack_98;
iStack_c = 0xffffffff;
lStack_18 = func_0x00400c30(puStack_30);
iStack_c = func_0x00400d40(2,1,6);
if (iStack_c != -1) {
func_0x00400c70(&uStack_a8,0,0x10);
uStack_a8 = 2;
uStack_a4 = func_0x00400cc0(&UNK_004015e4);
uStack_a6 = func_0x00400c40(0x6987);
iVar1 = func_0x00400d10(iStack_c,&uStack_a8,0x10);
if (((iVar1 != -1) &&
(iStack_1c = func_0x00400c00(iStack_c,(long)puStack_30 + lStack_18,99 - lStack_18,0),
iStack_1c != -1)) && (iStack_1c != 0)) {
*(undefined *)((long)puStack_30 + lStack_18 + iStack_1c) = 0;
puStack_28 = (undefined *)func_0x00400c50(puStack_30,0xd);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
puStack_28 = (undefined *)func_0x00400c50(puStack_30,10);
if (puStack_28 != (undefined *)0x0) {
*puStack_28 = 0;
}
}
}
if (iStack_c != -1) {
func_0x00400c80(iStack_c);
}
CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_badSink(&puStack_30);
return;
}
| ['gcc'] |
5,032 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_64_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108966/CWE606_Unchecked_Loop_Condition__char_connect_socket_64a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_64_good |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_64_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,033 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_badSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
char * * dataPtr = (char * *)dataVoidPtr;
/* dereference dataPtr into data */
char * data = (*dataPtr);
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108966/CWE606_Unchecked_Loop_Condition__char_connect_socket_64b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_badSink(undefined8 *param_1)
{
int iVar1;
int iStack_24;
undefined8 uStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_20 = *param_1;
puStack_18 = param_1;
iVar1 = func_0x00400d00(uStack_20,&UNK_004015e4,&iStack_24);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_24; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,034 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_goodG2BSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
char * * dataPtr = (char * *)dataVoidPtr;
/* dereference dataPtr into data */
char * data = (*dataPtr);
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108966/CWE606_Unchecked_Loop_Condition__char_connect_socket_64b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_goodG2BSink(undefined8 *param_1)
{
int iVar1;
int iStack_24;
undefined8 uStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_20 = *param_1;
puStack_18 = param_1;
iVar1 = func_0x00400d00(uStack_20,&UNK_00401704,&iStack_24);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_24; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,035 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_goodB2GSink(void * dataVoidPtr)
{
/* cast void pointer to a pointer of the appropriate type */
char * * dataPtr = (char * *)dataVoidPtr;
/* dereference dataPtr into data */
char * data = (*dataPtr);
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* cast void pointer to a pointer of the appropriate type */', '/* dereference dataPtr into data */', '/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108966/CWE606_Unchecked_Loop_Condition__char_connect_socket_64b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_64b_goodB2GSink(undefined8 *param_1)
{
int iVar1;
int iStack_24;
undefined8 uStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_20 = *param_1;
puStack_18 = param_1;
iVar1 = func_0x00400d00(uStack_20,&UNK_00401704,&iStack_24);
if ((iVar1 == 1) && (iStack_24 < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_24; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,036 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_65_bad()
{
char * data;
/* define a function pointer */
void (*funcPtr) (char *) = CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_badSink;
char dataBuffer[100] = "";
data = dataBuffer;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* use the function pointer */
funcPtr(data);
} | ['/* define a function pointer */', '/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* use the function pointer */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108967/CWE606_Unchecked_Loop_Condition__char_connect_socket_65a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_65_bad |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_65_bad(void)
{
int iVar1;
undefined2 uStack_b8;
undefined2 uStack_b6;
undefined4 uStack_b4;
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;
undefined8 uStack_58;
undefined8 uStack_50;
undefined4 uStack_48;
undefined *puStack_38;
int iStack_2c;
long lStack_28;
int iStack_1c;
undefined8 *puStack_18;
code *pcStack_10;
pcStack_10 = CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_badSink;
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;
uStack_50 = 0;
uStack_48 = 0;
puStack_18 = &uStack_a8;
iStack_1c = 0xffffffff;
lStack_28 = func_0x00400c30(puStack_18);
iStack_1c = func_0x00400d40(2,1,6);
if (iStack_1c != -1) {
func_0x00400c70(&uStack_b8,0,0x10);
uStack_b8 = 2;
uStack_b4 = func_0x00400cc0(&UNK_004015e4);
uStack_b6 = func_0x00400c40(0x6987);
iVar1 = func_0x00400d10(iStack_1c,&uStack_b8,0x10);
if (((iVar1 != -1) &&
(iStack_2c = func_0x00400c00(iStack_1c,(long)puStack_18 + lStack_28,99 - lStack_28,0),
iStack_2c != -1)) && (iStack_2c != 0)) {
*(undefined *)((long)puStack_18 + iStack_2c + lStack_28) = 0;
puStack_38 = (undefined *)func_0x00400c50(puStack_18,0xd);
if (puStack_38 != (undefined *)0x0) {
*puStack_38 = 0;
}
puStack_38 = (undefined *)func_0x00400c50(puStack_18,10);
if (puStack_38 != (undefined *)0x0) {
*puStack_38 = 0;
}
}
}
if (iStack_1c != -1) {
func_0x00400c80(iStack_1c);
}
(*pcStack_10)(puStack_18);
return;
}
| ['gcc'] |
5,037 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_65_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108967/CWE606_Unchecked_Loop_Condition__char_connect_socket_65a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_65_good |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_65_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,038 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_badSink(char * data)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108967/CWE606_Unchecked_Loop_Condition__char_connect_socket_65b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400d00(param_1,&UNK_004015e4,&iStack_14);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,039 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_goodG2BSink(char * data)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108967/CWE606_Unchecked_Loop_Condition__char_connect_socket_65b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400d00(param_1,&UNK_004016f4,&iStack_14);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,040 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_goodB2GSink(char * data)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108967/CWE606_Unchecked_Loop_Condition__char_connect_socket_65b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_65b_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
iVar1 = func_0x00400d00(param_1,&UNK_004016f4,&iStack_14);
if ((iVar1 == 1) && (iStack_14 < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,041 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_66_bad()
{
char * data;
char * dataArray[5];
char dataBuffer[100] = "";
data = dataBuffer;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
/* put data in array */
dataArray[2] = data;
CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_badSink(dataArray);
} | ['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */', '/* put data in array */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108968/CWE606_Unchecked_Loop_Condition__char_connect_socket_66a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_66_bad |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_66_bad(void)
{
int iVar1;
undefined2 uStack_d8;
undefined2 uStack_d6;
undefined4 uStack_d4;
undefined8 uStack_c8;
undefined8 uStack_c0;
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;
undefined4 uStack_68;
undefined auStack_58 [16];
undefined8 *puStack_48;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
uStack_c8 = 0;
uStack_c0 = 0;
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;
puStack_10 = &uStack_c8;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c30(puStack_10);
iStack_14 = func_0x00400d40(2,1,6);
if (iStack_14 != -1) {
func_0x00400c70(&uStack_d8,0,0x10);
uStack_d8 = 2;
uStack_d4 = func_0x00400cc0(&UNK_004015f4);
uStack_d6 = func_0x00400c40(0x6987);
iVar1 = func_0x00400d10(iStack_14,&uStack_d8,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c00(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c50(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c50(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400c80(iStack_14);
}
puStack_48 = puStack_10;
CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_badSink(auStack_58);
return;
}
| ['gcc'] |
5,042 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_66_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108968/CWE606_Unchecked_Loop_Condition__char_connect_socket_66a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_66_good |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_66_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,043 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_badSink(char * dataArray[])
{
/* copy data out of dataArray */
char * data = dataArray[2];
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ['/* copy data out of dataArray */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108968/CWE606_Unchecked_Loop_Condition__char_connect_socket_66b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_badSink(long param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *(undefined8 *)(param_1 + 0x10);
iVar1 = func_0x00400d00(uStack_18,&UNK_004015f4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,044 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_goodG2BSink(char * dataArray[])
{
char * data = dataArray[2];
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108968/CWE606_Unchecked_Loop_Condition__char_connect_socket_66b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_goodG2BSink(long param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *(undefined8 *)(param_1 + 0x10);
iVar1 = func_0x00400d00(uStack_18,&UNK_00401734,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,045 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_goodB2GSink(char * dataArray[])
{
char * data = dataArray[2];
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108968/CWE606_Unchecked_Loop_Condition__char_connect_socket_66b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_66b_goodB2GSink(long param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = *(undefined8 *)(param_1 + 0x10);
iVar1 = func_0x00400d00(uStack_18,&UNK_00401734,&iStack_1c);
if ((iVar1 == 1) && (iStack_1c < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,046 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_67_bad()
{
char * data;
CWE606_Unchecked_Loop_Condition__char_connect_socket_67_structType myStruct;
char dataBuffer[100] = "";
data = dataBuffer;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
myStruct.structFirst = data;
CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_badSink(myStruct);
} | ['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108969/CWE606_Unchecked_Loop_Condition__char_connect_socket_67a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_67_bad |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_67_bad(void)
{
int iVar1;
undefined2 uStack_b8;
undefined2 uStack_b6;
undefined4 uStack_b4;
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;
undefined8 uStack_58;
undefined8 uStack_50;
undefined4 uStack_48;
undefined8 *puStack_38;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
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;
uStack_50 = 0;
uStack_48 = 0;
puStack_10 = &uStack_a8;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c30(puStack_10);
iStack_14 = func_0x00400d40(2,1,6);
if (iStack_14 != -1) {
func_0x00400c70(&uStack_b8,0,0x10);
uStack_b8 = 2;
uStack_b4 = func_0x00400cc0(&UNK_004015e4);
uStack_b6 = func_0x00400c40(0x6987);
iVar1 = func_0x00400d10(iStack_14,&uStack_b8,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c00(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c50(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c50(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400c80(iStack_14);
}
puStack_38 = puStack_10;
CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_badSink(puStack_10);
return;
}
| ['gcc'] |
5,047 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_67_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108969/CWE606_Unchecked_Loop_Condition__char_connect_socket_67a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_67_good |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_67_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,048 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_badSink(CWE606_Unchecked_Loop_Condition__char_connect_socket_67_structType myStruct)
{
char * data = myStruct.structFirst;
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108969/CWE606_Unchecked_Loop_Condition__char_connect_socket_67b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_badSink(undefined8 param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = param_1;
iVar1 = func_0x00400d00(param_1,&UNK_004015e4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,049 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_goodG2BSink(CWE606_Unchecked_Loop_Condition__char_connect_socket_67_structType myStruct)
{
char * data = myStruct.structFirst;
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108969/CWE606_Unchecked_Loop_Condition__char_connect_socket_67b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = param_1;
iVar1 = func_0x00400d00(param_1,&UNK_00401704,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,050 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_goodB2GSink(CWE606_Unchecked_Loop_Condition__char_connect_socket_67_structType myStruct)
{
char * data = myStruct.structFirst;
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108969/CWE606_Unchecked_Loop_Condition__char_connect_socket_67b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_67b_goodB2GSink(undefined8 param_1)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = param_1;
iVar1 = func_0x00400d00(param_1,&UNK_00401704,&iStack_1c);
if ((iVar1 == 1) && (iStack_1c < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,051 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_68_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
char *replace;
SOCKET connectSocket = INVALID_SOCKET;
size_t dataLen = strlen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a connect socket */
connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (connectSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr(IP_ADDRESS);
service.sin_port = htons(TCP_PORT);
if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed, make sure to recv one
* less char than is in the recv_buf in order to append a terminator */
/* Abort on error or the connection was closed */
recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(char)] = '\0';
/* Eliminate CRLF */
replace = strchr(data, '\r');
if (replace)
{
*replace = '\0';
}
replace = strchr(data, '\n');
if (replace)
{
*replace = '\0';
}
}
while (0);
if (connectSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(connectSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
CWE606_Unchecked_Loop_Condition__char_connect_socket_68_badData = data;
CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_badSink();
} | ['/* POTENTIAL FLAW: Read data using a connect socket */', '/* Abort on error or the connection was closed, make sure to recv one\r\n * less char than is in the recv_buf in order to append a terminator */', '/* Abort on error or the connection was closed */', '/* Append null terminator */', '/* Eliminate CRLF */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108970/CWE606_Unchecked_Loop_Condition__char_connect_socket_68a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_68_bad |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_68_bad(void)
{
int iVar1;
undefined2 uStack_a8;
undefined2 uStack_a6;
undefined4 uStack_a4;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
undefined *puStack_30;
int iStack_24;
long lStack_20;
int iStack_14;
undefined8 *puStack_10;
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;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_10 = &uStack_98;
iStack_14 = 0xffffffff;
lStack_20 = func_0x00400c30(puStack_10);
iStack_14 = func_0x00400d40(2,1,6);
if (iStack_14 != -1) {
func_0x00400c70(&uStack_a8,0,0x10);
uStack_a8 = 2;
uStack_a4 = func_0x00400cc0(&UNK_004015e4);
uStack_a6 = func_0x00400c40(0x6987);
iVar1 = func_0x00400d10(iStack_14,&uStack_a8,0x10);
if (((iVar1 != -1) &&
(iStack_24 = func_0x00400c00(iStack_14,(long)puStack_10 + lStack_20,99 - lStack_20,0),
iStack_24 != -1)) && (iStack_24 != 0)) {
*(undefined *)((long)puStack_10 + iStack_24 + lStack_20) = 0;
puStack_30 = (undefined *)func_0x00400c50(puStack_10,0xd);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
puStack_30 = (undefined *)func_0x00400c50(puStack_10,10);
if (puStack_30 != (undefined *)0x0) {
*puStack_30 = 0;
}
}
}
if (iStack_14 != -1) {
func_0x00400c80(iStack_14);
}
CWE606_Unchecked_Loop_Condition__char_connect_socket_68_badData = puStack_10;
CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_badSink();
return;
}
| ['gcc'] |
5,052 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_68_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108970/CWE606_Unchecked_Loop_Condition__char_connect_socket_68a.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_68_good |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_68_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,053 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_badSink()
{
char * data = CWE606_Unchecked_Loop_Condition__char_connect_socket_68_badData;
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108970/CWE606_Unchecked_Loop_Condition__char_connect_socket_68b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_badSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_badSink(void)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = CWE606_Unchecked_Loop_Condition__char_connect_socket_68_badData;
iVar1 = func_0x00400d00(CWE606_Unchecked_Loop_Condition__char_connect_socket_68_badData,
&UNK_004015e4,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,054 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_goodG2BSink()
{
char * data = CWE606_Unchecked_Loop_Condition__char_connect_socket_68_goodG2BData;
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108970/CWE606_Unchecked_Loop_Condition__char_connect_socket_68b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_goodG2BSink(void)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = CWE606_Unchecked_Loop_Condition__char_connect_socket_68_goodG2BData;
iVar1 = func_0x00400d00(CWE606_Unchecked_Loop_Condition__char_connect_socket_68_goodG2BData,
&UNK_00401704,&iStack_1c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,055 | void CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_goodB2GSink()
{
char * data = CWE606_Unchecked_Loop_Condition__char_connect_socket_68_goodB2GData;
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108970/CWE606_Unchecked_Loop_Condition__char_connect_socket_68b.c | CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_goodB2GSink |
void CWE606_Unchecked_Loop_Condition__char_connect_socket_68b_goodB2GSink(void)
{
int iVar1;
int iStack_1c;
undefined8 uStack_18;
int iStack_10;
int iStack_c;
uStack_18 = CWE606_Unchecked_Loop_Condition__char_connect_socket_68_goodB2GData;
iVar1 = func_0x00400d00(CWE606_Unchecked_Loop_Condition__char_connect_socket_68_goodB2GData,
&UNK_00401704,&iStack_1c);
if ((iVar1 == 1) && (iStack_1c < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_1c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,056 | void CWE606_Unchecked_Loop_Condition__char_console_01_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108978/CWE606_Unchecked_Loop_Condition__char_console_01.c | CWE606_Unchecked_Loop_Condition__char_console_01_bad |
void CWE606_Unchecked_Loop_Condition__char_console_01_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401304);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401313,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,057 | void CWE606_Unchecked_Loop_Condition__char_console_01_good()
{
goodG2B();
goodB2G();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108978/CWE606_Unchecked_Loop_Condition__char_console_01.c | CWE606_Unchecked_Loop_Condition__char_console_01_good |
void CWE606_Unchecked_Loop_Condition__char_console_01_good(void)
{
goodG2B();
goodB2G();
return;
}
| ['gcc'] |
5,058 | void CWE606_Unchecked_Loop_Condition__char_console_02_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(1)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(1)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108979/CWE606_Unchecked_Loop_Condition__char_console_02.c | CWE606_Unchecked_Loop_Condition__char_console_02_bad |
void CWE606_Unchecked_Loop_Condition__char_console_02_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401304);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401313,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,059 | void CWE606_Unchecked_Loop_Condition__char_console_02_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108979/CWE606_Unchecked_Loop_Condition__char_console_02.c | CWE606_Unchecked_Loop_Condition__char_console_02_good |
void CWE606_Unchecked_Loop_Condition__char_console_02_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,060 | void CWE606_Unchecked_Loop_Condition__char_console_03_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(5==5)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(5==5)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108980/CWE606_Unchecked_Loop_Condition__char_console_03.c | CWE606_Unchecked_Loop_Condition__char_console_03_bad |
void CWE606_Unchecked_Loop_Condition__char_console_03_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401304);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401313,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,061 | void CWE606_Unchecked_Loop_Condition__char_console_03_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108980/CWE606_Unchecked_Loop_Condition__char_console_03.c | CWE606_Unchecked_Loop_Condition__char_console_03_good |
void CWE606_Unchecked_Loop_Condition__char_console_03_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,062 | void CWE606_Unchecked_Loop_Condition__char_console_04_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(STATIC_CONST_TRUE)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(STATIC_CONST_TRUE)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108981/CWE606_Unchecked_Loop_Condition__char_console_04.c | CWE606_Unchecked_Loop_Condition__char_console_04_bad |
void CWE606_Unchecked_Loop_Condition__char_console_04_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_0040132c);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_0040133b,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,063 | void CWE606_Unchecked_Loop_Condition__char_console_04_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108981/CWE606_Unchecked_Loop_Condition__char_console_04.c | CWE606_Unchecked_Loop_Condition__char_console_04_good |
void CWE606_Unchecked_Loop_Condition__char_console_04_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,064 | void CWE606_Unchecked_Loop_Condition__char_console_05_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(staticTrue)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(staticTrue)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108982/CWE606_Unchecked_Loop_Condition__char_console_05.c | CWE606_Unchecked_Loop_Condition__char_console_05_bad |
void CWE606_Unchecked_Loop_Condition__char_console_05_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
if (staticTrue != 0) {
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
}
if (staticTrue != 0) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401333,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,065 | void CWE606_Unchecked_Loop_Condition__char_console_05_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108982/CWE606_Unchecked_Loop_Condition__char_console_05.c | CWE606_Unchecked_Loop_Condition__char_console_05_good |
void CWE606_Unchecked_Loop_Condition__char_console_05_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,066 | void CWE606_Unchecked_Loop_Condition__char_console_06_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(STATIC_CONST_FIVE==5)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(STATIC_CONST_FIVE==5)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108983/CWE606_Unchecked_Loop_Condition__char_console_06.c | CWE606_Unchecked_Loop_Condition__char_console_06_bad |
void CWE606_Unchecked_Loop_Condition__char_console_06_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401328);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401337,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,067 | void CWE606_Unchecked_Loop_Condition__char_console_07_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(staticFive==5)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(staticFive==5)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108984/CWE606_Unchecked_Loop_Condition__char_console_07.c | CWE606_Unchecked_Loop_Condition__char_console_07_bad |
void CWE606_Unchecked_Loop_Condition__char_console_07_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
if (staticFive == 5) {
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
}
if (staticFive == 5) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401333,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,068 | void CWE606_Unchecked_Loop_Condition__char_console_07_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108984/CWE606_Unchecked_Loop_Condition__char_console_07.c | CWE606_Unchecked_Loop_Condition__char_console_07_good |
void CWE606_Unchecked_Loop_Condition__char_console_07_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,069 | void CWE606_Unchecked_Loop_Condition__char_console_08_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(staticReturnsTrue())
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(staticReturnsTrue())
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108985/CWE606_Unchecked_Loop_Condition__char_console_08.c | CWE606_Unchecked_Loop_Condition__char_console_08_bad |
void CWE606_Unchecked_Loop_Condition__char_console_08_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401344);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
}
iVar1 = staticReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401353,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,070 | void CWE606_Unchecked_Loop_Condition__char_console_08_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108985/CWE606_Unchecked_Loop_Condition__char_console_08.c | CWE606_Unchecked_Loop_Condition__char_console_08_good |
void CWE606_Unchecked_Loop_Condition__char_console_08_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,071 | void CWE606_Unchecked_Loop_Condition__char_console_09_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(GLOBAL_CONST_TRUE)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(GLOBAL_CONST_TRUE)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108986/CWE606_Unchecked_Loop_Condition__char_console_09.c | CWE606_Unchecked_Loop_Condition__char_console_09_bad |
void CWE606_Unchecked_Loop_Condition__char_console_09_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
if (GLOBAL_CONST_TRUE != 0) {
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
}
if (GLOBAL_CONST_TRUE != 0) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401333,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,072 | void CWE606_Unchecked_Loop_Condition__char_console_09_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108986/CWE606_Unchecked_Loop_Condition__char_console_09.c | CWE606_Unchecked_Loop_Condition__char_console_09_good |
void CWE606_Unchecked_Loop_Condition__char_console_09_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,073 | void CWE606_Unchecked_Loop_Condition__char_console_10_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalTrue)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(globalTrue)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108987/CWE606_Unchecked_Loop_Condition__char_console_10.c | CWE606_Unchecked_Loop_Condition__char_console_10_bad |
void CWE606_Unchecked_Loop_Condition__char_console_10_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
if (globalTrue != 0) {
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
}
if (globalTrue != 0) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401333,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,074 | void CWE606_Unchecked_Loop_Condition__char_console_10_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108987/CWE606_Unchecked_Loop_Condition__char_console_10.c | CWE606_Unchecked_Loop_Condition__char_console_10_good |
void CWE606_Unchecked_Loop_Condition__char_console_10_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,075 | void CWE606_Unchecked_Loop_Condition__char_console_11_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalReturnsTrue())
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(globalReturnsTrue())
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108988/CWE606_Unchecked_Loop_Condition__char_console_11.c | CWE606_Unchecked_Loop_Condition__char_console_11_bad |
void CWE606_Unchecked_Loop_Condition__char_console_11_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
}
iVar1 = globalReturnsTrue();
if (iVar1 != 0) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401333,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,076 | void CWE606_Unchecked_Loop_Condition__char_console_11_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108988/CWE606_Unchecked_Loop_Condition__char_console_11.c | CWE606_Unchecked_Loop_Condition__char_console_11_good |
void CWE606_Unchecked_Loop_Condition__char_console_11_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,077 | void CWE606_Unchecked_Loop_Condition__char_console_12_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalReturnsTrueOrFalse())
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
else
{
/* FIX: Set data to a number less than MAX_LOOP */
strcpy(data, "15");
}
if(globalReturnsTrueOrFalse())
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
else
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* FIX: Set data to a number less than MAX_LOOP */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */', '/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108989/CWE606_Unchecked_Loop_Condition__char_console_12.c | CWE606_Unchecked_Loop_Condition__char_console_12_bad |
void CWE606_Unchecked_Loop_Condition__char_console_12_bad(void)
{
undefined8 *puVar1;
int iVar2;
long lVar3;
int iStack_a0;
int iStack_9c;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
long lStack_28;
undefined8 *puStack_20;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
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;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_20 = &uStack_98;
iVar2 = globalReturnsTrueOrFalse();
puVar1 = puStack_20;
if (iVar2 == 0) {
*(undefined2 *)puStack_20 = 0x3531;
*(undefined *)((long)puVar1 + 2) = 0;
}
else {
lStack_28 = func_0x00400a80(puStack_20);
if (1 < 100U - lStack_28) {
lVar3 = func_0x00400ac0((long)puStack_20 + lStack_28,100 - (int)lStack_28,stdin);
if (lVar3 == 0) {
printLine(&UNK_004013a4);
*(undefined *)(lStack_28 + (long)puStack_20) = 0;
}
else {
lStack_28 = func_0x00400a80(puStack_20);
if ((lStack_28 != 0) && (*(char *)((long)puStack_20 + lStack_28 + -1) == '\n')) {
*(undefined *)((long)puStack_20 + lStack_28 + -1) = 0;
}
}
}
}
iVar2 = globalReturnsTrueOrFalse();
if (iVar2 == 0) {
iVar2 = func_0x00400b10(puStack_20,&UNK_004013b3,&iStack_a0);
if ((iVar2 == 1) && (iStack_a0 < 10000)) {
iStack_18 = 0;
for (iStack_14 = 0; iStack_14 < iStack_a0; iStack_14 = iStack_14 + 1) {
iStack_18 = iStack_18 + 1;
}
printIntLine(iStack_18);
}
}
else {
iVar2 = func_0x00400b10(puStack_20,&UNK_004013b3,&iStack_9c);
if (iVar2 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_9c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,078 | void CWE606_Unchecked_Loop_Condition__char_console_12_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108989/CWE606_Unchecked_Loop_Condition__char_console_12.c | CWE606_Unchecked_Loop_Condition__char_console_12_good |
void CWE606_Unchecked_Loop_Condition__char_console_12_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,079 | void CWE606_Unchecked_Loop_Condition__char_console_13_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(GLOBAL_CONST_FIVE==5)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(GLOBAL_CONST_FIVE==5)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108990/CWE606_Unchecked_Loop_Condition__char_console_13.c | CWE606_Unchecked_Loop_Condition__char_console_13_bad |
void CWE606_Unchecked_Loop_Condition__char_console_13_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
if (GLOBAL_CONST_FIVE == 5) {
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
}
if (GLOBAL_CONST_FIVE == 5) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401333,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,080 | void CWE606_Unchecked_Loop_Condition__char_console_13_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108990/CWE606_Unchecked_Loop_Condition__char_console_13.c | CWE606_Unchecked_Loop_Condition__char_console_13_good |
void CWE606_Unchecked_Loop_Condition__char_console_13_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,081 | void CWE606_Unchecked_Loop_Condition__char_console_14_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(globalFive==5)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
if(globalFive==5)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108991/CWE606_Unchecked_Loop_Condition__char_console_14.c | CWE606_Unchecked_Loop_Condition__char_console_14_bad |
void CWE606_Unchecked_Loop_Condition__char_console_14_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
if (globalFive == 5) {
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
}
if (globalFive == 5) {
iVar1 = func_0x00400b10(puStack_18,&UNK_00401333,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,082 | void CWE606_Unchecked_Loop_Condition__char_console_14_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108991/CWE606_Unchecked_Loop_Condition__char_console_14.c | CWE606_Unchecked_Loop_Condition__char_console_14_good |
void CWE606_Unchecked_Loop_Condition__char_console_14_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,083 | void CWE606_Unchecked_Loop_Condition__char_console_15_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
switch(6)
{
case 6:
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
switch(7)
{
case 7:
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
break;
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */', '/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108992/CWE606_Unchecked_Loop_Condition__char_console_15.c | CWE606_Unchecked_Loop_Condition__char_console_15_bad |
void CWE606_Unchecked_Loop_Condition__char_console_15_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401304);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401313,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,084 | void CWE606_Unchecked_Loop_Condition__char_console_15_good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108992/CWE606_Unchecked_Loop_Condition__char_console_15.c | CWE606_Unchecked_Loop_Condition__char_console_15_good |
void CWE606_Unchecked_Loop_Condition__char_console_15_good(void)
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
return;
}
| ['gcc'] |
5,085 | void CWE606_Unchecked_Loop_Condition__char_console_16_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
while(1)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
break;
}
while(1)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
break;
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108993/CWE606_Unchecked_Loop_Condition__char_console_16.c | CWE606_Unchecked_Loop_Condition__char_console_16_bad |
void CWE606_Unchecked_Loop_Condition__char_console_16_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401304);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401313,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,086 | void CWE606_Unchecked_Loop_Condition__char_console_16_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108993/CWE606_Unchecked_Loop_Condition__char_console_16.c | CWE606_Unchecked_Loop_Condition__char_console_16_good |
void CWE606_Unchecked_Loop_Condition__char_console_16_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,087 | void CWE606_Unchecked_Loop_Condition__char_console_17_bad()
{
int i,j;
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
for(i = 0; i < 1; i++)
{
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
}
for(j = 0; j < 1; j++)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108994/CWE606_Unchecked_Loop_Condition__char_console_17.c | CWE606_Unchecked_Loop_Condition__char_console_17_bad |
void CWE606_Unchecked_Loop_Condition__char_console_17_bad(void)
{
int iVar1;
long lVar2;
int iStack_9c;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
long lStack_28;
undefined8 *puStack_20;
int iStack_18;
int iStack_14;
int iStack_10;
int iStack_c;
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;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_20 = &uStack_98;
for (iStack_c = 0; iStack_c < 1; iStack_c = iStack_c + 1) {
lStack_28 = func_0x00400a80(puStack_20);
if (1 < 100U - lStack_28) {
lVar2 = func_0x00400ac0((long)puStack_20 + lStack_28,100 - (int)lStack_28,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401344);
*(undefined *)(lStack_28 + (long)puStack_20) = 0;
}
else {
lStack_28 = func_0x00400a80(puStack_20);
if ((lStack_28 != 0) && (*(char *)((long)puStack_20 + lStack_28 + -1) == '\n')) {
*(undefined *)((long)puStack_20 + lStack_28 + -1) = 0;
}
}
}
}
for (iStack_10 = 0; iStack_10 < 1; iStack_10 = iStack_10 + 1) {
iVar1 = func_0x00400b10(puStack_20,&UNK_00401353,&iStack_9c);
if (iVar1 == 1) {
iStack_18 = 0;
for (iStack_14 = 0; iStack_14 < iStack_9c; iStack_14 = iStack_14 + 1) {
iStack_18 = iStack_18 + 1;
}
printIntLine(iStack_18);
}
}
return;
}
| ['gcc'] |
5,088 | void CWE606_Unchecked_Loop_Condition__char_console_17_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108994/CWE606_Unchecked_Loop_Condition__char_console_17.c | CWE606_Unchecked_Loop_Condition__char_console_17_good |
void CWE606_Unchecked_Loop_Condition__char_console_17_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,089 | void CWE606_Unchecked_Loop_Condition__char_console_18_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
goto source;
source:
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
goto sink;
sink:
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108995/CWE606_Unchecked_Loop_Condition__char_console_18.c | CWE606_Unchecked_Loop_Condition__char_console_18_bad |
void CWE606_Unchecked_Loop_Condition__char_console_18_bad(void)
{
int iVar1;
long lVar2;
int iStack_8c;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_18 = &uStack_88;
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401304);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
iVar1 = func_0x00400b10(puStack_18,&UNK_00401313,&iStack_8c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_8c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
5,090 | void CWE606_Unchecked_Loop_Condition__char_console_18_good()
{
goodB2G();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108995/CWE606_Unchecked_Loop_Condition__char_console_18.c | CWE606_Unchecked_Loop_Condition__char_console_18_good |
void CWE606_Unchecked_Loop_Condition__char_console_18_good(void)
{
goodB2G();
goodG2B();
return;
}
| ['gcc'] |
5,091 | void CWE606_Unchecked_Loop_Condition__char_console_21_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
badStatic = 1; /* true */
badSink(data);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* true */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108996/CWE606_Unchecked_Loop_Condition__char_console_21.c | CWE606_Unchecked_Loop_Condition__char_console_21_bad |
void CWE606_Unchecked_Loop_Condition__char_console_21_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400a80(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401337);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400a80(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
badStatic = 1;
badSink(puStack_10);
return;
}
| ['gcc'] |
5,092 | void CWE606_Unchecked_Loop_Condition__char_console_21_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108996/CWE606_Unchecked_Loop_Condition__char_console_21.c | CWE606_Unchecked_Loop_Condition__char_console_21_good |
void CWE606_Unchecked_Loop_Condition__char_console_21_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
5,093 | void CWE606_Unchecked_Loop_Condition__char_console_22_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
CWE606_Unchecked_Loop_Condition__char_console_22_badGlobal = 1; /* true */
CWE606_Unchecked_Loop_Condition__char_console_22_badSink(data);
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', '/* true */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108997/CWE606_Unchecked_Loop_Condition__char_console_22a.c | CWE606_Unchecked_Loop_Condition__char_console_22_bad |
void CWE606_Unchecked_Loop_Condition__char_console_22_bad(void)
{
long lVar1;
undefined8 uStack_88;
undefined8 uStack_80;
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;
undefined4 uStack_28;
long lStack_18;
undefined8 *puStack_10;
uStack_88 = 0;
uStack_80 = 0;
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;
puStack_10 = &uStack_88;
lStack_18 = func_0x00400a80(puStack_10);
if (1 < 100U - lStack_18) {
lVar1 = func_0x00400ac0((long)puStack_10 + lStack_18,100 - (int)lStack_18,stdin);
if (lVar1 == 0) {
printLine(&UNK_00401334);
*(undefined *)(lStack_18 + (long)puStack_10) = 0;
}
else {
lStack_18 = func_0x00400a80(puStack_10);
if ((lStack_18 != 0) && (*(char *)((long)puStack_10 + lStack_18 + -1) == '\n')) {
*(undefined *)((long)puStack_10 + lStack_18 + -1) = 0;
}
}
}
CWE606_Unchecked_Loop_Condition__char_console_22_badGlobal = 1;
CWE606_Unchecked_Loop_Condition__char_console_22_badSink(puStack_10);
return;
}
| ['gcc'] |
5,094 | void CWE606_Unchecked_Loop_Condition__char_console_22_good()
{
goodB2G1();
goodB2G2();
goodG2B();
} | [] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108997/CWE606_Unchecked_Loop_Condition__char_console_22a.c | CWE606_Unchecked_Loop_Condition__char_console_22_good |
void CWE606_Unchecked_Loop_Condition__char_console_22_good(void)
{
goodB2G1();
goodB2G2();
goodG2B();
return;
}
| ['gcc'] |
5,095 | void CWE606_Unchecked_Loop_Condition__char_console_22_badSink(char * data)
{
if(CWE606_Unchecked_Loop_Condition__char_console_22_badGlobal)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108997/CWE606_Unchecked_Loop_Condition__char_console_22b.c | CWE606_Unchecked_Loop_Condition__char_console_22_badSink |
void CWE606_Unchecked_Loop_Condition__char_console_22_badSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__char_console_22_badGlobal != 0) {
iVar1 = func_0x00400b10(param_1,&UNK_00401334,&iStack_14);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,096 | void CWE606_Unchecked_Loop_Condition__char_console_22_goodB2G1Sink(char * data)
{
if(CWE606_Unchecked_Loop_Condition__char_console_22_goodB2G1Global)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
}
} | ['/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */', '/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108997/CWE606_Unchecked_Loop_Condition__char_console_22b.c | CWE606_Unchecked_Loop_Condition__char_console_22_goodB2G1Sink |
void CWE606_Unchecked_Loop_Condition__char_console_22_goodB2G1Sink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__char_console_22_goodB2G1Global == 0) {
iVar1 = func_0x00400b10(param_1,&UNK_00401629,&iStack_14);
if ((iVar1 == 1) && (iStack_14 < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
else {
printLine(&UNK_00401614);
}
return;
}
| ['gcc'] |
5,097 | void CWE606_Unchecked_Loop_Condition__char_console_22_goodB2G2Sink(char * data)
{
if(CWE606_Unchecked_Loop_Condition__char_console_22_goodB2G2Global)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* FIX: limit loop iteration counts */
if (n < MAX_LOOP)
{
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
}
} | ['/* FIX: limit loop iteration counts */', '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108997/CWE606_Unchecked_Loop_Condition__char_console_22b.c | CWE606_Unchecked_Loop_Condition__char_console_22_goodB2G2Sink |
void CWE606_Unchecked_Loop_Condition__char_console_22_goodB2G2Sink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__char_console_22_goodB2G2Global != 0) {
iVar1 = func_0x00400b10(param_1,&UNK_00401629,&iStack_14);
if ((iVar1 == 1) && (iStack_14 < 10000)) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,098 | void CWE606_Unchecked_Loop_Condition__char_console_22_goodG2BSink(char * data)
{
if(CWE606_Unchecked_Loop_Condition__char_console_22_goodG2BGlobal)
{
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ["/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | null | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108997/CWE606_Unchecked_Loop_Condition__char_console_22b.c | CWE606_Unchecked_Loop_Condition__char_console_22_goodG2BSink |
void CWE606_Unchecked_Loop_Condition__char_console_22_goodG2BSink(undefined8 param_1)
{
int iVar1;
int iStack_14;
int iStack_10;
int iStack_c;
if (CWE606_Unchecked_Loop_Condition__char_console_22_goodG2BGlobal != 0) {
iVar1 = func_0x00400b10(param_1,&UNK_00401629,&iStack_14);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_14; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
}
return;
}
| ['gcc'] |
5,099 | void CWE606_Unchecked_Loop_Condition__char_console_31_bad()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
{
/* Read input from the console */
size_t dataLen = strlen(data);
/* if there is room in data, read into it from the console */
if (100-dataLen > 1)
{
/* POTENTIAL FLAW: Read data from the console */
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
{
/* The next few lines remove the carriage return from the string that is
* inserted by fgets() */
dataLen = strlen(data);
if (dataLen > 0 && data[dataLen-1] == '\n')
{
data[dataLen-1] = '\0';
}
}
else
{
printLine("fgets() failed");
/* Restore NUL terminator if fgets fails */
data[dataLen] = '\0';
}
}
}
{
char * dataCopy = data;
char * data = dataCopy;
{
int i, n, intVariable;
if (sscanf(data, "%d", &n) == 1)
{
/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */
intVariable = 0;
for (i = 0; i < n; i++)
{
/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */
intVariable++; /* avoid a dead/empty code block issue */
}
printIntLine(intVariable);
}
}
}
} | ['/* Read input from the console */', '/* if there is room in data, read into it from the console */', '/* POTENTIAL FLAW: Read data from the console */', '/* The next few lines remove the carriage return from the string that is\r\n * inserted by fgets() */', '/* Restore NUL terminator if fgets fails */', "/* POTENTIAL FLAW: user-supplied value 'n' could lead to very large loop iteration */", '/* INCIDENTAL: CWE 561: Dead Code - non-avoidable if n <= 0 */', '/* avoid a dead/empty code block issue */'] | ['CWE606'] | mvd | /work/xgk011/.cache/huggingface/datasets/downloads/extracted/486fbd3d4a8ebc225e93d9cfb666bef6ac127e67788d52f03aa0e741860aa84a/muVulDeePecker-master/source files/upload_source_1/108998/CWE606_Unchecked_Loop_Condition__char_console_31.c | CWE606_Unchecked_Loop_Condition__char_console_31_bad |
void CWE606_Unchecked_Loop_Condition__char_console_31_bad(void)
{
int iVar1;
long lVar2;
int iStack_9c;
undefined8 uStack_98;
undefined8 uStack_90;
undefined8 uStack_88;
undefined8 uStack_80;
undefined8 uStack_78;
undefined8 uStack_70;
undefined8 uStack_68;
undefined8 uStack_60;
undefined8 uStack_58;
undefined8 uStack_50;
undefined8 uStack_48;
undefined8 uStack_40;
undefined4 uStack_38;
undefined8 *puStack_30;
undefined8 *puStack_28;
long lStack_20;
undefined8 *puStack_18;
int iStack_10;
int iStack_c;
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;
uStack_50 = 0;
uStack_48 = 0;
uStack_40 = 0;
uStack_38 = 0;
puStack_18 = &uStack_98;
lStack_20 = func_0x00400a80(puStack_18);
if (1 < 100U - lStack_20) {
lVar2 = func_0x00400ac0((long)puStack_18 + lStack_20,100 - (int)lStack_20,stdin);
if (lVar2 == 0) {
printLine(&UNK_00401324);
*(undefined *)(lStack_20 + (long)puStack_18) = 0;
}
else {
lStack_20 = func_0x00400a80(puStack_18);
if ((lStack_20 != 0) && (*(char *)((long)puStack_18 + lStack_20 + -1) == '\n')) {
*(undefined *)((long)puStack_18 + lStack_20 + -1) = 0;
}
}
}
puStack_28 = puStack_18;
puStack_30 = puStack_18;
iVar1 = func_0x00400b10(puStack_18,&UNK_00401333,&iStack_9c);
if (iVar1 == 1) {
iStack_10 = 0;
for (iStack_c = 0; iStack_c < iStack_9c; iStack_c = iStack_c + 1) {
iStack_10 = iStack_10 + 1;
}
printIntLine(iStack_10);
}
return;
}
| ['gcc'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.