apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr-util/buckets apr_brigade.c
Date Mon, 17 Jun 2002 04:49:34 GMT
jerenkrantz    2002/06/16 21:49:34

  Modified:    buckets  apr_brigade.c
  Log:
  - Clarify/answer two comments
  - Break out earlier when we are at the limit to be copied
  
  Revision  Changes    Path
  1.43      +5 -4      apr-util/buckets/apr_brigade.c
  
  Index: apr_brigade.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_brigade.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- apr_brigade.c	9 Jun 2002 07:30:13 -0000	1.42
  +++ apr_brigade.c	17 Jun 2002 04:49:34 -0000	1.43
  @@ -248,16 +248,17 @@
   
           /* XXX: It appears that overflow of the final bucket
            * is DISCARDED without any warning to the caller.
  +         *
  +         * No, we only copy the data up to their requested size.  -- jre
            */
           memcpy(c, str, str_len);
   
           c += str_len;
           actual += str_len;
   
  -        /* XXX: Is this a bug in actual == *len or did we intend to
  -         * flatten all trailing 0 byte buckets?
  -         */
  -        if (actual > *len) {
  +        /* This could probably be actual == *len, but be safe from stray
  +         * photons. */
  +        if (actual >= *len) {
               break;
           }
       }
  
  
  

Mime
View raw message