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

Further pstops corruption due to lack of linelen assignment #1523

Closed
michaelrsweet opened this Issue Mar 29, 2006 · 2 comments

Comments

Projects
None yet
1 participant
@michaelrsweet
Collaborator

michaelrsweet commented Mar 29, 2006

Version: 1.2-current
CUPS.org User: nix

[Replicated against 1.2rc1, which does not appear in the version pulldown]

Output from dvips and probably other software is corrupted by the pstops filter. (I have only seen additional garbage added immediately after %%BeginSetup:, but other corruption should be possible.)

The cause is a failure to propagate linelen up to copy_dsc() after copying the prolog; the setup section also lacks the same. So the first line in the setup section is assumed to be as long as the first line in the prolog, and... mess results.

Patch attached.

@michaelrsweet

This comment has been minimized.

Collaborator

michaelrsweet commented Mar 29, 2006

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet

This comment has been minimized.

Collaborator

michaelrsweet commented Mar 29, 2006

"linelen-fix.diff":

Index: filter/pstops.c

--- filter/pstops.c (revision 5343)
+++ filter/pstops.c (working copy)
@@ -738,14 +738,14 @@
*/

fprintf(stderr, "DEBUG: Before copy_prolog - %s", line);

  • copy_prolog(fp, doc, ppd, line, linelen, linesize);
  • linelen = copy_prolog(fp, doc, ppd, line, linelen, linesize);

/*

  • Then the document setup section...
    */

fprintf(stderr, "DEBUG: Before copy_setup - %s", line);

  • copy_setup(fp, doc, ppd, line, linelen, linesize);
  • linelen = copy_setup(fp, doc, ppd, line, linelen, linesize);

/*

  • Then process pages until we have no more...

@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment