<commit_before>#include <stdio.h>
#include <windows.h>
#include <winuser.h>
#include <winsock2.h>

typedef enum {
    FAILURE,
    SUCCESS,
} RESULT;

size_t strlen_s(const char *s, size_t maxlen);
RESULT sendData();
void Stealth();
char *getData();

int main() {
    char *current = getData();
    printf("%s\n", current);
    system("title CLIENT");
    Stealth();
    while(1) {
        if (strcmp(current, getData()) != 0) {
            printf("%s\n", current);
            printf("%s\n", getData());
            if (MessageBox(NULL,
                "Send recently copied text to other PC?",
                "Send Authorization",
                MB_YESNO |
                MB_ICONQUESTION) == IDYES) {
                strcpy(current, getData());
                if(sendData() != SUCCESS){
                    MessageBox(NULL,
                            "Unable to Send!",
                            "Failure",
                            MB_OK |
                            MB_ICONWARNING);
                }
                else {
                 MessageBox(NULL,
                            "Sent!",
                            "Success!",
                            MB_OK |
                            MB_ICONINFORMATION);
                }
            }
            else 
                strcpy(current, getData());
        }
        SleepEx(1,1); 
    } 
    
    return 0;
}

char *getData() {
    if (OpenClipboard(NULL) == 0){
        MessageBox(NULL,
                "Unable to OpenClipboard!",
                "Failure",
                MB_OK |
                MB_ICONWARNING);
        return "(null)";
    }
    HGLOBAL var = GetClipboardData(CF_TEXT);
    char *data = GlobalLock(var);
    int size = GlobalSize(var);
    char *result = malloc(strlen_s(data, size+1));
    memcpy(result, data, size);
    GlobalUnlock(var);
    return result;
}

RESULT sendData() {
    if (OpenClipboard(NULL) == 0){
        MessageBox(NULL,
                "Unable to OpenClipboard!",
                "Failure",
                MB_OK |
                MB_ICONWARNING);
        return FAILURE;<commit_msg>fix crash<commit_after>#include <stdio.h>
#include <windows.h>
#include <winuser.h>
#include <winsock2.h>

typedef enum {
    FAILURE,
    SUCCESS,
} RESULT;

size_t strlen_s(const char *s, size_t maxlen);
RESULT sendData();
void Stealth();
char *getData();

int main() {
    char *current = getData();
    printf("%s\n", current);
    system("title CLIENT");
    Stealth();
    while(1) {
        if (strcmp(current, getData()) != 0) {
            printf("%s\n", current);
            printf("%s\n", getData());
            if (MessageBox(NULL,
                "Send recently copied text to other PC?",
                "Send Authorization",
                MB_YESNO |
                MB_ICONQUESTION) == IDYES) {
                strcpy(current, getData());
                if(sendData() != SUCCESS){
                    MessageBox(NULL,
                            "Unable to Send!",
                            "Failure",
                            MB_OK |
                            MB_ICONWARNING);
                }
                else {
                 MessageBox(NULL,
                            "Sent!",
                            "Success!",
                            MB_OK |
                            MB_ICONINFORMATION);
                }
            }
            else 
                strcpy(current, getData());
        }
        SleepEx(1,1); 
    } 
    
    return 0;
}

char *getData() {
    if (OpenClipboard(NULL) == 0){
        MessageBox(NULL,
                "Unable to OpenClipboard!",
                "Failure",
                MB_OK |
                MB_ICONWARNING);
        return "(null)";
    }
    HGLOBAL var = GetClipboardData(CF_TEXT);
    char *data = GlobalLock(var);
    int size = GlobalSize(var);
    char *result = malloc(strlen_s(data, size)+1);
    result[size] = '\0';
    memcpy(result, data, size);
    GlobalUnlock(var);
    return result;
}

RESULT sendData() {
    if (OpenClipboard(NULL) == 0){
        MessageBox(NULL,
                "Unable to OpenClipboard!",
                "Failure",
                MB_OK |
                MB_ICONWARNING);
        return FAILURE;
{'fraction_non_alphanumeric': 0.11960368011323426, 'fraction_numerical': 0.004482189195564991, 'mean_word_length': 1.2918918918918918, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4686574', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1178, 'n_words': 258}