X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=server-src%2Ftapefile.c;h=35cbef231c1619a5c7e8f90f6bba25650ec61ef1;hb=691567b16c13087b31ee4c2b6d038e57872fae82;hp=faf58759bb510625a11337a4c8751b035cda8552;hpb=109540caa4e37a3663b3dcfb9a205b9609e3f561;p=debian%2Famanda diff --git a/server-src/tapefile.c b/server-src/tapefile.c index faf5875..35cbef2 100644 --- a/server-src/tapefile.c +++ b/server-src/tapefile.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -366,6 +367,7 @@ parse_tapeline( tape_t *tp = NULL; char *s, *s1; int ch; + char *cline; *status = 0; @@ -377,6 +379,7 @@ parse_tapeline( return NULL; } + cline = g_strdup(line); tp = g_new0(tape_t, 1); s1 = s - 1; @@ -432,6 +435,8 @@ parse_tapeline( } if (*(s - 1) == '#') { tp->comment = stralloc(s); /* skip leading '#' */ + } else if (*(s-1)) { + g_critical("Bogus line in the tapelist file: %s", cline); } return tp;