X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Ftapefile.c;fp=server-src%2Ftapefile.c;h=35cbef231c1619a5c7e8f90f6bba25650ec61ef1;hb=d28952249e392eb31bc8eecc53f6c477f30c617b;hp=faf58759bb510625a11337a4c8751b035cda8552;hpb=949b8910a5e23c4285d0b1aedacfc82a14dc97a5;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;