diff options
Diffstat (limited to 'Ivy/IvyApplication.cxx')
-rw-r--r-- | Ivy/IvyApplication.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Ivy/IvyApplication.cxx b/Ivy/IvyApplication.cxx index 6aa3668..5a50b96 100644 --- a/Ivy/IvyApplication.cxx +++ b/Ivy/IvyApplication.cxx @@ -118,7 +118,7 @@ void IvyApplication::OnReceive(char * line) TRACE("Receive %s\n",line);
#endif //IVY_DEBUG
- err = sscanf( line ,"%d %d", &kind_of_msg, &id);
+ err = sscanf_s( line ,"%d %d", &kind_of_msg, &id);
arg = firstArg( line , ARG_START );
if ( (err != 2) || (arg == NULL) )
{
@@ -283,8 +283,8 @@ void IvyApplication::SendMsg(MsgType msg, int id, const char * arg) {
char buffer[1024];
if ( arg )
- _snprintf( buffer, sizeof( buffer ), "%d %d" ARG_START "%s\n", msg, id, arg );
- else sprintf( buffer, "%d %d" ARG_START "\n", msg, id );
+ _snprintf_s( buffer, sizeof( buffer ),sizeof( buffer )-1, "%d %d" ARG_START "%s\n", msg, id, arg );
+ else sprintf_s( buffer,sizeof( buffer ), "%d %d" ARG_START "\n", msg, id );
#ifdef IVY_DEBUG
TRACE("SendMsg %s\n",buffer);
@@ -343,7 +343,7 @@ int IvyApplication::SendMsg(const char *message) {
exp = regexp_in[i];
#ifdef USE_PCRE
- int match_count = pcre_exec( exp, NULL, message, strlen( message ), 0, 0, ovector, max_subexp );
+ int match_count = pcre_exec( exp, NULL, message, (int) strlen( message ), 0, 0, ovector, max_subexp );
if ( match_count > 0 )
{
ivy::string buffer;
|