Changeset 2716


Ignore:
Timestamp:
Feb 17, 2011, 5:53:20 PM (11 years ago)
Author:
schwittmann
Message:

Fixed possible stack corruption

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/KeySearcher/ExternalClient/Network.cpp

    r2493 r2716  
    3333    }
    3434    out << "/";
    35     const char* devicename = cryptool->getDeviceName().c_str();
     35    std::string devicename = cryptool->getDeviceName();
    3636
    3737    const std::string whitespaces = " \t\r\n";
    3838
    39     while(*devicename)
     39    for(std::string::iterator itr = devicename.begin(); itr != devicename.end(); ++itr)
    4040    {
    41         if(whitespaces.find(*devicename) == std::string::npos)
     41        if(whitespaces.find(*itr) == std::string::npos)
    4242        {
    43             out << *devicename;
     43            out << *itr;
    4444        }
    45         ++devicename;
    4645    }
    4746    return out.str();
Note: See TracChangeset for help on using the changeset viewer.