Ignore:
Timestamp:
Jun 15, 2002, 7:14:52 PM (23 years ago)
Author:
sandervl
Message:

ParsePath fix; check boundary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/hmfile.cpp

    r8121 r8685  
    1 /* $Id: hmfile.cpp,v 1.34 2002-03-24 13:10:30 sandervl Exp $ */
     1/* $Id: hmfile.cpp,v 1.35 2002-06-15 17:14:52 sandervl Exp $ */
    22
    33/*
     
    110110void HMDeviceFileClass::ParsePath(LPCSTR lpszFileName, LPSTR lpszParsedFileName, DWORD length)
    111111{
    112 
    113     while(*lpszFileName != 0) {
     112    int i=0;
     113
     114    while(*lpszFileName != 0 && i < length-1) {
    114115        *lpszParsedFileName++ = *lpszFileName;
    115116        if(*lpszFileName == '\\') {
     
    121122            lpszFileName++;
    122123        }
     124        i++;
    123125    }
    124126    *lpszParsedFileName = 0;
Note: See TracChangeset for help on using the changeset viewer.