source
stringlengths 23
1.83k
| target
stringlengths 42
1.55k
|
---|---|
void b_main_sink(_struct_type my_struct);void _main(){char data;_struct_type my_struct;data=' ';data=CHAR_MIN;my_struct.a=data;b_main_sink(my_struct);}void b_main_sink(_struct_type my_struct){char data=my_struct.a;{char result=data-1;printHexCharLine(result);}} | static void main(){char data;_struct_type my_struct;data=' ';data=CHAR_MIN;my_struct.a=data;b_main_sink(my_struct);}void b_main_sink(_struct_type my_struct){char data=my_struct.a;{char result=0;if (data > CHAR_MIN){result=data-1;printHexCharLine(result);}else{printLine("Input value is too small to perform arithmetic safely.");}}} |
void b_main_sink();void _main(){int data;data=-1;data=RAND32();_main_data=data;b_main_sink();}void b_main_sink(){int data=_main_data;{char * char_string;if (data > 0){char_string=(char *)malloc(data*sizeof(char));strcpy(char_string, HELLO_STRING);printLine(char_string);free(char_string);}else{printLine("Input is less than 0");}}} | static void main(){int data;data=-1;data=20;_main_data=data;b_main_sink();}void b_main_sink(){int data=_main_data;{char * char_string;if (data > 0){char_string=(char *)malloc(data*sizeof(char));strcpy(char_string, HELLO_STRING);printLine(char_string);free(char_string);}else{printLine("Input is less than 0");}}} |
static char * main_source(char * data){{size_t data_len=strlen(data);if(100-data_len > 1){fgets(data+data_len, (int)(100-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}return data;}void _main(){char * data;char data_buf[100]="";data=data_buf;data=main_source(data);if (strncmp(PASSWORD, data, strlen(data))==0) printLine("Access granted");else printLine("Access denied!");} | static char * main_source(char * data){data=PASSWORD;return data;}static void main(){char * data;char data_buf[100]="";data=data_buf;data=main_source(data);if (strncmp(PASSWORD, data, strlen(data))==0) printLine("Access granted");else printLine("Access denied!");} |
void _main(){char * data;data=NULL;{char * data_buf=(char *)malloc(100*sizeof(char));memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf-8;}{size_t i;char src[100];for (i=0;i < 100;i++){data[i]=src[i];}data[100-1]='\0';printLine(data);}} | static void main(){char * data;data=NULL;{char * data_buf=(char *)malloc(100*sizeof(char));memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf;}{size_t i;char src[100];for (i=0;i < 100;i++){data[i]=src[i];}data[100-1]='\0';printLine(data);}} |
void b_main_sink(void * void_data_ptr);void _main(){unsigned int data;data=0;fscanf (stdin, "%u", &data);b_main_sink(&data);}void b_main_sink(void * void_data_ptr){unsigned int * data_ptr=(unsigned int *)void_data_ptr;unsigned int data=(*data_ptr);{unsigned int result=data-1;printUnsignedLine(result);}} | static void main(){unsigned int data;data=0;data=5;b_main_sink(&data);}void b_main_sink(void * void_data_ptr){unsigned int * data_ptr=(unsigned int *)void_data_ptr;unsigned int data=(*data_ptr);{unsigned int result=data-1;printUnsignedLine(result);}} |
static void main_vasinkb(wchar_t * data, ...){{wchar_t dest[100]=L"";va_list args;va_start(args, data);_vsnwprintf(dest, 100-1, data, args);va_end(args);printWLine(dest);}}static void main_vasinkg(wchar_t * data, ...){{wchar_t dest[100]=L"";va_list args;va_start(args, data);_vsnwprintf(dest, 100-1, L"%s", args);va_end(args);printWLine(dest);}}void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;if(global_returns_t_or_f()){{size_t data_len=wcslen(data);if(100-data_len > 1){fgetws(data+data_len, (int)(100-data_len), stdin);data_len=wcslen(data);if (data_len > 0){data[data_len-1]=L'\0';}}}}else{wcscpy(data, L"fixedstringtest");}if(global_returns_t_or_f()){main_vasinkb(data, data);}else{main_vasinkg(data, data);}} | static void main_vasinkb(wchar_t * data, ...){{wchar_t dest[100]=L"";va_list args;va_start(args, data);_vsnwprintf(dest, 100-1, data, args);va_end(args);printWLine(dest);}}static void main_vasinkg(wchar_t * data, ...){{wchar_t dest[100]=L"";va_list args;va_start(args, data);_vsnwprintf(dest, 100-1, L"%s", args);va_end(args);printWLine(dest);}}static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;if(global_returns_t_or_f()){{size_t data_len=wcslen(data);if(100-data_len > 1){fgetws(data+data_len, (int)(100-data_len), stdin);data_len=wcslen(data);if (data_len > 0){data[data_len-1]=L'\0';}}}}else{{size_t data_len=wcslen(data);if(100-data_len > 1){fgetws(data+data_len, (int)(100-data_len), stdin);data_len=wcslen(data);if (data_len > 0){data[data_len-1]=L'\0';}}}}if(global_returns_t_or_f()){main_vasinkg(data, data);}else{main_vasinkg(data, data);}} |
static void main_sink(int data){{int result=data+1;printIntLine(result);}}void _main(){int data;data=-1;data=RAND32();main_sink(data);} | static void main_sink(int data){{int result=-1;if (data < INT_MAX){result=data+1;printIntLine(result);}else{printLine("Input value is too large to perform arithmetic safely.");}}}static void main(){int data;data=-1;data=RAND32();main_sink(data);} |
void b_main_sink(wchar_t * data_array[]);void _main(){wchar_t * data;wchar_t * data_array[5];wchar_t * data_buf=(wchar_t *)ALLOCA(100*sizeof(wchar_t));wmemset(data_buf, L'A', 100-1);data_buf[100-1]=L'\0';data=data_buf-8;data_array[2]=data;b_main_sink(data_array);}void b_main_sink(wchar_t * data_array[]){wchar_t * data=data_array[2];{wchar_t src[100];memmove(data, src, 100*sizeof(wchar_t));data[100-1]=L'\0';printWLine(data);}} | void b_main_sink(wchar_t * data_array[]);static void main(){wchar_t * data;wchar_t * data_array[5];wchar_t * data_buf=(wchar_t *)ALLOCA(100*sizeof(wchar_t));wmemset(data_buf, L'A', 100-1);data_buf[100-1]=L'\0';data=data_buf;data_array[2]=data;b_main_sink(data_array);}void b_main_sink(wchar_t * data_array[]){wchar_t * data=data_array[2];{wchar_t src[100];memmove(data, src, 100*sizeof(wchar_t));data[100-1]=L'\0';printWLine(data);}} |
void main_sink_b(wchar_t * data);void main(){wchar_t * data;data=NULL;{wchar_t mystring[]=L"mystring";data=wcsdup(mystring);}main_sink_b(data);}void main_sink_c(wchar_t * data);void main_sink_b(wchar_t * data){main_sink_c(data);}void main_sink_d(wchar_t * data);void main_sink_c(wchar_t * data){main_sink_d(data);}void main_sink_e(wchar_t * data);void main_sink_d(wchar_t * data){main_sink_e(data);}void main_sink_e(wchar_t * data){delete [] data;} | static void main(){wchar_t * data;data=NULL;{wchar_t mystring[]=L"mystring";data=wcsdup(mystring);}main_sink_b(data);}void main_sink_b(wchar_t * data){main_sink_c(data);}void main_sink_c(wchar_t * data){main_sink_d(data);}void main_sink_d(wchar_t * data){main_sink_e(data);}void main_sink_e(wchar_t * data){free(data);} |
static char * main_source(char * data){{size_t data_len=strlen(data);FILE * pFile;if(100-data_len > 1){pFile=FOPEN("C:\\temp\\file.txt", "r");if (pFile!=NULL){fgets(data+data_len, (int)(100-data_len), pFile);fclose(pFile);}}}return data;}void _main(){char * data;char data_buf[100]="";data=data_buf;data=main_source(data);fprintf(stdout, data);} | static char * main_source(char * data){strcpy(data, "fixedstringtest");return data;}static void main(){char * data;char data_buf[100]="";data=data_buf;data=main_source(data);fprintf(stdout, data);} |
void _main(){{wchar_t * data=SRC_STR;wchar_t dst[100]=L"";wchar_t * end=wcschr(data, L'/');memmove(dst, data, sizeof(wchar_t)*(data-end));printWLine(dst);}} | static void main(){{wchar_t * data=SRC_STR;wchar_t dst[100]=L"";wchar_t * end=wcschr(data, L'/');memmove(dst, data, sizeof(wchar_t)*(end-data));printWLine(dst);}} |
void _main(){wchar_t * data;wchar_t data_buf[250]=L"PATH=";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;wchar_t *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=wcslen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(250-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]=L'\0';replace=wcschr(data, L'\r');if (replace) *replace=L'\0';replace=wcschr(data, L'\n');if (replace) *replace=L'\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}PUTENV(data);} | static void main(){wchar_t * data;wchar_t data_buf[250]=L"PATH=";data=data_buf;wcscat(data, NEW_PATH);PUTENV(data);} |
void b_main_sink(char * data);void _main(){char * data;char data_buf[100]="";data=data_buf;{size_t data_len=strlen(data);char * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){strncat(data+data_len, environment, 100-data_len-1);}}b_main_sink(data);}void c_main_sink(char * data);void b_main_sink(char * data){c_main_sink(data);}void d_main_sink(char * data);void c_main_sink(char * data){d_main_sink(data);}void d_main_sink(char * data){if (strstr(PASSWORD, data)!=NULL) printLine("Access granted");else printLine("Access denied!");} | static void main(){char * data;char data_buf[100]="";data=data_buf;{size_t data_len=strlen(data);char * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){strncat(data+data_len, environment, 100-data_len-1);}}b_main_sink(data);}void b_main_sink(char * data){c_main_sink(data);}void c_main_sink(char * data){d_main_sink(data);}void d_main_sink(char * data){if (strcmp(PASSWORD, data)==0) printLine("Access granted");else printLine("Access denied!");} |
void b_main_sink(short data);void _main(){short data;data=-1;data=(short)RAND32();b_main_sink(data);}void c_main_sink(short data);void b_main_sink(short data){c_main_sink(data);}void c_main_sink(short data){{char c=(char)data;printHexCharLine(c);}} | void b_main_sink(short data);static void main(){short data;data=-1;data=CHAR_MAX-5;b_main_sink(data);}void c_main_sink(short data);void b_main_sink(short data){c_main_sink(data);}void c_main_sink(short data){{char c=(char)data;printHexCharLine(c);}} |
void main_source(wchar_t * &data);void main(){wchar_t * data;data=NULL;main_source(data);{wchar_t dest[100];wcscpy(dest, data);printWLine(dest);}}void main_source(wchar_t * &data){{wchar_t * data_buf=new wchar_t[100];wmemset(data_buf, L'A', 100-1);data_buf[100-1]=L'\0';data=data_buf-8;}} | void main_source(wchar_t * &data);static void main(){wchar_t * data;data=NULL;main_source(data);{wchar_t dest[100];wcscpy(dest, data);printWLine(dest);}}void main_source(wchar_t * &data){{wchar_t * data_buf=new wchar_t[100];wmemset(data_buf, L'A', 100-1);data_buf[100-1]=L'\0';data=data_buf;}} |
void b_main_sink(int data);void _main(){int data;fscanf (stdin, "%d", &data);b_main_sink(data);}void b_main_sink(int data){{wchar_t data_buf[10]=L"AAAAAAAAA";if (data >=0){printWcharLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}} | static void main(){int data;fscanf (stdin, "%d", &data);b_main_sink(data);}void b_main_sink(int data){{wchar_t data_buf[10]=L"AAAAAAAAA";{printWcharLine(data_buf[data]);}else{printLine("ERROR: Array index is out-of-bounds");}}} |
void _main(){{long long * data=(long long *)malloc(100*sizeof(long long));data[0]=5L;printLongLongLine(data[0]);data=(long long *)realloc(data, (130000)*sizeof(long long));if (data!=NULL){data[0]=10L;printLongLongLine(data[0]);free(data);}}} | static void main(){{long long * data=(long long *)malloc(100*sizeof(long long));long long * tmp;data[0]=5L;printLongLongLine(data[0]);tmp=(long long *)realloc(data, (130000)*sizeof(long long));if (tmp!=NULL){data=tmp;data[0]=10L;printLongLongLine(data[0]);}free(data);}} |
wchar_t * b_main_source(wchar_t * data);void _main(){wchar_t * data;wchar_t data_buf[100];data=data_buf;data=b_main_source(data);{wchar_t src[100];wcscat(data, src);printWLine(data);}}wchar_t * b_main_source(wchar_t * data){return data;} | wchar_t * b_main_source(wchar_t * data);static void main(){wchar_t * data;wchar_t data_buf[100];data=data_buf;data=b_main_source(data);{wchar_t src[100];wcscat(data, src);printWLine(data);}}wchar_t * b_main_source(wchar_t * data){return data;} |
void _main(){char * data;char * *data_ptr1=&data;char * *data_ptr2=&data;{char * data=*data_ptr1;data=(char *)calloc(100, sizeof(char));}{char * data=*data_ptr2;strcpy(data, "Initialize");printLine(data);free(data);}} | static void main(){char * data;char * *data_ptr1=&data;char * *data_ptr2=&data;{char * data=*data_ptr1;data=(char *)calloc(100, sizeof(char));}{char * data=*data_ptr2;if (data!=NULL){strcpy(data, "Initialize");printLine(data);free(data);}}} |
void b_main_sink(void * void_data_ptr);void _main(){FILE * data;data=NULL;data=WFOPEN(L"file.txt", L"w+");b_main_sink(&data);}void b_main_sink(void * void_data_ptr){FILE * * data_ptr=(FILE * *)void_data_ptr;FILE * data=(*data_ptr);fclose(data);} | void b_main_sink(void * void_data_ptr);static void main(){FILE * data;data=NULL;data=WFOPEN(L"file.txt", L"w+");b_main_sink(&data);}void b_main_sink(void * void_data_ptr){FILE * * data_ptr=(FILE * *)void_data_ptr;FILE * data=(*data_ptr);if (data!=NULL){fclose(data);}} |
void main_sink(long long * * data_ptr);void main(){long long * data;{long long * data_buf=(long long *)ALLOCA(100*sizeof(long long));{size_t i;for (i=0;i < 100;i++){data_buf[i]=5L;}}data=data_buf;}main_sink(&data);}void main_sink(long long * * data_ptr){long long * data=*data_ptr;printLongLongLine(data[0]);delete [] data;} | void main_sink(long long * * data);static void main(){long long * data;{long long * data_buf=new long long[100];{size_t i;for (i=0;i < 100;i++){data_buf[i]=5L;}}data=data_buf;}main_sink(&data);}void main_sink(long long * * data_ptr){long long * data=*data_ptr;printLongLongLine(data[0]);delete [] data;} |
void b_main_sink();void _main(){char * data;char data_buf[100]="";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;char *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=strlen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]='\0';replace=strchr(data, '\r');if (replace) *replace='\0';replace=strchr(data, '\n');if (replace) *replace='\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}_main_data=data;b_main_sink();}void b_main_sink(){char * data=_main_data;EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);} | void b_main_sink();static void main(){char * data;char data_buf[100]="";data=data_buf;strcat(data, "*.*");_main_data=data;b_main_sink();}void b_main_sink(){char * data=_main_data;EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);} |
void main(){wchar_t * data;data=new wchar_t[100];if(global_returns_t_or_f()){}else{}{wchar_t dest[50]=L"";memmove(dest, data, wcslen(data)*sizeof(wchar_t));printWLine(data);delete [] data;}} | static void main(){wchar_t * data;data=new wchar_t[100];if(global_returns_t_or_f()){}else{}{wchar_t dest[50]=L"";memmove(dest, data, wcslen(data)*sizeof(wchar_t));printWLine(data);delete [] data;}} |
void _main(){char * data;char data_mainbuf[50];char data_goodbuf[100];if(global_returns_t_or_f()){data=data_mainbuf;}else{data=data_goodbuf;}{char src[100];strcpy(data, src);printLine(data);}} | static void main(){char * data;char data_badbuf[50];char data_goodbuf[100];if(global_returns_t_or_f()){data=data_goodbuf;}else{data=data_goodbuf;}{char src[100];strcpy(data, src);printLine(data);}} |
void _main(){char * data;char * data_buf=(char *)ALLOCA(100*sizeof(char));data=data_buf;{char dest[50]="";strcpy(dest, data);printLine(data);}} | static void main(){char * data;char * data_buf=(char *)ALLOCA(100*sizeof(char));data=data_buf;{char dest[50]="";strcpy(dest, data);printLine(data);}} |
static void main_sink(char * data){printLine(data);}void main(){char * data;void (*func_ptr) (char *)=main_sink;data=NULL;data=new char[100];memset(data, 'A', 100-1);data[100-1]='\0';delete [] data;func_ptr(data);} | static void main_sink(char * data){}static void main(){char * data;void (*func_ptr) (char *)=main_sink;data=NULL;data=new char[100];memset(data, 'A', 100-1);data[100-1]='\0';delete [] data;func_ptr(data);} |
void _main(){short data;data=0;if(global_returns_t_or_f()){fscanf (stdin, "%hd", &data);}else{data=100-1;}{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){memmove(dest, src, data);}printLine(dest);}} | static void main(){short data;data=0;if(global_returns_t_or_f()){data=100-1;}else{data=100-1;}{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){memmove(dest, src, data);}printLine(dest);}} |
void _main(){wchar_t * data;wchar_t * data_mainbuf=(wchar_t *)ALLOCA(50*sizeof(wchar_t));wchar_t * data_goodbuf=(wchar_t *)ALLOCA(100*sizeof(wchar_t));if(global_returns_t_or_f()){data=data_mainbuf;}else{data=data_goodbuf;}{wchar_t dest[100];wmemset(dest, L'C', 100-1);memmove(dest, data, wcslen(dest)*sizeof(wchar_t));dest[100-1]=L'\0';printWLine(dest);}} | static void main(){wchar_t * data;wchar_t * data_badbuf=(wchar_t *)ALLOCA(50*sizeof(wchar_t));wchar_t * data_goodbuf=(wchar_t *)ALLOCA(100*sizeof(wchar_t));if(global_returns_t_or_f()){data=data_goodbuf;}else{data=data_goodbuf;}{wchar_t dest[100];wmemset(dest, L'C', 100-1);memmove(dest, data, wcslen(dest)*sizeof(wchar_t));dest[100-1]=L'\0';printWLine(dest);}} |
void main_sink_b(wchar_t * data);void main(){wchar_t * data;data=NULL;{wchar_t mystring[]=L"mystring";data=wcsdup(mystring);}main_sink_b(data);}void main_sink_c(wchar_t * data);void main_sink_b(wchar_t * data){main_sink_c(data);}void main_sink_d(wchar_t * data);void main_sink_c(wchar_t * data){main_sink_d(data);}void main_sink_d(wchar_t * data){delete [] data;} | static void main(){wchar_t * data;data=NULL;{wchar_t mystring[]=L"mystring";data=wcsdup(mystring);}main_sink_b(data);}void main_sink_b(wchar_t * data){main_sink_c(data);}void main_sink_c(wchar_t * data){main_sink_d(data);}void main_sink_d(wchar_t * data){free(data);} |
void _main(){wchar_t * data;_union_type my_union;wchar_t * data_mainbuf=(wchar_t *)ALLOCA(50*sizeof(wchar_t));wchar_t * data_goodbuf=(wchar_t *)ALLOCA(100*sizeof(wchar_t));data=data_mainbuf;my_union.a=data;{wchar_t * data=my_union.b;{wchar_t src[100];wcsncpy(data, src, 100);printWLine(data);}}} | static void main(){wchar_t * data;_union_type my_union;wchar_t * data_badbuf=(wchar_t *)ALLOCA(50*sizeof(wchar_t));wchar_t * data_goodbuf=(wchar_t *)ALLOCA(100*sizeof(wchar_t));data=data_goodbuf;my_union.a=data;{wchar_t * data=my_union.b;{wchar_t src[100];wcsncpy(data, src, 100);printWLine(data);}}} |
void main(){twointsclass * data;union_type my_union;data=NULL;data=(twointsclass *)malloc(100*sizeof(twointsclass));my_union.a=data;{twointsclass * data=my_union.b;delete [] data;}} | static void main(){twointsclass * data;union_type my_union;data=NULL;data=(twointsclass *)malloc(100*sizeof(twointsclass));my_union.a=data;{twointsclass * data=my_union.b;free(data);}} |
void main_sink(int data);void main(){int data;void (*func_ptr) (int)=main_sink;data=-1;data=RAND32();func_ptr(data);}void main_sink(int data){{wchar_t * wchar_t_string;if (data > 0){wchar_t_string=new wchar_t[data];wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);delete [] wchar_t_string;}else{printLine("Input is less than 0");}}} | static void main(){int data;void (*func_ptr) (int)=main_sink;data=-1;data=20;func_ptr(data);}void main_sink(int data){{wchar_t * wchar_t_string;if (data > 0){wchar_t_string=new wchar_t[data];wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);delete [] wchar_t_string;}else{printLine("Input is less than 0");}}} |
void b_main_sink(char * data);void _main(){char * data;void (*func_ptr) (char *)=b_main_sink;data=(char *)malloc(100*sizeof(char));data[0]='\0';{size_t data_len=strlen(data);if(100-data_len > 1){fgets(data+data_len, (int)(100-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}func_ptr(data);}void b_main_sink(char * data){for (;*data!='\0';data++){if (*data==SEARCH_CHAR){printLine("We have a match!");break;}}free(data);} | void b_main_sink(char * data);static void main(){char * data;void (*func_ptr) (char *)=b_main_sink;data=(char *)malloc(100*sizeof(char));data[0]='\0';{size_t data_len=strlen(data);if(100-data_len > 1){fgets(data+data_len, (int)(100-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}func_ptr(data);}void b_main_sink(char * data){{size_t i;for (i=0;i < strlen(data);i++){if (data[i]==SEARCH_CHAR){printLine("We have a match!");break;}}free(data);}} |
void main_sink(twointsclass * data);void main(){twointsclass * data;void (*func_ptr) (twointsclass *)=main_sink;data=NULL;data=new twointsclass[50];func_ptr(data);}void main_sink(twointsclass * data){{twointsclass src[100];{size_t i;for (i=0;i < 100;i++){src[i].a=0;src[i].b=0;}}memmove(data, src, 100*sizeof(twointsclass));printIntLine(data[0].a);delete [] data;}} | void main_sink(twointsclass * data);static void main(){twointsclass * data;void (*func_ptr) (twointsclass *)=main_sink;data=NULL;data=new twointsclass[100];func_ptr(data);}void main_sink(twointsclass * data){{twointsclass src[100];{size_t i;for (i=0;i < 100;i++){src[i].a=0;src[i].b=0;}}memmove(data, src, 100*sizeof(twointsclass));printIntLine(data[0].a);delete [] data;}} |
void b_main_sink(wchar_t * data);void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);wchar_t * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){wcsncat(data+data_len, environment, 100-data_len-1);}}b_main_sink(data);}void c_main_sink(wchar_t * data);void b_main_sink(wchar_t * data){c_main_sink(data);}void d_main_sink(wchar_t * data);void c_main_sink(wchar_t * data){d_main_sink(data);}void e_main_sink(wchar_t * data);void d_main_sink(wchar_t * data){e_main_sink(data);}static void main_vasink(wchar_t * data, ...){{wchar_t dest[100]=L"";va_list args;va_start(args, data);_vsnwprintf(dest, 100-1, data, args);va_end(args);printWLine(dest);}}void e_main_sink(wchar_t * data){main_vasink(data, data);} | static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;wcscpy(data, L"fixedstringtest");b_main_sink(data);}void b_main_sink(wchar_t * data){c_main_sink(data);}void c_main_sink(wchar_t * data){d_main_sink(data);}void d_main_sink(wchar_t * data){e_main_sink(data);}static void main_vasink(wchar_t * data, ...){{wchar_t dest[100]=L"";va_list args;va_start(args, data);_vsnwprintf(dest, 100-1, data, args);va_end(args);printWLine(dest);}}void e_main_sink(wchar_t * data){main_vasink(data, data);} |
void b_main_sink(unsigned char data_array[]);void _main(){unsigned char data;unsigned char data_array[5];data=' ';data=(unsigned char)rand();data_array[2]=data;b_main_sink(data_array);}void b_main_sink(unsigned char data_array[]){unsigned char data=data_array[2];{unsigned char result=data * data;printHexUnsignedCharLine(result);}} | static void main(){unsigned char data;unsigned char data_array[5];data=' ';data=(unsigned char)rand();data_array[2]=data;b_main_sink(data_array);}void b_main_sink(unsigned char data_array[]){unsigned char data=data_array[2];{unsigned char result=-1;if (data <=(unsigned char)sqrt((unsigned char)UCHAR_MAX)){result=data * data;printHexUnsignedCharLine(result);}else{printLine("Input value is too large to perform arithmetic safely.");}}} |
void b_main_sink(char * * data_ptr);void _main(){char * data;char data_buf[100];memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf-8;b_main_sink(&data);}void b_main_sink(char * * data_ptr){char * data=*data_ptr;{char dest[100];strcpy(dest, data);printLine(dest);}} | void b_main_sink(char * * data);static void main(){char * data;char data_buf[100];memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf;b_main_sink(&data);}void b_main_sink(char * * data_ptr){char * data=*data_ptr;{char dest[100];strcpy(dest, data);printLine(dest);}} |
void b_main_sink(wchar_t * * data_ptr);void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;wchar_t *replace;SOCKET connect_socket=INVALID_SOCKET;size_t data_len=wcslen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]=L'\0';replace=wcschr(data, L'\r');if (replace) *replace=L'\0';replace=wcschr(data, L'\n');if (replace) *replace=L'\0';}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;wprintf(data);} | static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;wchar_t *replace;SOCKET connect_socket=INVALID_SOCKET;size_t data_len=wcslen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]=L'\0';replace=wcschr(data, L'\r');if (replace) *replace=L'\0';replace=wcschr(data, L'\n');if (replace) *replace=L'\0';}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;wprintf(L"%s\n", data);} |
void main_sink(char * * data_ptr);void main(){char * data;data=NULL;data=(char *)calloc(100, sizeof(char));main_sink(&data);}void main_sink(char * * data_ptr){char * data=*data_ptr;delete data;} | static void main(){char * data;data=NULL;data=(char *)calloc(100, sizeof(char));main_sink(&data);}void main_sink(char * * data_ptr){char * data=*data_ptr;free(data);} |
void _main(){wchar_t * data;data=NULL;if(global_returns_t_or_f()){{wchar_t * data_buf=(wchar_t *)malloc(100*sizeof(wchar_t));wmemset(data_buf, L'A', 100-1);data_buf[100-1]=L'\0';data=data_buf-8;}}else{{wchar_t * data_buf=(wchar_t *)malloc(100*sizeof(wchar_t));wmemset(data_buf, L'A', 100-1);data_buf[100-1]=L'\0';data=data_buf;}}{wchar_t src[100];wcscpy(data, src);printWLine(data);}} | static void main(){wchar_t * data;data=NULL;if(global_returns_t_or_f()){{wchar_t * data_buf=(wchar_t *)malloc(100*sizeof(wchar_t));wmemset(data_buf, L'A', 100-1);data_buf[100-1]=L'\0';data=data_buf;}}else{{wchar_t * data_buf=(wchar_t *)malloc(100*sizeof(wchar_t));wmemset(data_buf, L'A', 100-1);data_buf[100-1]=L'\0';data=data_buf;}}{wchar_t src[100];wcscpy(data, src);printWLine(data);}} |
void _main(){int data;data=-1;data=OPEN("BadSource_open.txt", O_RDWR|O_CREAT, S_IREAD|S_IWRITE);{int data_copy=data;int data=data_copy;if (data!=-1){CloseHandle((HANDLE)data);}}} | static void main(){int data;data=-1;data=OPEN("BadSource_open.txt", O_RDWR|O_CREAT, S_IREAD|S_IWRITE);{int data_copy=data;int data=data_copy;if (data!=-1){CLOSE(data);}}} |
void main_sink(void * void_data_ptr);void main(){twointsclass * data;data=NULL;data=new twointsclass;data->a=1;data->b=2;delete data;main_sink(&data);}void main_sink(void * void_data_ptr){twointsclass * * data_ptr=(twointsclass * *)void_data_ptr;twointsclass * data=(*data_ptr);printIntLine(data->a);} | static void main(){twointsclass * data;data=NULL;data=new twointsclass;data->a=1;data->b=2;main_sink(&data);}void main_sink(void * void_data_ptr){twointsclass * * data_ptr=(twointsclass * *)void_data_ptr;twointsclass * data=(*data_ptr);printIntLine(data->a);} |
void _main(){int data;data=-1;if(global_returns_t_or_f()){data=0;}else{data=7;}printIntLine(100 % data);} | static void main(){int data;data=-1;if(global_returns_t_or_f()){data=7;}else{data=7;}printIntLine(100 % data);} |
void b_main_sink(int data);void _main(){int data;data=-1;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);data=atoi(input_buf);}b_main_sink(data);}void b_main_sink(int data){{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){memmove(dest, src, data);}printLine(dest);}} | void b_main_sink(int data);static void main(){int data;data=-1;data=100-1;b_main_sink(data);}void b_main_sink(int data){{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){memmove(dest, src, data);}printLine(dest);}} |
void main_sink();void main(){wchar_t * data;data=NULL;data=new wchar_t[50];_main_data=data;main_sink();}void main_sink(){wchar_t * data=_main_data;{wchar_t dest[100];wmemset(dest, L'C', 100-1);memmove(dest, data, wcslen(dest)*sizeof(wchar_t));dest[100-1]=L'\0';printWLine(dest);delete [] data;}} | void main_sink();static void main(){wchar_t * data;data=NULL;data=new wchar_t[100];_main_data=data;main_sink();}void main_sink(){wchar_t * data=_main_data;{wchar_t dest[100];wmemset(dest, L'C', 100-1);memmove(dest, data, wcslen(dest)*sizeof(wchar_t));dest[100-1]=L'\0';printWLine(dest);delete [] data;}} |
void _main(){unsigned int data;data=0;data=(unsigned int)RAND32();{unsigned int result=data-1;printUnsignedLine(result);}} | static void main(){unsigned int data;data=0;data=5;{unsigned int result=data-1;printUnsignedLine(result);}} |
void b_main_sink(wchar_t * data_array[]);void _main(){wchar_t * data;wchar_t * data_array[5];wchar_t data_buf[100]=L"";data=data_buf;wcscpy(data, BAD_OS_COMMAND);data_array[2]=data;b_main_sink(data_array);}void b_main_sink(wchar_t * data_array[]){wchar_t * data=data_array[2];{FILE *pipe;pipe=POPEN(data, L"wb");if (pipe!=NULL) PCLOSE(pipe);}} | void b_main_sink(wchar_t * data_array[]);static void main(){wchar_t * data;wchar_t * data_array[5];wchar_t data_buf[100]=L"";data=data_buf;wcscpy(data, GOOD_OS_COMMAND);data_array[2]=data;b_main_sink(data_array);}void b_main_sink(wchar_t * data_array[]){wchar_t * data=data_array[2];{FILE *pipe;pipe=POPEN(data, L"wb");if (pipe!=NULL) PCLOSE(pipe);}} |
void b_main_sink(int * * data_ptr);void _main(){int * data;{int data_buf[100];{size_t i;for (i=0;i < 100;i++){data_buf[i]=5;}}data=data_buf;}b_main_sink(&data);}void b_main_sink(int * * data_ptr){int * data=*data_ptr;printIntLine(data[0]);free(data);} | void b_main_sink(int * * data);static void main(){int * data;{int * data_buf=(int *)malloc(100*sizeof(int));{size_t i;for (i=0;i < 100;i++){data_buf[i]=5;}}data=data_buf;}b_main_sink(&data);}void b_main_sink(int * * data_ptr){int * data=*data_ptr;printIntLine(data[0]);free(data);} |
void b_main_sink(char * data);void _main(){char * data;char data_buf[100]="";data=data_buf;{size_t data_len=strlen(data);char * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){strncat(data+data_len, environment, 100-data_len-1);}}b_main_sink(data);}void b_main_sink(char * data){if (strstr(PASSWORD, data)!=NULL) printLine("Access granted");else printLine("Access denied!");} | static void main(){char * data;char data_buf[100]="";data=data_buf;{size_t data_len=strlen(data);char * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){strncat(data+data_len, environment, 100-data_len-1);}}b_main_sink(data);}void b_main_sink(char * data){if (strcmp(PASSWORD, data)==0) printLine("Access granted");else printLine("Access denied!");} |
static void main_vasinkb(wchar_t * data, ...){{va_list args;va_start(args, data);vfwprintf(stdout, data, args);va_end(args);}}static void main_vasinkg(wchar_t * data, ...){{va_list args;va_start(args, data);vfwprintf(stdout, L"%s", args);va_end(args);}}void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;if(global_returns_t_or_f()){{size_t data_len=wcslen(data);wchar_t * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){wcsncat(data+data_len, environment, 100-data_len-1);}}}else{wcscpy(data, L"fixedstringtest");}if(global_returns_t_or_f()){main_vasinkb(data, data);}else{main_vasinkg(data, data);}} | static void main_vasinkg(wchar_t * data, ...){{va_list args;va_start(args, data);vfwprintf(stdout, L"%s", args);va_end(args);}}static void main_vasinkb(wchar_t * data, ...){{va_list args;va_start(args, data);vfwprintf(stdout, data, args);va_end(args);}}static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;if(global_returns_f()){wcscpy(data, L"fixedstringtest");}else{wcscpy(data, L"fixedstringtest");}if(global_returns_t()){main_vasinkb(data, data);}else{main_vasinkb(data, data);}} |
void b_main_sink(FILE * data);void _main(){FILE * data;data=NULL;data=fopen("file.txt", "w+");b_main_sink(data);}void c_main_sink(FILE * data);void b_main_sink(FILE * data){c_main_sink(data);}void c_main_sink(FILE * data){fclose(data);} | void b_main_sink(FILE * data);static void main(){FILE * data;data=NULL;data=fopen("file.txt", "w+");b_main_sink(data);}void c_main_sink(FILE * data);void b_main_sink(FILE * data){c_main_sink(data);}void c_main_sink(FILE * data){if (data!=NULL){fclose(data);}} |
static void main_sink(int data){{int result=data * 2;printIntLine(result);}}void _main(){int data;data=-1;data=INT_MAX;main_sink(data);} | static void main_sink(int data){{int result=data * 2;printIntLine(result);}}static void main(){int data;data=-1;data=5;main_sink(data);} |
void b_main_sink(void * void_data_ptr);void _main(){wchar_t * data;data=NULL;data=(wchar_t *)malloc(100*sizeof(wchar_t));free(data);b_main_sink(&data);}void b_main_sink(void * void_data_ptr){wchar_t * * data_ptr=(wchar_t * *)void_data_ptr;wchar_t * data=(*data_ptr);free(data);} | static void main(){wchar_t * data;data=NULL;data=(wchar_t *)malloc(100*sizeof(wchar_t));free(data);b_main_sink(&data);}void b_main_sink(void * void_data_ptr){wchar_t * * data_ptr=(wchar_t * *)void_data_ptr;wchar_t * data=(*data_ptr);} |
void _main(){int * data;data=NULL;data=(int *)malloc(50*sizeof(int));{{size_t i;for (i=0;i < 100;i++){data[i]=src[i];}printIntLine(data[0]);free(data);}}} | static void main(){int * data;data=NULL;data=(int *)malloc(100*sizeof(int));{{size_t i;for (i=0;i < 100;i++){data[i]=src[i];}printIntLine(data[0]);free(data);}}} |
void b_main_sink(_struct_type my_struct);void _main(){char * data;_struct_type my_struct;char data_buf[100]="";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;char *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=strlen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]='\0';replace=strchr(data, '\r');if (replace) *replace='\0';replace=strchr(data, '\n');if (replace) *replace='\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}my_struct.a=data;b_main_sink(my_struct);}static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vfprintf(stdout, data, args);va_end(args);}}void b_main_sink(_struct_type my_struct){char * data=my_struct.a;main_vasink(data, data);} | static void main(){char * data;_struct_type my_struct;char data_buf[100]="";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;char *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=strlen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]='\0';replace=strchr(data, '\r');if (replace) *replace='\0';replace=strchr(data, '\n');if (replace) *replace='\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}my_struct.a=data;b_main_sink(my_struct);}static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vfprintf(stdout, "%s", args);va_end(args);}}void b_main_sink(_struct_type my_struct){char * data=my_struct.a;main_vasink(data, data);} |
void _main(){unsigned int data;data=0;data=0;{unsigned int result=data-1;printUnsignedLine(result);}} | static void main(){unsigned int data;data=0;data=5;{unsigned int result=data-1;printUnsignedLine(result);}} |
void main_sink_b(twoints * data);void main(){twoints * data;data=NULL;data=new twoints[100];data[0].a=0;data[0].b=0;printStructLine(&data[0]);main_sink_b(data);}void main_sink_c(twoints * data);void main_sink_b(twoints * data){main_sink_c(data);}void main_sink_c(twoints * data){} | static void main(){twoints * data;data=NULL;{twoints data_goodbuf[100];data=data_goodbuf;data[0].a=0;data[0].b=0;printStructLine(&data[0]);}main_sink_b(data);}void main_sink_b(twoints * data){main_sink_c(data);}void main_sink_c(twoints * data){} |
void main(){char * data;data=NULL;data=new char;free(data);} | static void main(){char * data;data=NULL;data=new char;delete data;} |
void _main_sink(int data){{char c=(char)data;printHexCharLine(c);}}void _main(){int data;data=-1;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=atoi(input_buf);}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}_main_sink(data);} | void _main_sink(int data){{char c=(char)data;printHexCharLine(c);}}static void main(){int data;data=-1;data=CHAR_MAX-5;_main_sink(data);} |
int b_main_source(int data);void _main(){int data;data=b_main_source(data);{wchar_t data_buf[10]=L"AAAAAAAAA";if (data >=0){printWcharLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}}int b_main_source(int data){{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=atoi(input_buf);}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}return data;} | static void main(){int data;data=b_main_source(data);{wchar_t data_buf[10]=L"AAAAAAAAA";{printWcharLine(data_buf[data]);}else{printLine("ERROR: Array index is out-of-bounds");}}}int b_main_source(int data){{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=atoi(input_buf);}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}return data;} |
static void main_sink(wchar_t * data){}void _main(){wchar_t * data;void (*func_ptr) (wchar_t *)=main_sink;data=NULL;data=(wchar_t *)malloc(100*sizeof(wchar_t));wcscpy(data, L"A String");printWLine(data);func_ptr(data);} | static void main_sink(wchar_t * data){}static void main(){wchar_t * data;void (*func_ptr) (wchar_t *)=main_sink;data=NULL;{wchar_t data_goodbuf[100];data=data_goodbuf;wcscpy(data, L"A String");printWLine(data);}func_ptr(data);} |
void _main(){if(global_returns_t_or_f()){{wchar_t * pipeName=L"\\\\.\\pipe\\mypipe";HANDLE hPipe=INVALID_HANDLE_VALUE;hPipe=CreateNamedPipeW( pipeName, FILE_FLAG_FIRST_PIPE_INSTANCE, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFSIZE, NMPWAIT_USE_DEFAULT_WAIT, NULL);if (hPipe==INVALID_HANDLE_VALUE){exit(1);}if (GetLastError()==ERROR_ACCESS_DENIED){exit(1);}if (ImpersonateNamedPipeClient(hPipe) > 0){exit(1);}CloseHandle(hPipe);}}else{{wchar_t * pipeName=L"\\\\.\\pipe\\mypipe";HANDLE hPipe=INVALID_HANDLE_VALUE;hPipe=CreateNamedPipeW( pipeName, FILE_FLAG_FIRST_PIPE_INSTANCE, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFSIZE, NMPWAIT_USE_DEFAULT_WAIT, NULL);if (hPipe==INVALID_HANDLE_VALUE){exit(1);}if (GetLastError()==ERROR_ACCESS_DENIED){exit(1);}if (!ImpersonateNamedPipeClient(hPipe)){exit(1);}CloseHandle(hPipe);}}} | static void main(){if(global_returns_t_or_f()){{wchar_t * pipeName=L"\\\\.\\pipe\\mypipe";HANDLE hPipe=INVALID_HANDLE_VALUE;hPipe=CreateNamedPipeW( pipeName, FILE_FLAG_FIRST_PIPE_INSTANCE, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFSIZE, NMPWAIT_USE_DEFAULT_WAIT, NULL);if (hPipe==INVALID_HANDLE_VALUE){exit(1);}if (GetLastError()==ERROR_ACCESS_DENIED){exit(1);}if (!ImpersonateNamedPipeClient(hPipe)){exit(1);}CloseHandle(hPipe);}}else{{wchar_t * pipeName=L"\\\\.\\pipe\\mypipe";HANDLE hPipe=INVALID_HANDLE_VALUE;hPipe=CreateNamedPipeW( pipeName, FILE_FLAG_FIRST_PIPE_INSTANCE, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFSIZE, NMPWAIT_USE_DEFAULT_WAIT, NULL);if (hPipe==INVALID_HANDLE_VALUE){exit(1);}if (GetLastError()==ERROR_ACCESS_DENIED){exit(1);}if (!ImpersonateNamedPipeClient(hPipe)){exit(1);}CloseHandle(hPipe);}}} |
void b_main_sink(int * count_ptr);void _main(){int count;count=-1;count=RAND32();b_main_sink(&count);}void b_main_sink(int * count_ptr){int count=*count_ptr;{size_t i=0;FILE *file=NULL;const char *filename="output_main.txt";file=fopen(filename, "w+");if (file==NULL) exit(1);for (i=0;i < (size_t)count;i++){if (strlen(SENTENCE)!=fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), file)) exit(1);}if (file){fclose(file);}}} | static void main(){int count;count=-1;count=20;b_main_sink(&count);}void b_main_sink(int * count_ptr){int count=*count_ptr;{size_t i=0;FILE *file=NULL;const char *filename="output_bad.txt";file=fopen(filename, "w+");if (file==NULL) exit(1);for (i=0;i < (size_t)count;i++){if (strlen(SENTENCE)!=fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), file)) exit(1);}if (file){fclose(file);}}} |
void main(){if(global_returns_t_or_f()){{throw 25;}}else{{try{throw 25;}catch (int e){printLine("Exception caught-value: ");printIntLine(e);}}}} | static void main(){if(global_returns_t_or_f()){{try{throw 25;}catch (int e){printLine("Exception caught-value: ");printIntLine(e);}}}else{{try{throw 25;}catch (int e){printLine("Exception caught-value: ");printIntLine(e);}}}} |
static void main_vasink(char * data, ...){{char dest[100]="";va_list args;va_start(args, data);vsnprintf(dest, 100-1, data, args);va_end(args);printLine(dest);}}void _main(){char * data;void (*func_ptr) (char *, ...)=main_vasink;char data_buf[100]="";data=data_buf;{size_t data_len=strlen(data);FILE * pFile;if(100-data_len > 1){pFile=FOPEN("C:\\temp\\file.txt", "r");if (pFile!=NULL){fgets(data+data_len, (int)(100-data_len), pFile);fclose(pFile);}}}func_ptr(data, data);} | static void main_vasink(char * data, ...){{char dest[100]="";va_list args;va_start(args, data);vsnprintf(dest, 100-1, data, args);va_end(args);printLine(dest);}}static void main(){char * data;void (*func_ptr) (char *, ...)=main_vasink;char data_buf[100]="";data=data_buf;strcpy(data, "fixedstringtest");func_ptr(data);} |
void b_main_sink(int data);void _main(){int data;data=-1;fscanf (stdin, "%d", &data);b_main_sink(data);}void b_main_sink(int data){{wchar_t * wchar_t_string;if (data > 0){wchar_t_string=(wchar_t *)malloc(data*sizeof(wchar_t));wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);free(wchar_t_string);}else{printLine("Input is less than 0");}}} | static void main(){int data;data=-1;fscanf (stdin, "%d", &data);b_main_sink(data);}void b_main_sink(int data){{wchar_t * wchar_t_string;if ((size_t)data > wcslen(HELLO_STRING) && data < 100){wchar_t_string=(wchar_t *)malloc(data*sizeof(wchar_t));wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);free(wchar_t_string);}else{printLine("Input is less than the length of the source string or too large");}}} |
void main_sink(int data);void main(){int data;void (*func_ptr) (int)=main_sink;data=-1;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);data=atoi(input_buf);}func_ptr(data);}void main_sink(int data){{wchar_t * wchar_t_string;if (data > 0){wchar_t_string=new wchar_t[data];wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);delete [] wchar_t_string;}else{printLine("Input is less than 0");}}} | static void main(){int data;void (*func_ptr) (int)=main_sink;data=-1;data=20;func_ptr(data);}void main_sink(int data){{wchar_t * wchar_t_string;if (data > 0){wchar_t_string=new wchar_t[data];wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);delete [] wchar_t_string;}else{printLine("Input is less than 0");}}} |
static void main_sink(){wchar_t * data=main_data;printWcharLine(*data);}void main(){wchar_t * data;data=NULL;data=new wchar_t;delete data;main_data=data;main_sink();} | static void main_sink(){wchar_t * data=main_data;printWcharLine(*data);}static void main(){wchar_t * data;data=NULL;data=new wchar_t;main_data=data;main_sink();} |
static void main_sink(){wchar_t * data=main_data;delete [] data;}void main(){wchar_t * data;data=NULL;{wchar_t mystring[]=L"mystring";data=wcsdup(mystring);}main_data=data;main_sink();} | static void main_sink(){wchar_t * data=main_data;delete [] data;}static void main(){wchar_t * data;data=NULL;data=new wchar_t[100];main_data=data;main_sink();} |
wchar_t * b_main_source(wchar_t * data);void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;data=b_main_source(data);wprintf(data);}wchar_t * b_main_source(wchar_t * data){{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;wchar_t *replace;SOCKET connect_socket=INVALID_SOCKET;size_t data_len=wcslen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]=L'\0';replace=wcschr(data, L'\r');if (replace) *replace=L'\0';replace=wcschr(data, L'\n');if (replace) *replace=L'\0';}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}return data;} | static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;data=b_main_source(data);wprintf(data);}wchar_t * b_main_source(wchar_t * data){wcscpy(data, L"fixedstringtest");return data;} |
wchar_t * b_main_source(wchar_t * data);void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;data=b_main_source(data);if (wcsncmp(PASSWORD, data, wcslen(data))==0) printLine("Access granted");else printLine("Access denied!");}wchar_t * b_main_source(wchar_t * data){data=L"P";return data;} | static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;data=b_main_source(data);if (wcsncmp(PASSWORD, data, wcslen(data))==0) printLine("Access granted");else printLine("Access denied!");}wchar_t * b_main_source(wchar_t * data){data=PASSWORD;return data;} |
static void main_sink(){wchar_t * data=_main_data;if (wcsncmp(PASSWORD, data, wcslen(PASSWORD))==0) printLine("Access granted");else printLine("Access denied!");}void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);FILE * pFile;if(100-data_len > 1){pFile=FOPEN(L"C:\\temp\\file.txt", L"r");if (pFile!=NULL){fgetws(data+data_len, (int)(100-data_len), pFile);fclose(pFile);}}}_main_data=data;main_sink();} | static void main_sink(){wchar_t * data=_main_data;if (wcsncmp(PASSWORD, data, wcslen(PASSWORD))==0) printLine("Access granted");else printLine("Access denied!");}static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;data=PASSWORD;_main_data=data;main_sink();} |
void _main(){char * data;char data_buf[100]=FULL_COMMAND;data=data_buf;if(global_returns_t_or_f()){{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;char *replace;SOCKET connect_socket=INVALID_SOCKET;size_t data_len=strlen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]='\0';replace=strchr(data, '\r');if (replace) *replace='\0';replace=strchr(data, '\n');if (replace) *replace='\0';}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}}else{strcat(data, "*.*");}system(data);} | static void main(){char * data;char data_buf[100]=FULL_COMMAND;data=data_buf;if(global_returns_t_or_f()){strcat(data, "*.*");}else{strcat(data, "*.*");}system(data);} |
void main_sink(void * void_data_ptr);void main(){int * data;data=NULL;data=(int *)malloc(100*sizeof(int));main_sink(&data);}void main_sink(void * void_data_ptr){int * * data_ptr=(int * *)void_data_ptr;int * data=(*data_ptr);delete data;} | static void main(){int * data;data=NULL;data=new int;main_sink(&data);}void main_sink(void * void_data_ptr){int * * data_ptr=(int * *)void_data_ptr;int * data=(*data_ptr);delete data;} |
void main_sink(void * void_data_ptr);void main(){int data;data=-1;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);data=atoi(input_buf);}main_sink(&data);}void main_sink(void * void_data_ptr){int * data_ptr=(int *)void_data_ptr;int data=(*data_ptr);{wchar_t * wchar_t_string;if (data > 0){wchar_t_string=new wchar_t[data];wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);delete [] wchar_t_string;}else{printLine("Input is less than 0");}}} | static void main(){int data;data=-1;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);data=atoi(input_buf);}main_sink(&data);}void main_sink(void * void_data_ptr){int * data_ptr=(int *)void_data_ptr;int data=(*data_ptr);{wchar_t * wchar_t_string;if ((size_t)data > wcslen(HELLO_STRING) && data < 100){wchar_t_string=new wchar_t[data];wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);delete [] wchar_t_string;}else{printLine("Input is less than the length of the source string or too large");}}} |
void _main(){int * data;int data_uninit_array[10];data=data_uninit_array;{int i;for(i=0;i<10;i++){printIntLine(data[i]);}}} | static void main(){int * data;int data_uninit_array[10];data=data_uninit_array;{int i;for(i=0;i<10;i++){data[i]=i;}}{int i;for(i=0;i<10;i++){printIntLine(data[i]);}}} |
static void main_sink(){char * data=_main_data;printLine(data);free(data);}void _main(){char * data;{char data_buf[100];data=data_buf;}_main_data=data;main_sink();} | static void main_sink(){char * data=_main_data;printLine(data);free(data);}static void main(){char * data;{char * data_buf=(char *)malloc(100*sizeof(char));data=data_buf;}_main_data=data;main_sink();} |
static void main_sink(wchar_t * data){delete [] data;}void main(){wchar_t * data;data=NULL;data=NULL;data=(wchar_t *)realloc(data, 100*sizeof(wchar_t));main_sink(data);} | static void main_sink(wchar_t * data){free(data);}static void main(){wchar_t * data;data=NULL;data=NULL;data=(wchar_t *)realloc(data, 100*sizeof(wchar_t));main_sink(data);} |
void b_main_sink(char * data);void _main(){char * data;data=NULL;data=(char *)malloc(50*sizeof(char));b_main_sink(data);}void c_main_sink(char * data);void b_main_sink(char * data){c_main_sink(data);}void c_main_sink(char * data){{char src[100];strncpy(data, src, 100);printLine(data);free(data);}} | void b_main_sink(char * data);static void main(){char * data;data=NULL;data=(char *)malloc(100*sizeof(char));b_main_sink(data);}void c_main_sink(char * data);void b_main_sink(char * data){c_main_sink(data);}void c_main_sink(char * data){{char src[100];strncpy(data, src, 100);printLine(data);free(data);}} |
void _main_sink(char * data){{HANDLE hFile;hFile=CreateFileA(data, (GENERIC_WRITE|GENERIC_READ), 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);if (hFile!=INVALID_HANDLE_VALUE){CloseHandle(hFile);}}}void _main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;{size_t data_len=strlen(data);if(FILENAME_MAX-data_len > 1){fgets(data+data_len, (int)(FILENAME_MAX-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}_main_sink(data);} | void _main_sink(char * data){{HANDLE hFile;hFile=CreateFileA(data, (GENERIC_WRITE|GENERIC_READ), 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);if (hFile!=INVALID_HANDLE_VALUE){CloseHandle(hFile);}}}static void main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;strcpy(data, "c:\\temp\\file.txt");strcpy(data, "/tmp/file.txt");_main_sink(data);} |
void main_source(char * &data);void main(){char * data;data=NULL;main_source(data);{char src[100];strcpy(data, src);printLine(data);delete [] data;}}void main_source(char * &data){data=new char[50];} | void main_source(char * &data);static void main(){char * data;data=NULL;main_source(data);{char src[100];strcpy(data, src);printLine(data);delete [] data;}}void main_source(char * &data){data=new char[100];} |
void b_main_sink(char * data);void _main(){char * data;char * data_buf=(char *)ALLOCA(100*sizeof(char));memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf-8;b_main_sink(data);}void b_main_sink(char * data){{char src[100];strcpy(data, src);printLine(data);}} | void b_main_sink(char * data);static void main(){char * data;char * data_buf=(char *)ALLOCA(100*sizeof(char));memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf;b_main_sink(data);}void b_main_sink(char * data){{char src[100];strcpy(data, src);printLine(data);}} |
void b_main_sink(char * data);void _main(){char * data;char data_buf[100]="";data=data_buf;data="P";b_main_sink(data);}void b_main_sink(char * data){if (strstr(PASSWORD, data)!=NULL) printLine("Access granted");else printLine("Access denied!");} | static void main(){char * data;char data_buf[100]="";data=data_buf;data=PASSWORD;b_main_sink(data);}void b_main_sink(char * data){if (strstr(PASSWORD, data)!=NULL) printLine("Access granted");else printLine("Access denied!");} |
void b_main_sink();void _main(){int data;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=atoi(input_buf);}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}_main_data=data;b_main_sink();}void b_main_sink(){int data=_main_data;{char data_buf[10]="AAAAAAAAA";if (data >=0){printHexCharLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}} | static void main(){int data;data=7;_main_data=data;b_main_sink();}void b_main_sink(){int data=_main_data;{char data_buf[10]="AAAAAAAAA";if (data >=0){printHexCharLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}} |
void main_sink(wchar_t * data);void main(){wchar_t * data;data=NULL;data=new wchar_t[50];main_sink(data);}void main_sink(wchar_t * data){{size_t i, dest_sz;wchar_t dest[100];wmemset(dest, L'C', 100-1);dest_sz=wcslen(dest);for (i=0;i < dest_sz;i++){dest[i]=data[i];}dest[100-1]=L'\0';printWLine(dest);delete [] data;}} | void main_sink(wchar_t * data);static void main(){wchar_t * data;data=NULL;data=new wchar_t[100];main_sink(data);}void main_sink(wchar_t * data){{size_t i, dest_sz;wchar_t dest[100];wmemset(dest, L'C', 100-1);dest_sz=wcslen(dest);for (i=0;i < dest_sz;i++){dest[i]=data[i];}dest[100-1]=L'\0';printWLine(dest);delete [] data;}} |
static void main_sink(){int * data=main_data;delete data;}void main(){int * data;data=NULL;data=new int[100];main_data=data;main_sink();} | static void main_sink(){int * data=main_data;delete [] data;}static void main(){int * data;data=NULL;data=new int[100];main_data=data;main_sink();} |
void b_main_sink(int data);void _main(){int data;data=-1;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET connect_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=atoi(input_buf);}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}b_main_sink(data);}void c_main_sink(int data);void b_main_sink(int data){c_main_sink(data);}void d_main_sink(int data);void c_main_sink(int data){d_main_sink(data);}void d_main_sink(int data){{int result=data+1;printIntLine(result);}} | static void main(){int data;data=-1;data=5;b_main_sink(data);}void b_main_sink(int data){c_main_sink(data);}void c_main_sink(int data){d_main_sink(data);}void d_main_sink(int data){{int result=data+1;printIntLine(result);}} |
void b_main_sink();void _main(){wchar_t * data;wchar_t * data_mainbuf=(wchar_t *)ALLOCA(50*sizeof(wchar_t));wchar_t * data_goodbuf=(wchar_t *)ALLOCA(100*sizeof(wchar_t));data=data_mainbuf;_main_data=data;b_main_sink();}void b_main_sink(){wchar_t * data=_main_data;{wchar_t dest[100];wmemset(dest, L'C', 100-1);memmove(dest, data, wcslen(dest)*sizeof(wchar_t));dest[100-1]=L'\0';printWLine(dest);}} | void b_main_sink();static void main(){wchar_t * data;wchar_t * data_badbuf=(wchar_t *)ALLOCA(50*sizeof(wchar_t));wchar_t * data_goodbuf=(wchar_t *)ALLOCA(100*sizeof(wchar_t));data=data_goodbuf;_main_data=data;b_main_sink();}void b_main_sink(){wchar_t * data=_main_data;{wchar_t dest[100];wmemset(dest, L'C', 100-1);memmove(dest, data, wcslen(dest)*sizeof(wchar_t));dest[100-1]=L'\0';printWLine(dest);}} |
void b_main_sink(char * data);void _main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;{size_t data_len=strlen(data);char * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){strncat(data+data_len, environment, 100-data_len-1);}}b_main_sink(data);}void c_main_sink(char * data);void b_main_sink(char * data){c_main_sink(data);}void c_main_sink(char * data){{FILE *file=NULL;file=FOPEN(data, "wb+");if (file!=NULL) fclose(file);}} | void b_main_sink(char * data);static void main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;strcpy(data, "c:\\temp\\file.txt");strcpy(data, "/tmp/file.txt");b_main_sink(data);}void c_main_sink(char * data);void b_main_sink(char * data){c_main_sink(data);}void c_main_sink(char * data){{FILE *file=NULL;file=FOPEN(data, "wb+");if (file!=NULL) fclose(file);}} |
void main_sink(long long * data);void main(){long long * data;void (*func_ptr) (long long *)=main_sink;data=NULL;data=NULL;data=(long long *)realloc(data, 100*sizeof(long long));func_ptr(data);}void main_sink(long long * data){delete data;} | static void main(){long long * data;void (*func_ptr) (long long *)=main_sink;data=NULL;data=NULL;data=(long long *)realloc(data, 100*sizeof(long long));func_ptr(data);}void main_sink(long long * data){free(data);} |
void b_main_sink(int data);void _main(){int data;data=-1;data=INT_MAX;b_main_sink(data);}void c_main_sink(int data);void b_main_sink(int data){c_main_sink(data);}void d_main_sink(int data);void c_main_sink(int data){d_main_sink(data);}void e_main_sink(int data);void d_main_sink(int data){e_main_sink(data);}void e_main_sink(int data){{int result=data * data;printIntLine(result);}} | static void main(){int data;data=-1;data=5;b_main_sink(data);}void b_main_sink(int data){c_main_sink(data);}void c_main_sink(int data){d_main_sink(data);}void d_main_sink(int data){e_main_sink(data);}void e_main_sink(int data){{int result=data * data;printIntLine(result);}} |
void b_main_sink(wchar_t * data);void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);FILE * pFile;if(100-data_len > 1){pFile=FOPEN(L"C:\\temp\\file.txt", L"r");if (pFile!=NULL){fgetws(data+data_len, (int)(100-data_len), pFile);fclose(pFile);}}}b_main_sink(data);}void c_main_sink(wchar_t * data);void b_main_sink(wchar_t * data){c_main_sink(data);}void d_main_sink(wchar_t * data);void c_main_sink(wchar_t * data){d_main_sink(data);}void d_main_sink(wchar_t * data){if (wcsncmp(PASSWORD, data, wcslen(data))==0) printLine("Access granted");else printLine("Access denied!");} | static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;data=PASSWORD;b_main_sink(data);}void b_main_sink(wchar_t * data){c_main_sink(data);}void c_main_sink(wchar_t * data){d_main_sink(data);}void d_main_sink(wchar_t * data){if (wcsncmp(PASSWORD, data, wcslen(data))==0) printLine("Access granted");else printLine("Access denied!");} |
void b_main_sink(wchar_t * data);void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;wchar_t *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=wcslen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]=L'\0';replace=wcschr(data, L'\r');if (replace) *replace=L'\0';replace=wcschr(data, L'\n');if (replace) *replace=L'\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}b_main_sink(data);}void c_main_sink(wchar_t * data);void b_main_sink(wchar_t * data){c_main_sink(data);}void c_main_sink(wchar_t * data){if (wcsstr(PASSWORD, data)!=NULL) printLine("Access granted");else printLine("Access denied!");} | static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;wchar_t *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=wcslen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]=L'\0';replace=wcschr(data, L'\r');if (replace) *replace=L'\0';replace=wcschr(data, L'\n');if (replace) *replace=L'\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}b_main_sink(data);}void b_main_sink(wchar_t * data){c_main_sink(data);}void c_main_sink(wchar_t * data){if (wcscmp(PASSWORD, data)==0) printLine("Access granted");else printLine("Access denied!");} |
void _main(){char data;char *data_ptr1=&data;char *data_ptr2=&data;data=' ';{char data=*data_ptr1;fscanf (stdin, "%c", &data);}{char data=*data_ptr2;{char result=data-1;printHexCharLine(result);}}} | static void main(){char data;char *data_ptr1=&data;char *data_ptr2=&data;data=' ';{char data=*data_ptr1;fscanf (stdin, "%c", &data);}{char data=*data_ptr2;{char result=0;if (data > CHAR_MIN){result=data-1;printHexCharLine(result);}else{printLine("Input value is too small to perform arithmetic safely.");}}}} |
void b_main_sink(long long * data);void _main(){long long * data;long long data_mainbuf[50];long long data_goodbuf[100];data=data_mainbuf;b_main_sink(data);}void c_main_sink(long long * data);void b_main_sink(long long * data){c_main_sink(data);}void c_main_sink(long long * data){{memcpy(data, src, 100*sizeof(long long));printLongLongLine(data[0]);}} | void b_main_sink(long long * data);static void main(){long long * data;long long data_badbuf[50];long long data_goodbuf[100];data=data_goodbuf;b_main_sink(data);}void c_main_sink(long long * data);void b_main_sink(long long * data){c_main_sink(data);}void c_main_sink(long long * data){{memcpy(data, src, 100*sizeof(long long));printLongLongLine(data[0]);}} |
static void main_sink(){main_struct data=_main_data;* */prev=data.list.prev;next=data.list.next;prev->next=next;next->prev=prev;}void _main(){main_struct data;linked_list head={&head, &head};data.list.next=head.next;data.list.prev=&head;head.next=&data.list;head.next->prev=&data.list;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char*)&data, sizeof(data), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}_main_data=data;main_sink();} | static void main_sink(){bad_struct data=_main_data;* */prev=data.list.prev;next=data.list.next;prev->next=next;next->prev=prev;}static void main(){bad_struct data;linked_list head={&head, &head};data.list.next=head.next;data.list.prev=&head;head.next=&data.list;head.next->prev=&data.list;_main_data=data;main_sink();} |
void b_main_sink(int data);void _main(){int data;data=-1;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);data=atoi(input_buf);}b_main_sink(data);}void b_main_sink(int data){{if (data < 100){char * data_buf=(char *)malloc(data);memset(data_buf, 'A', data-1);data_buf[data-1]='\0';printLine(data_buf);free(data_buf);}}} | void b_main_sink(int data);static void main(){int data;data=-1;data=100-1;b_main_sink(data);}void b_main_sink(int data){{if (data < 100){char * data_buf=(char *)malloc(data);memset(data_buf, 'A', data-1);data_buf[data-1]='\0';printLine(data_buf);free(data_buf);}}} |
void _main(){wchar_t * data;data=(wchar_t *)malloc(100*sizeof(wchar_t));{wchar_t * data_copy=data;wchar_t * data=data_copy;{wchar_t dest[50]=L"";wcscat(dest, data);printWLine(data);free(data);}}} | static void main(){wchar_t * data;data=(wchar_t *)malloc(100*sizeof(wchar_t));{wchar_t * data_copy=data;wchar_t * data=data_copy;{wchar_t dest[50]=L"";wcscat(dest, data);printWLine(data);free(data);}}} |
void b_main_sink(wchar_t * data);void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;wchar_t *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=wcslen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]=L'\0';replace=wcschr(data, L'\r');if (replace) *replace=L'\0';replace=wcschr(data, L'\n');if (replace) *replace=L'\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}b_main_sink(data);}void c_main_sink(wchar_t * data);void b_main_sink(wchar_t * data){c_main_sink(data);}void d_main_sink(wchar_t * data);void c_main_sink(wchar_t * data){d_main_sink(data);}void e_main_sink(wchar_t * data);void d_main_sink(wchar_t * data){e_main_sink(data);}void e_main_sink(wchar_t * data){{wchar_t dest[100]=L"";SNPRINTF(dest, 100-1, data);printWLine(dest);}} | static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;wcscpy(data, L"fixedstringtest");b_main_sink(data);}void b_main_sink(wchar_t * data){c_main_sink(data);}void c_main_sink(wchar_t * data){d_main_sink(data);}void d_main_sink(wchar_t * data){e_main_sink(data);}void e_main_sink(wchar_t * data){{wchar_t dest[100]=L"";SNPRINTF(dest, 100-1, data);printWLine(dest);}} |
void b_main_sink(char * * data_ptr);void _main(){char * data;char data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;{size_t data_len=strlen(data);char * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){strncat(data+data_len, environment, 100-data_len-1);}}b_main_sink(&data);}void b_main_sink(char * * data_ptr){char * data=*data_ptr;{HANDLE hFile;hFile=CreateFileA(data, (GENERIC_WRITE|GENERIC_READ), 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);if (hFile!=INVALID_HANDLE_VALUE){CloseHandle(hFile);}}} | void b_main_sink(char * * data);static void main(){char * data;char data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;strcat(data, "file.txt");b_main_sink(&data);}void b_main_sink(char * * data_ptr){char * data=*data_ptr;{HANDLE hFile;hFile=CreateFileA(data, (GENERIC_WRITE|GENERIC_READ), 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);if (hFile!=INVALID_HANDLE_VALUE){CloseHandle(hFile);}}} |