]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror 1.1.x changes.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 30 Oct 2002 20:05:29 +0000 (20:05 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 30 Oct 2002 20:05:29 +0000 (20:05 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@2954 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.1.txt
cups/http.c
cups/ipp.c

index 45d6cde82f108fa90de98353ac7f9a8df9cd9da2..c07921f00d46aca15c416eb53f8753fdf7b90c4b 100644 (file)
@@ -3,6 +3,9 @@ CHANGES-1.1.txt
 
 CHANGES IN CUPS V1.1.17
 
+       - Fixed a potential bug in the HTTP code which was
+         caused by servers sending the status line and
+         newline(s) in separate packets.
        - User-defined classification strings are now printed
          verbatim - previously the classification box would be
          empty.
index 3e6fed13d2b1aaebf9ecbeb34e7c4be8006ec6aa..c14c28a0064f0952a3dcb53fbe12c7ce82674105 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http.c,v 1.82.2.18 2002/10/22 15:54:34 mike Exp $"
+ * "$Id: http.c,v 1.82.2.19 2002/10/30 20:05:28 mike Exp $"
  *
  *   HTTP routines for the Common UNIX Printing System (CUPS).
  *
@@ -1036,7 +1036,7 @@ httpRead(http_t *http,                    /* I - HTTP data */
     http->used -= length;
 
     if (http->used > 0)
-      memcpy(http->buffer, http->buffer + length, http->used);
+      memmove(http->buffer, http->buffer + length, http->used);
   }
 #ifdef HAVE_LIBSSL
   else if (http->tls)
@@ -1350,6 +1350,7 @@ httpGets(char   *line,                    /* I - Line to read into */
 
       http->used += bytes;
       bufend     += bytes;
+      bufptr     = bufend;
     }
   }
   while (bufptr >= bufend && http->used < HTTP_MAX_BUFFER);
@@ -1386,7 +1387,7 @@ httpGets(char   *line,                    /* I - Line to read into */
 
     http->used -= bytes;
     if (http->used > 0)
-      memcpy(http->buffer, bufptr, http->used);
+      memmove(http->buffer, bufptr, http->used);
 
     DEBUG_printf(("httpGets(): Returning \"%s\"\n", line));
     return (line);
@@ -2110,5 +2111,5 @@ http_upgrade(http_t *http)        /* I - HTTP data */
 
 
 /*
- * End of "$Id: http.c,v 1.82.2.18 2002/10/22 15:54:34 mike Exp $".
+ * End of "$Id: http.c,v 1.82.2.19 2002/10/30 20:05:28 mike Exp $".
  */
index 440a4f477aae7a19ccdc7c397219e48069b16cd4..323f94237e128c6b5ca2f065420568712622c231 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c,v 1.55.2.19 2002/10/22 15:54:34 mike Exp $"
+ * "$Id: ipp.c,v 1.55.2.20 2002/10/30 20:05:29 mike Exp $"
  *
  *   Internet Printing Protocol support functions for the Common UNIX
  *   Printing System (CUPS).
@@ -2254,7 +2254,7 @@ ipp_read_http(http_t      *http,  /* I - Client connection */
       http->data_remaining -= bytes;
 
       if (http->used > 0)
-       memcpy(http->buffer, http->buffer + bytes, http->used);
+       memmove(http->buffer, http->buffer + bytes, http->used);
 
       if (http->data_remaining == 0)
       {
@@ -2366,5 +2366,5 @@ ipp_write_mem(ipp_mem_t   *m,             /* I - Memory buffer */
 
 
 /*
- * End of "$Id: ipp.c,v 1.55.2.19 2002/10/22 15:54:34 mike Exp $".
+ * End of "$Id: ipp.c,v 1.55.2.20 2002/10/30 20:05:29 mike Exp $".
  */