Priority:
================
+- Change calling sequence to delete_job_id_range() in ua_cmds.c
+ the preceding strtok() is done inside the subroutine only once.
- Dangling softlinks are not restored properly. For example, take a
soft link such as src/testprogs/install-sh, which points to /usr/share/autoconf...
move the directory to another machine where the file /usr/share/autoconf does
/*
*
* Bacula Director -- migrate.c -- responsible for doing
- * migration jobs.
+ * migration and copy jobs.
*
* Also handles Copy jobs (March MMVIII)
*
/* Add an item to the list if it is unique */
static void add_unique_id(idpkt *ids, char *item)
{
- char id[30];
+ const int maxlen = 30;
+ char id[maxlen+1];
char *q = ids->list;
/* Walk through current list to see if each item is the same as item */
for ( ; *q; ) {
id[0] = 0;
- for (int i=0; i<(int)sizeof(id); i++) {
+ for (int i=0; i<maxlen; i++) {
if (*q == 0) {
break;
} else if (*q == ',') {
*/
static int get_next_dbid_from_list(char **p, DBId_t *DBId)
{
- char id[30];
+ const int maxlen = 30;
+ char id[maxlen+1];
char *q = *p;
id[0] = 0;
- for (int i=0; i<(int)sizeof(id); i++) {
+ for (int i=0; i<maxlen; i++) {
if (*q == 0) {
break;
} else if (*q == ',') {
*/
int get_next_jobid_from_list(char **p, JobId_t *JobId)
{
- char jobid[30];
+ const int maxlen = 30;
+ char jobid[maxlen+1];
char *q = *p;
jobid[0] = 0;
- for (int i=0; i<(int)sizeof(jobid); i++) {
+ for (int i=0; i<maxlen; i++) {
if (*q == 0) {
break;
} else if (*q == ',') {
/* Take command line arg, or ask user if none */
rx.store = get_storage_resource(ua, false /* don't use default */);
- Dmsg1(200, "Set store=%s\n", rx.store->name());
+ if (rx.store) {
+ Dmsg1(200, "Set store=%s\n", rx.store->name());
+ }
}
General:
+17May08
+kes Fix buffer overruns detected by Coverity.
13May08
kes Tweak joblog display.
12May08