diff --git a/CHANGES.md b/CHANGES.md index a0c7edcc9a..b75aa434c0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ CHANGES - OpenPrinting CUPS 2.4.8 - TBA Changes in CUPS v2.4.8 (TBA) ---------------------------- +- Fixed printing of jobs with job name longer than 255 chars on older printers (Issue #644) - Really backport fix for Issue #742 - Raised `cups_enum_dests()` timeout for listing available IPP printers (Issue #751) - Fixed memory leak when unloading a job (Issue #813) diff --git a/backend/ipp.c b/backend/ipp.c index b5da8b88ca..2bbdefbd1f 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -219,7 +219,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 */ @@ -1484,6 +1484,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;