From: Kern Sibbald Date: Sat, 10 Apr 2010 10:14:42 +0000 (+0200) Subject: Revert "Fix error introduced when refactoring some of the code." X-Git-Tag: Release-5.0.2~72 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4e4fe55cfd72b7a8fbc5ef4c7898c360fb8d0b3b;p=bacula%2Fbacula Revert "Fix error introduced when refactoring some of the code." This reverts commit 04730852a0c96baa796ad3f1b52631daaa798977. --- diff --git a/bacula/src/cats/myingres.c b/bacula/src/cats/myingres.c index a52e9356d1..42a7fbfd26 100644 --- a/bacula/src/cats/myingres.c +++ b/bacula/src/cats/myingres.c @@ -60,8 +60,8 @@ short INGgetCols(INGconn *dbconn, const char *query, bool transaction) short number = -1; IISQLDA *sqlda; - sqlda = (IISQLDA *)malloc(IISQDA_HEAD_SIZE + IISQDA_VAR_SIZE); - memset(sqlda, 0, (IISQDA_HEAD_SIZE + IISQDA_VAR_SIZE)); + sqlda = (IISQLDA *)malloc(IISQDA_HEAD_SIZE + (number * IISQDA_VAR_SIZE)); + memset(sqlda, 0, (IISQDA_HEAD_SIZE + (number * IISQDA_VAR_SIZE))); sqlda->sqln = number; stmt = bstrdup(query); /* diff --git a/bacula/src/cats/myingres.sc b/bacula/src/cats/myingres.sc index ad19f91359..adebe2e6f0 100644 --- a/bacula/src/cats/myingres.sc +++ b/bacula/src/cats/myingres.sc @@ -57,8 +57,8 @@ short INGgetCols(INGconn *dbconn, const char *query, bool transaction) short number = -1; IISQLDA *sqlda; - sqlda = (IISQLDA *)malloc(IISQDA_HEAD_SIZE + IISQDA_VAR_SIZE); - memset(sqlda, 0, (IISQDA_HEAD_SIZE + IISQDA_VAR_SIZE)); + sqlda = (IISQLDA *)malloc(IISQDA_HEAD_SIZE + (number * IISQDA_VAR_SIZE)); + memset(sqlda, 0, (IISQDA_HEAD_SIZE + (number * IISQDA_VAR_SIZE))); sqlda->sqln = number;