From 567a277d6e371436c378faddd41bee0ae811c694 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 4 Jun 2007 07:00:02 +0000 Subject: [PATCH] Fix a seg fault in the PostgreSQL driver dereferencing a NULL pointer. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4973 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/cats/sql_get.c | 2 +- bacula/technotes-2.1 | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c index 6c4a40cc5b..c19fab5d84 100644 --- a/bacula/src/cats/sql_get.c +++ b/bacula/src/cats/sql_get.c @@ -453,7 +453,7 @@ int db_get_job_volume_parameters(JCR *jcr, B_DB *mdb, JobId_t JobId, VOL_PARAMS Mmsg(mdb->cmd, "SELECT Name from Storage WHERE StorageId=%s", edit_int64(SId[i], ed1)); if (QUERY_DB(jcr, mdb, mdb->cmd)) { - if ((row = sql_fetch_row(mdb)) != NULL) { + if ((row = sql_fetch_row(mdb)) && row[0]) { bstrncpy(Vols[i].Storage, row[0], MAX_NAME_LENGTH); } } diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index b54892dbc7..ca29a66065 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -1,6 +1,8 @@ Technical notes on version 2.1 General: +04Jun07 +kes Fix a seg fault in the PostgreSQL driver dereferencing a NULL pointer. 03Jun07 kes Implement SQLITE3_INIT_QUERY in version.h that can do an initial query for SQLite3. Use it to set PRAGMA synchronous = OFF. This -- 2.39.5