From 8948353d6820a80e3f42435133dc8ff6aca51302 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 13 May 2007 07:18:51 +0000 Subject: [PATCH] Fix pointer usage bugs in Verify InitCatalog pointed out by Eric. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4765 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 5 ++++- bacula/src/dird/fd_cmds.c | 3 +-- bacula/technotes-2.1 | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index 1be1e77cea..d95512c804 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -48,6 +48,10 @@ Professional Needs: - Detect state change of system (verify) Priority: +- How does restore JobId=nnn work? (Dirk) +- What does: restore select fileset="TestSet" client="workplay-fd" pool="Default" +> storage="File2" before="2007-02-05 23:05:04" do? (Dirk) + - Implement update jobid= - Mention Eric and Marc's work + Marc's doc. - Add TLS to bat @@ -1717,4 +1721,3 @@ Block Position: 0 apparently not. This happened when I removed the pool directive and started the director. - Add Where: client:/.... to restore job report. - diff --git a/bacula/src/dird/fd_cmds.c b/bacula/src/dird/fd_cmds.c index b53b53d5c9..cbded15d4b 100644 --- a/bacula/src/dird/fd_cmds.c +++ b/bacula/src/dird/fd_cmds.c @@ -601,7 +601,6 @@ int get_attributes_and_put_in_catalog(JCR *jcr) fd = jcr->file_bsock; jcr->jr.FirstIndex = 1; - memset(&ar, 0, sizeof(ar)); jcr->FileIndex = 0; Dmsg0(120, "bdird: waiting to receive file attributes\n"); @@ -622,6 +621,7 @@ int get_attributes_and_put_in_catalog(JCR *jcr) } /* Start transaction allocates jcr->attr and jcr->ar if needed */ db_start_transaction(jcr, jcr->db); /* start transaction if not already open */ + ar = jcr->ar; p = fd->msg; /* The following three fields were sscanf'ed above so skip them */ skip_nonspaces(&p); /* skip FileIndex */ @@ -644,7 +644,6 @@ int get_attributes_and_put_in_catalog(JCR *jcr) } *fn = *p++; /* term filename and point to attribs */ attr = p; - ar = jcr->ar; len = strlen(attr); jcr->attr = check_pool_memory_size(jcr->attr, len); memcpy(jcr->attr, attr, len); diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index c38694dd44..2a924a9670 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -1,6 +1,9 @@ Technical notes on version 2.1 General: +13May07 +kes Fix pointer usage bugs in Verify InitCatalog pointed out by + Eric. 12May07 kes Update the po files. kes Fix Verify InitCatalog by making it cache attributes. -- 2.39.5