示例#1
0
// ----------------------------------------------------------------------------------
void Logger::warn(const char* message)  {

    // SECURITY FIX: see above
    if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
        return;
    }
    return OnWarn(message);
}
示例#2
0
// ----------------------------------------------------------------------------------
void Logger::warn(const std::string &message)    {

    // SECURITY FIX: otherwise it's easy to produce overruns ...
    if (message.length()>MAX_LOG_MESSAGE_LENGTH) {
        ai_assert(false);
        return;
    }
    return OnWarn(message.c_str());
}