Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backend/ipp.c: Fix printing jobs with long names on older IPP printers #866

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Changes in CUPS v2.5b1 (TBA)
- Fixed Digest authentication support (Issue #260)
- Fixed extensive looping in scheduler (Issue #604)
- Fixed printing multiple files on specific printers (Issue #643)
- Fixed printing of jobs with job name longer than 255 chars on older printers (Issue #644)
- Fixed segfault in `cupsGetNamedDest()` when trying to get default printer, but
the default printer is not set (Issue #719)
- Fixed ready media support for iOS 17+ (Issue #738)
Expand Down
6 changes: 5 additions & 1 deletion backend/ipp.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ main(int argc, /* I - Number of command-line args */
off_t compatsize = 0; /* Size of compatibility file */
int port; /* Port number (not used) */
char uri[HTTP_MAX_URI]; /* Updated URI without user/pass */
char print_job_name[1024]; /* Update job-name for Print-Job */
char print_job_name[256]; /* Update job-name for Print-Job */
http_status_t http_status; /* Status of HTTP request */
ipp_status_t ipp_status; /* Status of IPP request */
http_t *http; /* HTTP connection */
Expand Down Expand Up @@ -1464,6 +1464,10 @@ main(int argc, /* I - Number of command-line args */
}
else
{
/*
* TODO: make this compatible with UTF-8 - possible UTF-8 truncation here..
*/

snprintf(print_job_name, sizeof(print_job_name), "%s - %s", argv[1],
argv[3]);
monitor.job_name = print_job_name;
Expand Down
Loading