From: mike Date: Thu, 13 Feb 2003 03:23:13 +0000 (+0000) Subject: Fix cupsEncodeOptions() function. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e09825a5fa0ed1f9fd6e04e00584de6cd78efd58;p=thirdparty%2Fcups.git Fix cupsEncodeOptions() function. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@3351 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/CHANGES.txt b/CHANGES.txt index 0387ac4f40..1fde0898b7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,8 @@ CHANGES.txt - 02/12/2003 CHANGES IN CUPS V1.1.19 + - The cupsEncodeOptions() function could encode an + option with a NULL last string. - The socket backend could report the wrong number of backchannel bytes if an error occurred on the link. - The cups-polld program now only sleeps after getting diff --git a/cups/encode.c b/cups/encode.c index 15e982b8e2..a32b0c6ca5 100644 --- a/cups/encode.c +++ b/cups/encode.c @@ -1,5 +1,5 @@ /* - * "$Id: encode.c,v 1.13 2003/02/10 17:58:11 mike Exp $" + * "$Id: encode.c,v 1.14 2003/02/13 03:23:13 mike Exp $" * * Option encoding routines for the Common UNIX Printing System (CUPS). * @@ -260,7 +260,7 @@ cupsEncodeOptions(ipp_t *ipp, /* I - Request to add to */ * Scan the value string for values... */ - for (j = 0; *val != '\0' || j == 0; val = sep, j ++) + for (j = 0; j < count; val = sep, j ++) { /* * Find the end of this value and mark it if needed... @@ -382,5 +382,5 @@ cupsEncodeOptions(ipp_t *ipp, /* I - Request to add to */ /* - * End of "$Id: encode.c,v 1.13 2003/02/10 17:58:11 mike Exp $". + * End of "$Id: encode.c,v 1.14 2003/02/13 03:23:13 mike Exp $". */