diff --git a/main.c b/main.c index 99ac890..5b9e1cb 100644 --- a/main.c +++ b/main.c @@ -77,7 +77,7 @@ void getquery(const char *qs) { // change from fseek/SEEK_END when sql queries are >2 GB in size. fseek(f, 0, SEEK_END); // go to the end of file unsigned int size = ftell(f); - qf = malloc(size); + qf = calloc(size, sizeof(char)); if (qf != NULL) { fseek(f, 0, SEEK_SET); // go to the start of file fread(qf, sizeof(char), size, f); @@ -85,7 +85,7 @@ void getquery(const char *qs) { } } qp = strchr(qs, '=') + 1; // increment to exclude '=' - printf("%s\n", qf); + printf("%x: \n\n%s\n", qf, qf); executequery(qf, qp, qt); free(qf); } @@ -108,4 +108,5 @@ void html(void) { int main(void) { getquery("map=pornstar-kaine"); + getquery("player=duHTyaSGpdTk7oebwPFoo899xPoTwP9bja4DUjCjTLo="); }