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

ippRewriteURL in cgi-bin/ipp-var.c loops if URL contains characters to be converted. #459

Closed
michaelrsweet opened this issue Dec 4, 2003 · 4 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.1.20
CUPS.org User: goeran.cdg.chalmers

rawptr is not incrementer correctly in the conversionloop in
ippRewriteURL when a character needing convertion is encountered.
We stumbled on this when usingprinternames containing dots (.). printers.cgi hang in a cpu loop.

Suggested fix (diff -u).

--- ipp-var.c Fri Nov 7 19:52:38 2003
+++ ipp-var.c.fixed Wed Dec 3 18:43:35 2003
@@ -250,7 +250,7 @@
* illegal chars...
*/

  • for (rawptr = rawresource, resptr = resource; *rawptr;)

  • for (rawptr = rawresource, resptr = resource; _rawptr; rawptr++)
    if ((_rawptr & 128) || rawptr == '%' || *rawptr == ' ' ||
    *rawptr == '#' || *rawptr == '?' ||
    *rawptr == '.') /
    For MSIE */
    @@ -263,7 +263,7 @@
    }
    }
    else if (resptr < (resource + sizeof(resource) - 1))

  •   *resptr++ = *rawptr++;
    
  •   *resptr++ = *rawptr;
    

    *resptr = '\0';

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Thanks, I'll apply the fix to CVS for 1.2

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: pll+cups.permabit

By setting the BrowsePoll/BrowseAddress settings to cross the subnet barrier I can see all the printers showing up in the SharedPrinters menu.

This is somewhat of a step forward, since it solves the N-squared
problem previously mentioned. However, everything is printed in
portrait, and not rotated landscape when requested.

If a landscape document is requested, it's printed full-size portrait,
which results with the sides getting cut off. If that same document is
requested as portrait, it get printed portrait, but gets scaled down such that the entire document fits within the width of a portrait document, which is usually too small to read.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fix will also be in a final 1.1.x bug fix release.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in CVS - the anonymous CVS repository will be updated at midnight EST.

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

No branches or pull requests

1 participant