IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 29, 2005, 2:04:12 PM (21 years ago)
Author:
evanalst
Message:

Update check for negative length prior to calling psStringNCopy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/xml/psXML.c

    r4409 r4432  
    1010*  @author Eric Van Alst, MHPCC
    1111*
    12 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-06-28 20:17:52 $
     12*  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-06-30 00:04:12 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    157157
    158158    // Adds '\0' to end of string and +1 to sLen
    159     cleaned = psStringNCopy(ptrB, sLen);
     159    if(sLen < 0 ) {
     160        cleaned = NULL;
     161    } else {
     162        cleaned = psStringNCopy(ptrB, sLen);
     163    }
    160164
    161165    return cleaned;
Note: See TracChangeset for help on using the changeset viewer.