]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix a seg fault in the PostgreSQL driver dereferencing a NULL pointer.
authorKern Sibbald <kern@sibbald.com>
Mon, 4 Jun 2007 07:00:02 +0000 (07:00 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 4 Jun 2007 07:00:02 +0000 (07:00 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4973 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/cats/sql_get.c
bacula/technotes-2.1

index 6c4a40cc5ba4aeca40ef60e31462532907943e1a..c19fab5d84566ee9ded6f6abee4b212610234a7c 100644 (file)
@@ -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);
                   }
                }
index b54892dbc79abcb6cfd6e848d9390969fdb9fa20..ca29a660650f689dcb522bc70770cfd207bb73c2 100644 (file)
@@ -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