FreeBSD Bugzilla – Attachment 8753 Details for
Bug 18191
pac core dumped without set /etc/printcap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 866 bytes, created by
Kuang-che Wu
on 2000-04-24 11:30:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Kuang-che Wu
Created:
2000-04-24 11:30:01 UTC
Size:
866 bytes
patch
obsolete
>--- /usr/src/usr.sbin/lpr/pac/pac.c.orig Mon Apr 24 18:02:20 2000 >+++ /usr/src/usr.sbin/lpr/pac/pac.c Mon Apr 24 18:09:39 2000 >@@ -180,6 +180,11 @@ > exit(2); > } > >+ if (acctfile == NULL) { >+ printf("pac: acct.file of printer %s didn't set in printcap\n", >+ printer); >+ exit(1); >+ } > if ((acct = fopen(acctfile, "r")) == NULL) { > perror(acctfile); > exit(1); >@@ -453,10 +458,12 @@ > acctfile = pp->acct_file; > if (!pflag && pp->price100) > price = pp->price100/10000.0; >- sumfile = (char *) calloc(sizeof(char), strlen(acctfile)+5); >- if (sumfile == NULL) >- errx(1, "calloc failed"); >- strcpy(sumfile, acctfile); >- strcat(sumfile, "_sum"); >+ if (acctfile) { >+ sumfile = (char *) calloc(sizeof(char), strlen(acctfile)+5); >+ if (sumfile == NULL) >+ errx(1, "calloc failed"); >+ strcpy(sumfile, acctfile); >+ strcat(sumfile, "_sum"); >+ } > return(1); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18191
: 8753