Archived
1
0
Fork 0

arch/mysql.c: fixed memoryblock calculation bug in delete()

This commit is contained in:
Henrik Hautakoski 2010-06-09 23:49:18 +02:00 committed by Henrik Hautakoski
parent b326f23c85
commit 8f89092faa

View file

@ -209,10 +209,10 @@ int arch_db_delete(const char *path, const char *filename) {
/*
* Allocate memory big enough for query
* dbtable + path + filename + date + 100 (for base query)
* dbtable + path + filename + date + 100 (for base query) + \0
*/
stmt_size = STRSZ(dbtable) +
STRSZ(path) + STRSZ(filename) + 100;
STRSZ(path) + STRSZ(filename) + 101;
char *stmt = malloc(stmt_size);