Stop pac dereferencing a null pointer if accounting is not enabeled.
PR: 24798 18191 Submitted by: Nick Hilliard <nick@netability.ie> Reviewed by: gad
This commit is contained in:
parent
1ab8876e4a
commit
69c64365e5
@ -450,7 +450,8 @@ chkprinter(s)
|
||||
case PCAPERR_TCLOOP:
|
||||
fatal(pp, "%s", pcaperr(stat));
|
||||
}
|
||||
acctfile = pp->acct_file;
|
||||
if ((acctfile = pp->acct_file) == NULL)
|
||||
errx(3, "accounting not enabled for printer %s", s);
|
||||
if (!pflag && pp->price100)
|
||||
price = pp->price100/10000.0;
|
||||
sumfile = (char *) calloc(sizeof(char), strlen(acctfile)+5);
|
||||
|
Loading…
x
Reference in New Issue
Block a user