You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@apache.org on 2001/02/16 19:16:11 UTC

cvs commit: xml-xerces/c/src/util XMLString.cpp

andyh       01/02/16 10:16:09

  Modified:    c/src/util XMLString.cpp
  Log:
  XMLString::copy() - change limit test to reduce spurious pointer assignment warnings from BoundsChecker.
  
  Revision  Changes    Path
  1.13      +3 -3      xml-xerces/c/src/util/XMLString.cpp
  
  Index: XMLString.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/XMLString.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XMLString.cpp	2000/10/13 22:47:57	1.12
  +++ XMLString.cpp	2001/02/16 18:16:03	1.13
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: XMLString.cpp,v 1.12 2000/10/13 22:47:57 andyh Exp $
  + * $Id: XMLString.cpp,v 1.13 2001/02/16 18:16:03 andyh Exp $
    */
   
   
  @@ -828,9 +828,9 @@
   {
       XMLCh* outPtr = target;
       const XMLCh* srcPtr = src;
  -    const XMLCh* endPtr = src + maxChars;
  +    const XMLCh* endPtr = src + maxChars - 1;
   
  -    while (*srcPtr && (srcPtr < endPtr))
  +    while (*srcPtr && (srcPtr <= endPtr))
           *outPtr++ = *srcPtr++;
   
       // Cap it off here