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
a69134f24c
commit
67ba68254b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73028
@ -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…
Reference in New Issue
Block a user