source
stringlengths 23
1.83k
| target
stringlengths 42
1.55k
|
---|---|
static void helper_main(){printLine("helper_main()");}void _main(){printLine("_main()");} | static void helper_main(){printLine("helper_main()");}static void main(){printLine("_good()");helper_main();} |
void main(){char * data;data=NULL;data=new char[50];{char * data_copy=data;char * data=data_copy;{char src[100];strcat(data, src);printLine(data);delete [] data;}}} | static void main(){char * data;data=NULL;data=new char[100];{char * data_copy=data;char * data=data_copy;{char src[100];strcat(data, src);printLine(data);delete [] data;}}} |
void _main(){int count;count=-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;count=atoi(input_buf);}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}{int count_copy=count;int count=count_copy;{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;{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;count=atoi(input_buf);}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}{int count_copy=count;int count=count_copy;{size_t i=0;FILE *file=NULL;const char *filename="output_good.txt";if (count > 0 && count <=20){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);}}}}} |
char * b_main_source(char * data);void _main(){char * data;char data_buf[100]="";data=data_buf;data=b_main_source(data);if (strncmp(PASSWORD, data, strlen(PASSWORD))==0) printLine("Access granted");else printLine("Access denied!");}char * b_main_source(char * data){{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();}return data;} | static void main(){char * data;char data_buf[100]="";data=data_buf;data=b_main_source(data);if (strncmp(PASSWORD, data, strlen(PASSWORD))==0) printLine("Access granted");else printLine("Access denied!");}char * b_main_source(char * data){data=PASSWORD;return data;} |
void main_sink_b(twointsclass * data);void main(){twointsclass * data;data=NULL;data=new twointsclass;data->a=0;data->b=0;printIntLine(data->a);printIntLine(data->b);main_sink_b(data);}void main_sink_c(twointsclass * data);void main_sink_b(twointsclass * data){main_sink_c(data);}void main_sink_d(twointsclass * data);void main_sink_c(twointsclass * data){main_sink_d(data);}void main_sink_e(twointsclass * data);void main_sink_d(twointsclass * data){main_sink_e(data);}void main_sink_e(twointsclass * data){} | static void main(){twointsclass * data;data=NULL;twointsclass data_good;data=&data_good;data->a=0;data->b=0;printIntLine(data->a);printIntLine(data->b);main_sink_b(data);}void main_sink_b(twointsclass * data){main_sink_c(data);}void main_sink_c(twointsclass * data){main_sink_d(data);}void main_sink_d(twointsclass * data){main_sink_e(data);}void main_sink_e(twointsclass * data){} |
void main_sink(char * data){{char dest[50]="";strcat(dest, data);printLine(data);delete [] data;}}void main(){char * data;data=new char[100];main_sink(data);} | void main_sink(char * data){{char dest[50]="";strcat(dest, data);printLine(data);delete [] data;}}static void main(){char * data;data=new char[100];main_sink(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 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){{short s=(short)data;printf("%hd\n", s);}} | void b_main_sink(int data);static void main(){int data;data=-1;data=CHAR_MAX-5;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){{short s=(short)data;printf("%hd\n", s);}} |
void main_sink(twointsclass * data);void main(){twointsclass * data;data=NULL;data=(twointsclass *)calloc(100, sizeof(twointsclass));main_sink(data);}void main_sink(twointsclass * data){delete [] data;} | static void main(){twointsclass * data;data=NULL;data=new twointsclass[100];main_sink(data);}void main_sink(twointsclass * data){delete [] data;} |
void _main_sink(short data){{char c=(char)data;printHexCharLine(c);}}void _main(){short data;data=-1;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);data=(short)atoi(input_buf);}_main_sink(data);} | void _main_sink(short data){{char c=(char)data;printHexCharLine(c);}}static void main(){short data;data=-1;data=CHAR_MAX-5;_main_sink(data);} |
void b_main_sink(wchar_t * * data_ptr);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 b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;{wchar_t *args[]={COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};EXECVP(COMMAND_INT, args);}} | void b_main_sink(wchar_t * * data);static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;wcscat(data, L"*.*");b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;{wchar_t *args[]={COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};EXECVP(COMMAND_INT, args);}} |
void b_main_sink(char * * data_ptr);void _main(){char * data;char data_buf[100]="";data=data_buf;{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';}}}b_main_sink(&data);}static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vprintf(data, args);va_end(args);}}void b_main_sink(char * * data_ptr){char * data=*data_ptr;main_vasink(data, data);} | static void main(){char * data;char data_buf[100]="";data=data_buf;strcpy(data, "fixedstringtest");b_main_sink(&data);}static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vprintf(data, args);va_end(args);}}void b_main_sink(char * * data_ptr){char * data=*data_ptr;main_vasink(data, data);} |
void _main(){wchar_t data;data=L'W';data=L'Z';printf("%02lx\n", data);} | static void main(){wchar_t data;data=L'W';printf("%02lx\n", data);data=L'Z';printf("%02lx\n", data);} |
void b_main_sink(FILE * data);void _main(){FILE * data;data=freopen("BadSource_freopen.txt","w+",stdin);fclose(data);b_main_sink(data);}void c_main_sink(FILE * data);void b_main_sink(FILE * data){c_main_sink(data);}void d_main_sink(FILE * data);void c_main_sink(FILE * data){d_main_sink(data);}void e_main_sink(FILE * data);void d_main_sink(FILE * data){e_main_sink(data);}void e_main_sink(FILE * data){fclose(data);} | static void main(){FILE * data;data=fopen("GoodSource_fopen.txt", "w+");b_main_sink(data);}void b_main_sink(FILE * data){c_main_sink(data);}void c_main_sink(FILE * data){d_main_sink(data);}void d_main_sink(FILE * data){e_main_sink(data);}void e_main_sink(FILE * data){fclose(data);} |
static char * _main_data;static char * _goodG2B_data;static char * _goodB2G_data;static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vprintf(data, args);va_end(args);}}static void main_sink(){char * data=_main_data;main_vasink(data, data);}void _main(){char * data;char data_buf[100]="";data=data_buf;{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';}}}_main_data=data;main_sink();} | static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vprintf("%s", args);va_end(args);}}static void main_sink(){char * data=_main_data;main_vasink(data, data);}static void main(){char * data;char data_buf[100]="";data=data_buf;{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';}}}_main_data=data;main_sink();} |
void main_sink(char * data);void main(){char * data;data=NULL;data=new char;main_sink(data);}void main_sink(char * data){free(data);} | static void main(){char * data;data=NULL;data=new char;main_sink(data);}void main_sink(char * data){delete data;} |
void _main(){{wchar_t dst[DST_SZ];memcpy(dst, COPY_STR, DST_SZ*sizeof(wchar_t));printWLine(dst);}} | static void main(){{wchar_t dst[DST_SZ];memcpy(dst, COPY_STR, (DST_SZ-1)*sizeof(wchar_t));dst[DST_SZ-1]=L'\0';printWLine(dst);}} |
void _main(){int * data;int * data_mainbuf=(int *)ALLOCA(50*sizeof(int));int * data_goodbuf=(int *)ALLOCA(100*sizeof(int));if(global_returns_t_or_f()){data=data_mainbuf;}else{data=data_goodbuf;}{{size_t i;for (i=0;i < 100;i++){data[i]=src[i];}printIntLine(data[0]);}}} | static void main(){int * data;int * data_badbuf=(int *)ALLOCA(50*sizeof(int));int * data_goodbuf=(int *)ALLOCA(100*sizeof(int));if(global_returns_t_or_f()){data=data_goodbuf;}else{data=data_goodbuf;}{{size_t i;for (i=0;i < 100;i++){data[i]=src[i];}printIntLine(data[0]);}}} |
void b_main_sink(char * data);void _main(){char * data;void (*func_ptr) (char *)=b_main_sink;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 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();}func_ptr(data);}void b_main_sink(char * data){fprintf(stdout, data);} | static void main(){char * data;void (*func_ptr) (char *)=b_main_sink;char data_buf[100]="";data=data_buf;strcpy(data, "fixedstringtest");func_ptr(data);}void b_main_sink(char * data){fprintf(stdout, data);} |
void b_main_sink(char * data);void _main(){char * data;char data_buf[100]="";data=data_buf;{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';}}}b_main_sink(data);}void b_main_sink(char * data){printf(data);} | static void main(){char * data;char data_buf[100]="";data=data_buf;strcpy(data, "fixedstringtest");b_main_sink(data);}void b_main_sink(char * data){printf(data);} |
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;{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';}}}data_array[2]=data;b_main_sink(data_array);}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 b_main_sink(wchar_t * data_array[]){wchar_t * data=data_array[2];main_vasink(data, data);} | static void main(){wchar_t * data;wchar_t * data_array[5];wchar_t data_buf[100]=L"";data=data_buf;{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';}}}data_array[2]=data;b_main_sink(data_array);}static void main_vasink(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 b_main_sink(wchar_t * data_array[]){wchar_t * data=data_array[2];main_vasink(data, data);} |
static char * main_source(char * data){{char * data_buf=(char *)malloc(100*sizeof(char));memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf-8;}return data;}void _main(){char * data;data=NULL;data=main_source(data);{char dest[100];strncpy(dest, data, strlen(dest));dest[100-1]='\0';printLine(dest);}} | static char * main_source(char * data){{char * data_buf=(char *)malloc(100*sizeof(char));memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf;}return data;}static void main(){char * data;data=NULL;data=main_source(data);{char dest[100];strncpy(dest, data, strlen(dest));dest[100-1]='\0';printLine(dest);}} |
twoints * b_main_source(twoints * data);void _main(){twoints * data;data=NULL;data=b_main_source(data);}twoints * b_main_source(twoints * data){data=NULL;data=(twoints *)realloc(data, 100*sizeof(twoints));data[0].a=0;data[0].b=0;printStructLine(&data[0]);return data;} | static void main(){twoints * data;data=NULL;data=b_main_source(data);}twoints * b_main_source(twoints * data){{twoints data_goodbuf[100];data=data_goodbuf;data[0].a=0;data[0].b=0;printStructLine(&data[0]);}return data;} |
void _main(){char * data;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);}}}{char *args[]={COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};EXECV(COMMAND_INT_PATH, args);}} | static void main(){char * data;char data_buf[100]="";data=data_buf;strcat(data, "*.*");{char *args[]={COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};EXECV(COMMAND_INT_PATH, args);}} |
static void main_sink(){int data=_main_data;{int result=data-1;printIntLine(result);}}void _main(){int data;data=-1;data=RAND32();_main_data=data;main_sink();} | static void main_sink(){int data=_main_data;{int result=0;if (data > INT_MIN){result=data-1;printIntLine(result);}else{printLine("Input value is too small to perform arithmetic safely.");}}}static void main(){int data;data=-1;data=RAND32();_main_data=data;main_sink();} |
void main_sink_b(char * data);void main(){char * data;data=NULL;data=new char[100];memset(data, 'A', 100-1);data[100-1]='\0';delete [] data;main_sink_b(data);}void main_sink_c(char * data);void main_sink_b(char * data){main_sink_c(data);}void main_sink_d(char * data);void main_sink_c(char * data){main_sink_d(data);}void main_sink_e(char * data);void main_sink_d(char * data){main_sink_e(data);}void main_sink_e(char * data){printLine(data);} | static void main(){char * data;data=NULL;data=new char[100];memset(data, 'A', 100-1);data[100-1]='\0';delete [] data;main_sink_b(data);}void main_sink_b(char * data){main_sink_c(data);}void main_sink_c(char * data){main_sink_d(data);}void main_sink_d(char * data){main_sink_e(data);}void main_sink_e(char * data){} |
void b_main_sink(char * * data_ptr);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;}b_main_sink(&data);}void b_main_sink(char * * data_ptr){char * data=*data_ptr;{size_t i;char dest[100];for (i=0;i < 100;i++){dest[i]=data[i];}dest[100-1]='\0';printLine(dest);}} | void b_main_sink(char * * 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;}b_main_sink(&data);}void b_main_sink(char * * data_ptr){char * data=*data_ptr;{size_t i;char dest[100];for (i=0;i < 100;i++){dest[i]=data[i];}dest[100-1]='\0';printLine(dest);}} |
static void main_sink(){int * data=_main_data;printIntLine(*data);}void _main(){int * data;data=NULL;data=NULL;_main_data=data;main_sink();} | static void main_sink(){int * data=_main_data;printIntLine(*data);}static void main(){int * data;data=NULL;{int tmp=5;data=&tmp;}_main_data=data;main_sink();} |
static void main_sink(){char * data=_main_data;{size_t i;char src[100];for (i=0;i < 100;i++){data[i]=src[i];}printLine(data);free(data);}}void _main(){char * data;data=NULL;data=(char *)malloc(50*sizeof(char));_main_data=data;main_sink();} | static void main_sink(){char * data=_main_data;{size_t i;char src[100];for (i=0;i < 100;i++){data[i]=src[i];}printLine(data);free(data);}}static void main(){char * data;data=NULL;data=(char *)malloc(100*sizeof(char));_main_data=data;main_sink();} |
void _main(){char * data;char * *data_ptr1=&data;char * *data_ptr2=&data;char data_buf[100]="";data=data_buf;{char * data=*data_ptr1;{size_t data_len=strlen(data);char * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){strncat(data+data_len, environment, 100-data_len-1);}}}{char * data=*data_ptr2;{int i, n, v;if (sscanf(data, "%d", &n)==1){v=0;for (i=0;i < n;i++){}printIntLine(v);}}}} | static void main(){char * data;char * *data_ptr1=&data;char * *data_ptr2=&data;char data_buf[100]="";data=data_buf;{char * data=*data_ptr1;strcpy(data, "15");}{char * data=*data_ptr2;{int i, n, v;if (sscanf(data, "%d", &n)==1){v=0;for (i=0;i < n;i++){}printIntLine(v);}}}} |
void _main(){wchar_t * data;wchar_t data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;{size_t data_len=wcslen(data);FILE * pFile;if(FILENAME_MAX-data_len > 1){pFile=FOPEN(L"C:\\temp\\file.txt", L"r");if (pFile!=NULL){fgetws(data+data_len, (int)(FILENAME_MAX-data_len), pFile);fclose(pFile);}}}{FILE *file=NULL;file=FOPEN(data, L"wb+");if (file!=NULL) fclose(file);}} | static void main(){wchar_t * data;wchar_t data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;wcscat(data, L"file.txt");{FILE *file=NULL;file=FOPEN(data, L"wb+");if (file!=NULL) fclose(file);}} |
static void main_sink(wchar_t * data){delete [] data;}void main(){wchar_t * data;data=NULL;{wchar_t mystring[]=L"mystring";data=wcsdup(mystring);}main_sink(data);} | static void main_sink(wchar_t * data){delete [] data;}static void main(){wchar_t * data;data=NULL;data=new wchar_t[100];main_sink(data);} |
void b_main_vasink(char * data, ...);void _main(){char * data;void (*func_ptr) (char *, ...)=b_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);}void b_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 *, ...)=b_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);}void b_main_vasink(char * data, ...){{char dest[100]="";va_list args;va_start(args, data);vsnprintf(dest, 100-1, "%s", args);va_end(args);printLine(dest);}} |
char * b_main_source(char * data);void _main(){char * data;char data_buf[100]=FULL_COMMAND;data=data_buf;data=b_main_source(data);system(data);}char * b_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;} | char * b_main_source(char * data);static void main(){char * data;char data_buf[100]=FULL_COMMAND;data=data_buf;data=b_main_source(data);system(data);}char * b_main_source(char * data){strcat(data, "*.*");return data;} |
static int main_source(int data){{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();}return data;}void _main(){int data;data=-1;data=main_source(data);{int result=data * data;printIntLine(result);}} | static int main_source(int data){{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();}return data;}static void main(){int data;data=-1;data=main_source(data);{int result=-1;if (data <=(int)sqrt((int)INT_MAX)){result=data * data;printIntLine(result);}else{printLine("Input value is too large to perform arithmetic safely.");}}} |
static void main_sink(char * password){{HANDLE pHandle;char * username="User";char * domain="Domain";if (LogonUserA( username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &pHandle)!=0){printLine("User logged in successfully.");CloseHandle(pHandle);}else{printLine("Unable to login.");}}}void _main(){char * password;void (*func_ptr) (char *)=main_sink;char password_buf[100]="";password=password_buf;{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 password_len=strlen(password);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*)password+password_len, (int)(100-password_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;password[recv_rv]='\0';replace=strchr(password, '\r');if (replace) *replace='\0';replace=strchr(password, '\n');if (replace) *replace='\0';}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}func_ptr(password);} | static void main_sink(char * password){{HANDLE pHandle;char * username="User";char * domain="Domain";if (LogonUserA( username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &pHandle)!=0){printLine("User logged in successfully.");CloseHandle(pHandle);}else{printLine("Unable to login.");}}}static void main(){char * password;void (*func_ptr) (char *)=main_sink;char password_buf[100]="";password=password_buf;strcpy(password, "Password1234!");func_ptr(password);} |
static wchar_t * main_source(wchar_t * data){{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);}}}return data;}void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;data=main_source(data);if (wcsncmp(PASSWORD, data, wcslen(PASSWORD))==0) printLine("Access granted");else printLine("Access denied!");} | static wchar_t * main_source(wchar_t * data){data=PASSWORD;return data;}static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;data=main_source(data);if (wcsncmp(PASSWORD, data, wcslen(PASSWORD))==0) printLine("Access granted");else printLine("Access denied!");} |
void b_main_sink(void * void_data_ptr);void _main(){int data;{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(void * void_data_ptr){int * data_ptr=(int *)void_data_ptr;int data=(*data_ptr);{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;data=7;b_main_sink(&data);}void b_main_sink(void * void_data_ptr){int * data_ptr=(int *)void_data_ptr;int data=(*data_ptr);{wchar_t data_buf[10]=L"AAAAAAAAA";if (data >=0){printWcharLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}} |
void _main(){twoints * data;twoints * *data_ptr1=&data;twoints * *data_ptr2=&data;data=NULL;{twoints * data=*data_ptr1;data=(twoints *)malloc(100*sizeof(twoints));data[0].a=0;data[0].b=0;printStructLine(&data[0]);}{twoints * data=*data_ptr2;}} | static void main(){twoints * data;twoints * *data_ptr1=&data;twoints * *data_ptr2=&data;data=NULL;{twoints * data=*data_ptr1;data=(twoints *)malloc(100*sizeof(twoints));data[0].a=0;data[0].b=0;printStructLine(&data[0]);}{twoints * data=*data_ptr2;free(data);}} |
void _main_sink(int data){{char c=(char)data;printHexCharLine(c);}}void _main(){int data;data=-1;data=RAND32();_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);} |
void _main(){wchar_t * data;_union_type my_union;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();}my_union.a=data;{wchar_t * data=my_union.b;_wspawnl(_P_WAIT, COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);}} | static void main(){wchar_t * data;_union_type my_union;wchar_t data_buf[100]=L"";data=data_buf;wcscat(data, L"*.*");my_union.a=data;{wchar_t * data=my_union.b;_wspawnl(_P_WAIT, COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);}} |
static wchar_t * main_source(wchar_t * data){{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);}}}return data;}static void main_vasink(wchar_t * data, ...){{va_list args;va_start(args, data);vwprintf(data, args);va_end(args);}}void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;data=main_source(data);main_vasink(data, data);} | static wchar_t * main_source(wchar_t * data){{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);}}}return data;}static void main_vasink(wchar_t * data, ...){{va_list args;va_start(args, data);vwprintf(L"%s", args);va_end(args);}}static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;data=main_source(data);main_vasink(data, data);} |
void main_sink(struct_type my_struct);void main(){int * data;struct_type my_struct;data=NULL;data=(int *)calloc(100, sizeof(int));my_struct.a=data;main_sink(my_struct);}void main_sink(struct_type my_struct){int * data=my_struct.a;delete [] data;} | static void main(){int * data;struct_type my_struct;data=NULL;data=new int[100];my_struct.a=data;main_sink(my_struct);}void main_sink(struct_type my_struct){int * data=my_struct.a;delete [] data;} |
void b_main_sink(wchar_t * data);void _main(){wchar_t * data;void (*func_ptr) (wchar_t *)=b_main_sink;wchar_t data_buf[FILENAME_MAX]=BASEPATH;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)(FILENAME_MAX-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();}func_ptr(data);}void b_main_sink(wchar_t * data){{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}} | void b_main_sink(wchar_t * data);static void main(){wchar_t * data;void (*func_ptr) (wchar_t *)=b_main_sink;wchar_t data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;wcscat(data, L"file.txt");func_ptr(data);}void b_main_sink(wchar_t * data){{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}} |
void _main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;if(global_returns_t_or_f()){{size_t data_len=strlen(data);FILE * pFile;if(FILENAME_MAX-data_len > 1){pFile=FOPEN("C:\\temp\\file.txt", "r");if (pFile!=NULL){fgets(data+data_len, (int)(FILENAME_MAX-data_len), pFile);fclose(pFile);}}}}else{strcpy(data, "c:\\temp\\file.txt");strcpy(data, "/tmp/file.txt");}{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;if(global_returns_t_or_f()){strcpy(data, "c:\\temp\\file.txt");strcpy(data, "/tmp/file.txt");}else{strcpy(data, "c:\\temp\\file.txt");strcpy(data, "/tmp/file.txt");}{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);void _main(){char * data;void (*func_ptr) (char *)=b_main_sink;char * data_mainbuf=(char *)ALLOCA(50*sizeof(char));char * data_goodbuf=(char *)ALLOCA(100*sizeof(char));data=data_mainbuf;func_ptr(data);}void b_main_sink(char * data){{char src[100];memmove(data, src, 100*sizeof(char));printLine(data);}} | void b_main_sink(char * data);static void main(){char * data;void (*func_ptr) (char *)=b_main_sink;char * data_badbuf=(char *)ALLOCA(50*sizeof(char));char * data_goodbuf=(char *)ALLOCA(100*sizeof(char));data=data_goodbuf;func_ptr(data);}void b_main_sink(char * data){{char src[100];memmove(data, src, 100*sizeof(char));printLine(data);}} |
void _main(){wchar_t * data;wchar_t * *data_ptr1=&data;wchar_t * *data_ptr2=&data;wchar_t data_buf[100];data=data_buf;{wchar_t * data=*data_ptr1;}{wchar_t * data=*data_ptr2;{wchar_t dest[50]=L"";wcscpy(dest, data);printWLine(data);}}} | static void main(){wchar_t * data;wchar_t * *data_ptr1=&data;wchar_t * *data_ptr2=&data;wchar_t data_buf[100];data=data_buf;{wchar_t * data=*data_ptr1;}{wchar_t * data=*data_ptr2;{wchar_t dest[50]=L"";wcscpy(dest, data);printWLine(data);}}} |
void b_main_sink(void * void_data_ptr);void _main(){char * data;char * data_buf=(char *)ALLOCA(100*sizeof(char));data=data_buf;b_main_sink(&data);}void b_main_sink(void * void_data_ptr){char * * data_ptr=(char * *)void_data_ptr;char * data=(*data_ptr);{char dest[50]="";_snprintf(dest, strlen(data), "%s", data);printLine(data);}} | void b_main_sink(void * void_data_ptr);static void main(){char * data;char * data_buf=(char *)ALLOCA(100*sizeof(char));data=data_buf;b_main_sink(&data);}void b_main_sink(void * void_data_ptr){char * * data_ptr=(char * *)void_data_ptr;char * data=(*data_ptr);{char dest[50]="";_snprintf(dest, strlen(data), "%s", data);printLine(data);}} |
void b_main_sink(void * void_data_ptr);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();}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);PUTENV(data);} | void b_main_sink(void * void_data_ptr);static void main(){wchar_t * data;wchar_t data_buf[250]=L"PATH=";data=data_buf;wcscat(data, NEW_PATH);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);PUTENV(data);} |
void _main(){int data;int *data_ptr1=&data;int *data_ptr2=&data;data=-1;{int data=*data_ptr1;data=RAND32();}{int data=*data_ptr2;{int result=data * data;printIntLine(result);}}} | static void main(){int data;int *data_ptr1=&data;int *data_ptr2=&data;data=-1;{int data=*data_ptr1;data=5;}{int data=*data_ptr2;{int result=data * data;printIntLine(result);}}} |
void b_main_sink(_struct_type my_struct);void _main(){wchar_t * password;_struct_type my_struct;wchar_t password_buf[100]=L"";password=password_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 password_len=wcslen(password);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*)password+password_len, (int)(100-password_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;password[recv_rv]=L'\0';replace=wcschr(password, L'\r');if (replace) *replace=L'\0';replace=wcschr(password, 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();}my_struct.a=password;b_main_sink(my_struct);}void b_main_sink(_struct_type my_struct){wchar_t * password=my_struct.a;{HANDLE pHandle;wchar_t * username=L"User";wchar_t * domain=L"Domain";if (LogonUserW( username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &pHandle)!=0){printLine("User logged in successfully.");CloseHandle(pHandle);}else{printLine("Unable to login.");}}} | void b_main_sink(_struct_type my_struct);static void main(){wchar_t * password;_struct_type my_struct;wchar_t password_buf[100]=L"";password=password_buf;wcscpy(password, L"Password1234!");my_struct.a=password;b_main_sink(my_struct);}void b_main_sink(_struct_type my_struct){wchar_t * password=my_struct.a;{HANDLE pHandle;wchar_t * username=L"User";wchar_t * domain=L"Domain";if (LogonUserW( username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &pHandle)!=0){printLine("User logged in successfully.");CloseHandle(pHandle);}else{printLine("Unable to login.");}}} |
void b_main_sink();void _main(){long long * data;long long data_mainbuf[50];long long data_goodbuf[100];data=data_mainbuf;_main_data=data;b_main_sink();}void b_main_sink(){long long * data=_main_data;{memmove(data, src, 100*sizeof(long long));printLongLongLine(data[0]);}} | void b_main_sink();static void main(){long long * data;long long data_badbuf[50];long long data_goodbuf[100];data=data_goodbuf;_main_data=data;b_main_sink();}void b_main_sink(){long long * data=_main_data;{memmove(data, src, 100*sizeof(long long));printLongLongLine(data[0]);}} |
void b_main_sink(long long * data);void _main(){long long * data;long long * data_mainbuf=(long long *)ALLOCA(50*sizeof(long long));long long * data_goodbuf=(long long *)ALLOCA(100*sizeof(long long));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 d_main_sink(long long * data);void c_main_sink(long long * data){d_main_sink(data);}void e_main_sink(long long * data);void d_main_sink(long long * data){e_main_sink(data);}void e_main_sink(long long * data){{{size_t i;for (i=0;i < 100;i++){data[i]=src[i];}printLongLongLine(data[0]);}}} | void b_main_sink(long long * data);static void main(){long long * data;long long * data_badbuf=(long long *)ALLOCA(50*sizeof(long long));long long * data_goodbuf=(long long *)ALLOCA(100*sizeof(long long));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 d_main_sink(long long * data);void c_main_sink(long long * data){d_main_sink(data);}void e_main_sink(long long * data);void d_main_sink(long long * data){e_main_sink(data);}void e_main_sink(long long * data){{{size_t i;for (i=0;i < 100;i++){data[i]=src[i];}printLongLongLine(data[0]);}}} |
void main_sink();void main(){twointsclass * data;data=NULL;data=NULL;data=(twointsclass *)realloc(data, 100*sizeof(twointsclass));main_data=data;main_sink();}void main_sink(){twointsclass * data=main_data;delete [] data;} | static void main(){twointsclass * data;data=NULL;data=NULL;data=(twointsclass *)realloc(data, 100*sizeof(twointsclass));main_data=data;main_sink();}void main_sink(){twointsclass * data=main_data;free(data);} |
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{data=PASSWORD;}if(global_returns_t_or_f()){if (wcsncmp(PASSWORD, data, wcslen(data))==0) printLine("Access granted");else printLine("Access denied!");}else{if (wcscmp(PASSWORD, data)==0) printLine("Access granted");else printLine("Access denied!");}} | 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()){if (wcscmp(PASSWORD, data)==0) printLine("Access granted");else printLine("Access denied!");}else{if (wcscmp(PASSWORD, data)==0) printLine("Access granted");else printLine("Access denied!");}} |
void main_sink(struct_type my_struct);void main(){twointsclass * data;struct_type my_struct;data=NULL;data=new twointsclass[100];{size_t i;for(i=0;i < 100;i++){data[i].a=1;data[i].b=2;}}delete [] data;my_struct.a=data;main_sink(my_struct);}void main_sink(struct_type my_struct){twointsclass * data=my_struct.a;printIntLine(data[0].a);} | static void main(){twointsclass * data;struct_type my_struct;data=NULL;data=new twointsclass[100];{size_t i;for(i=0;i < 100;i++){data[i].a=1;data[i].b=2;}}my_struct.a=data;main_sink(my_struct);}void main_sink(struct_type my_struct){twointsclass * data=my_struct.a;printIntLine(data[0].a);} |
void main(){wchar_t * data;data=new wchar_t[100];{wchar_t dest[50]=L"";size_t i, data_len;data_len=wcslen(data);for (i=0;i < data_len;i++){dest[i]=data[i];}printWLine(data);delete [] data;}} | static void main(){wchar_t * data;data=new wchar_t[100];{wchar_t dest[50]=L"";size_t i, data_len;data_len=wcslen(data);for (i=0;i < data_len;i++){dest[i]=data[i];}printWLine(data);delete [] data;}} |
void _main(){{int data=rand();printIntLine(data);}} | static void main(){{HCRYPTPROV hCryptProv;BYTE pbData[4];int data;if (!CryptAcquireContextW(&hCryptProv, 0, 0, PROV_RSA_FULL, 0)) exit(1);if (!CryptGenRandom(hCryptProv, 4, pbData)){CryptReleaseContext(hCryptProv, 0);exit(1);}CryptReleaseContext(hCryptProv, 0);data=(int)*pbData;printIntLine(data);}} |
void main(){wchar_t * data;data=NULL;data=new wchar_t;free(data);} | static void main(){wchar_t * data;data=NULL;data=new wchar_t;delete data;} |
void main(){wchar_t * data;data=NULL;{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;}{wchar_t * data_copy=data;wchar_t * data=data_copy;{wchar_t dest[100];wcsncpy(dest, data, wcslen(dest));dest[100-1]=L'\0';printWLine(dest);}}} | static void main(){wchar_t * data;data=NULL;{wchar_t * data_buf=new wchar_t[100];wmemset(data_buf, L'A', 100-1);data_buf[100-1]=L'\0';data=data_buf;}{wchar_t * data_copy=data;wchar_t * data=data_copy;{wchar_t dest[100];wcsncpy(dest, data, wcslen(dest));dest[100-1]=L'\0';printWLine(dest);}}} |
void _main(){{std_thread thread_a=NULL;std_thread thread_b=NULL;int val;val=0;if (!std_thread_create(helper_main, (void*)&val, &thread_a)){thread_a=NULL;}if (!std_thread_create(helper_main, (void*)&val, &thread_b)){thread_b=NULL;}if (thread_a && std_thread_join(thread_a)) std_thread_destroy(thread_a);if (thread_b && std_thread_join(thread_b)) std_thread_destroy(thread_b);printIntLine(val);}} | static void main(){{std_thread thread_a=NULL;std_thread thread_b=NULL;int val;val=0;if (!std_thread_lock_create(&g_good_lock)){return;}if (!std_thread_create(helper_good, (void*)&val, &thread_a)){thread_a=NULL;}if (!std_thread_create(helper_good, (void*)&val, &thread_b)){thread_b=NULL;}if (thread_a && std_thread_join(thread_a)) std_thread_destroy(thread_a);if (thread_b && std_thread_join(thread_b)) std_thread_destroy(thread_b);std_thread_lock_destroy(g_good_lock);printIntLine(val);}} |
void b_main_sink(wchar_t * * data_ptr);void _main(){wchar_t * data;wchar_t data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;{size_t data_len=wcslen(data);FILE * pFile;if(FILENAME_MAX-data_len > 1){pFile=FOPEN(L"C:\\temp\\file.txt", L"r");if (pFile!=NULL){fgetws(data+data_len, (int)(FILENAME_MAX-data_len), pFile);fclose(pFile);}}}b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}} | void b_main_sink(wchar_t * * data);static void main(){wchar_t * data;wchar_t data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;wcscat(data, L"file.txt");b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}} |
void main_sink_b(long long * data);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_b(data);}void main_sink_c(long long * data);void main_sink_b(long long * data){main_sink_c(data);}void main_sink_d(long long * data);void main_sink_c(long long * data){main_sink_d(data);}void main_sink_e(long long * data);void main_sink_d(long long * data){main_sink_e(data);}void main_sink_e(long long * data){printLongLongLine(data[0]);delete [] data;} | void main_sink_b(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_b(data);}void main_sink_c(long long * data);void main_sink_b(long long * data){main_sink_c(data);}void main_sink_d(long long * data);void main_sink_c(long long * data){main_sink_d(data);}void main_sink_e(long long * data);void main_sink_d(long long * data){main_sink_e(data);}void main_sink_e(long long * data){printLongLongLine(data[0]);delete [] data;} |
void b_main_sink(int data_array[]);void _main(){int data;int data_array[5];data=-1;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);data=atoi(input_buf);}data_array[2]=data;b_main_sink(data_array);}void b_main_sink(int data_array[]){int data=data_array[2];{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_array[]);static void main(){int data;int data_array[5];data=-1;data=100-1;data_array[2]=data;b_main_sink(data_array);}void b_main_sink(int data_array[]){int data=data_array[2];{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(){{char src[]="AAAA";memcpy(dst, src, sizeof(src));printLine(dst);}} | static void main(){{char src[]=SRC_STR;char dst[DST_SZ];memcpy(dst, src, sizeof(src));printLine(dst);}} |
void main_sink(wchar_t * data);void main(){wchar_t * data;data=NULL;data=new wchar_t[100];delete [] data;main_sink(data);}void main_sink(wchar_t * data){delete [] data;} | static void main(){wchar_t * data;data=NULL;data=new wchar_t[100];main_sink(data);}void main_sink(wchar_t * data){delete [] data;} |
void main_sink();void main(){int * data;data=NULL;data=new int;delete data;main_data=data;main_sink();}void main_sink(){int * data=main_data;delete data;} | static void main(){int * data;data=NULL;data=new int;delete data;main_data=data;main_sink();}void main_sink(){int * data=main_data;} |
static void main_sink(char * data){delete [] data;}void main(){char * data;void (*func_ptr) (char *)=main_sink;data=NULL;data=new char;func_ptr(data);} | static void main_sink(char * data){delete [] data;}static void main(){char * data;void (*func_ptr) (char *)=main_sink;data=NULL;data=new char[100];func_ptr(data);} |
void b_main_sink(void * void_data_ptr);void _main(){char * data;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);}}}b_main_sink(&data);}void b_main_sink(void * void_data_ptr){char * * data_ptr=(char * *)void_data_ptr;char * data=(*data_ptr);if (strncmp(PASSWORD, data, strlen(data))==0) 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);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);}}}b_main_sink(&data);}void b_main_sink(void * void_data_ptr){char * * data_ptr=(char * *)void_data_ptr;char * data=(*data_ptr);if (strcmp(PASSWORD, data)==0) printLine("Access granted");else printLine("Access denied!");} |
void main_source(char * &data);void main(){char * data;data=NULL;main_source(data);delete [] data;}void main_source(char * &data){data=new char;} | static void main(){char * data;data=NULL;main_source(data);delete data;}void main_source(char * &data){data=new char;} |
void main(){char * data;char * &data_ref=data;data=NULL;data=new char[50];{char * data=data_ref;{char src[100];memcpy(data, src, 100*sizeof(char));printLine(data);delete [] data;}}} | static void main(){char * data;char * &data_ref=data;data=NULL;data=new char[100];{char * data=data_ref;{char src[100];memcpy(data, src, 100*sizeof(char));printLine(data);delete [] data;}}} |