diff --git a/src/api.c b/src/api.c index f31d207..fec5a7d 100644 --- a/src/api.c +++ b/src/api.c @@ -115,7 +115,7 @@ DECL char * raw(const char * const sql) { char* errmsg; - char* r = (char*)malloc(10000); + char* r = (char*)calloc(sizeof(char), 10000); // TODO: allow for reallocing in rtos, start with a smaller value DBUSERERR(sqlite3_exec(connection, sql, rtos, &r, &errmsg)); if (errmsg){ free(r); diff --git a/src/irc.c b/src/irc.c index bae91d3..807138c 100644 --- a/src/irc.c +++ b/src/irc.c @@ -63,7 +63,7 @@ ircmsg(const char* fmt, { exit(1); } puts(fmtdmsg); - IRCMSG(fmtdmsg); + IRCMSG(fmtdmsg); // TODO: make it send the message line by line free(fmtdmsg); va_end(args);